mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-14 18:02:18 +00:00
Merge branch 'master' into docking
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
# Usage: fontforge.exe -script ProggyVector-ExtractScript.txt
|
||||
Open("ProggyVector-Regular.ttf")
|
||||
SelectMore(0x20,0xFF)
|
||||
SelectMore(0x20AC) # Euro sign
|
||||
SelectInvert()
|
||||
DetachAndRemoveGlyphs()
|
||||
SelectAll()
|
||||
RemoveOverlap()
|
||||
Simplify()
|
||||
i=0
|
||||
while (i < 23)
|
||||
SetTTFName(0x409,i,"")
|
||||
i=i+1
|
||||
endloop
|
||||
SetFontNames(".",".",".",".",".",".")
|
||||
Generate("ProggyVector-minimal.ttf")
|
||||
# At this point you can use binary_to_compressed_c.exe -u8 ProggyVector-minimal.ttf proggy_vector_minimal_ttf
|
||||
@@ -451,7 +451,7 @@ static bool ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig* s
|
||||
{
|
||||
// Read metrics
|
||||
FT_Size_Metrics metrics = bd_baked_data->FtSize->metrics;
|
||||
const float scale = 1.0f / rasterizer_density;
|
||||
const float scale = 1.0f / (rasterizer_density * src->ExtraSizeScale);
|
||||
baked->Ascent = (float)FT_CEIL(metrics.ascender) * scale; // The pixel extents above the baseline in pixels (typically positive).
|
||||
baked->Descent = (float)FT_CEIL(metrics.descender) * scale; // The extents below the baseline in pixels (typically negative).
|
||||
//LineSpacing = (float)FT_CEIL(metrics.height) * scale; // The baseline-to-baseline distance. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance. Think of it as a value the designer of the font finds appropriate.
|
||||
|
||||
Reference in New Issue
Block a user