Fonts: Added a bit of user facing tooling.

This commit is contained in:
ocornut
2025-01-16 15:41:46 +01:00
parent bd19bc5085
commit 722f6013ff
2 changed files with 24 additions and 1 deletions

View File

@@ -8446,11 +8446,11 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
{
ImGuiIO& io = GetIO();
ImFontAtlas* atlas = io.Fonts;
HelpMarker("Read FAQ and docs/FONTS.md for details on font loading.");
ShowFontAtlas(atlas);
// Post-baking font scaling. Note that this is NOT the nice way of scaling fonts, read below.
// (we enforce hard clamping manually as by default DragFloat/SliderFloat allows CTRL+Click text to get out of bounds).
SeparatorText("Legacy Scaling");
const float MIN_SCALE = 0.3f;
const float MAX_SCALE = 2.0f;
HelpMarker(