Skip to content

Commit

Permalink
Fonts: added RasterizerDensity to ImFontConfig. (#6925)
Browse files Browse the repository at this point in the history
  • Loading branch information
thedmd authored and ocornut committed Nov 13, 2023
1 parent add915b commit abfb926
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions imgui_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,7 @@ ImFontConfig::ImFontConfig()
OversampleV = 1;
GlyphMaxAdvanceX = FLT_MAX;
RasterizerMultiply = 1.0f;
RasterizerDensity = 1.0f;
EllipsisChar = (ImWchar)-1;
}

Expand Down

0 comments on commit abfb926

Please sign in to comment.