Przeglądaj źródła

Fonts: added RasterizerDensity to ImFontConfig. (#6925)

thedmd 1 rok temu
rodzic
commit
abfb9269b5
2 zmienionych plików z 2 dodań i 0 usunięć
  1. 1 0
      imgui.h
  2. 1 0
      imgui_draw.cpp

+ 1 - 0
imgui.h

@@ -2849,6 +2849,7 @@ struct ImFontConfig
     bool            MergeMode;              // false    // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
     unsigned int    FontBuilderFlags;       // 0        // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.
     float           RasterizerMultiply;     // 1.0f     // Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable.
+    float           RasterizerDensity;      // 1.0f     // DPI scale for rasterization. Bigger DPI for higher quality.
     ImWchar         EllipsisChar;           // -1       // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
 
     // [Internal]

+ 1 - 0
imgui_draw.cpp

@@ -2009,6 +2009,7 @@ ImFontConfig::ImFontConfig()
     OversampleV = 1;
     GlyphMaxAdvanceX = FLT_MAX;
     RasterizerMultiply = 1.0f;
+    RasterizerDensity = 1.0f;
     EllipsisChar = (ImWchar)-1;
 }