Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Bigger reading text: User Guide / What's New body 17 px (headings 30 / 23 / 19), update banner title and highlights 17 px
islandmed66d52b1c39a7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex de53e98f..001704e0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,10 @@ All notable changes to SculptForge are listed here. The format follows## [Unreleased]+### Changed+- Easier reading: the User Guide (and its What's New chapter) and the update banner use 17 px text instead of+ the 15 px interface font, with larger headings.+### Fixed- Capture from phone tells you what to do when the phone can't open the page: Android Chrome can refuse everyhome-network address ("This site can't be reached", ERR_TOO_MANY_RETRIES), so use Firefox on the phone; and Linuxdiff --git a/src/app/PanelProject.cpp b/src/app/PanelProject.cppindex 5a52294e..600acdef 100644--- a/src/app/PanelProject.cpp+++ b/src/app/PanelProject.cpp@@ -538,10 +538,15 @@ void App::drawUpdateBanner() {ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing |ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMove;if (ImGui::Begin("##update_banner", nullptr, flags)) {+ // Reading size (the guide's 17 px fonts), so the highlights are easy to read over the canvas.+ if (ImFont* title = guide_.bodyBoldFont()) ImGui::PushFont(title);ImGui::Text("SculptForge %s is available", u.version.c_str());+ if (guide_.bodyBoldFont()) ImGui::PopFont();+ if (ImFont* body = guide_.bodyFont()) ImGui::PushFont(body);ImGui::SameLine();ImGui::TextDisabled("(you have %s)", SCULPTFORGE_VERSION);for (const auto& h : u.highlights) ImGui::BulletText("%s", h.c_str());+ if (guide_.bodyFont()) ImGui::PopFont();ImGui::Spacing();bool close = false;if (ImGui::Button("What's new")) SDL_OpenURL(u.notesUrl.c_str());diff --git a/src/app/UserGuide.cpp b/src/app/UserGuide.cppindex 9589a4f8..ed92121b 100644--- a/src/app/UserGuide.cpp+++ b/src/app/UserGuide.cpp@@ -25,6 +25,8 @@ namespace sf {namespace assets {extern const unsigned char fontSemiBold[];extern const unsigned long long fontSemiBold_size;+extern const unsigned char fontRegular[];+extern const unsigned long long fontRegular_size;} // namespace assetsnamespace guide_data {@@ -327,13 +329,18 @@ void UserGuide::addFonts(float scale) {ImFontConfig cfg;cfg.FontDataOwnedByAtlas = false;cfg.OversampleH = 2;- auto add = [&](float size) {- return io.Fonts->AddFontFromMemoryTTF(const_cast<unsigned char*>(assets::fontSemiBold), int(assets::fontSemiBold_size),- size * scale, &cfg);+ auto add = [&](float size, bool bold = true) {+ return bold ? io.Fonts->AddFontFromMemoryTTF(const_cast<unsigned char*>(assets::fontSemiBold),+ int(assets::fontSemiBold_size), size * scale, &cfg)+ : io.Fonts->AddFontFromMemoryTTF(const_cast<unsigned char*>(assets::fontRegular),+ int(assets::fontRegular_size), size * scale, &cfg);};- h1_ = add(27.0f);- h2_ = add(20.5f);- h3_ = add(16.5f);+ // Reading text a step above the 15 px UI font (the guide, What's New, the update banner).+ body_ = add(kReadingSize, false);+ bodyBold_ = add(kReadingSize);+ h1_ = add(30.0f);+ h2_ = add(23.0f);+ h3_ = add(19.0f);}bool UserGuide::ensureLoaded() {@@ -738,10 +745,10 @@ void UserGuide::drawSearchResults(App& app) {float UserGuide::drawBlock(App& app, const Block& b, int index, ImVec2 o, float width, bool draw) {const float s = app.uiScale_;ImDrawList* dl = draw ? ImGui::GetWindowDrawList() : nullptr;- ImFont* regular = ImGui::GetFont();+ ImFont* regular = body_ ? body_ : ImGui::GetFont();FlowStyle st;st.regular = regular;- st.bold = app.boldFont() ? app.boldFont() : regular;+ st.bold = bodyBold_ ? bodyBold_ : app.boldFont() ? app.boldFont() : regular;st.mono = app.consoleFont();st.lineHeight = std::round(regular->FontSize * 1.55f);LinkClick click;diff --git a/src/app/UserGuide.h b/src/app/UserGuide.hindex db550d23..d969c763 100644--- a/src/app/UserGuide.h+++ b/src/app/UserGuide.h@@ -23,6 +23,10 @@ class UserGuide {public:// Heading fonts (Inter SemiBold), added while the font atlas is built.void addFonts(float scale);+ // The reading fonts (Inter 17 px, regular and SemiBold), also used by the update banner; null before addFonts.+ static constexpr float kReadingSize = 17.0f;+ ImFont* bodyFont() const { return body_; }+ ImFont* bodyBoldFont() const { return bodyBold_; }// Opens the window at TARGET ("masking.md#mask-by-cavity", "masking.md", "" = where it was).void open(const std::string& target = "");void toggle();@@ -82,6 +86,7 @@ private:int layoutPage_ = -2;std::map<std::string, Texture> textures_;ImFont* h1_ = nullptr, *h2_ = nullptr, *h3_ = nullptr;+ ImFont* body_ = nullptr, *bodyBold_ = nullptr;int linkCounter_ = 0;};