mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibGfx: Rasterize TTF glyphs using "hhea" metrics instead of "os2"
This matches what other font systems appear to do.
This commit is contained in:
parent
9b0d158e69
commit
6d260b14b4
1 changed files with 1 additions and 1 deletions
|
@ -573,7 +573,7 @@ RefPtr<Gfx::Bitmap> Font::rasterize_glyph(u32 glyph_id, float x_scale, float y_s
|
||||||
}
|
}
|
||||||
auto glyph_offset = m_loca.get_glyph_offset(glyph_id);
|
auto glyph_offset = m_loca.get_glyph_offset(glyph_id);
|
||||||
auto glyph = m_glyf.glyph(glyph_offset);
|
auto glyph = m_glyf.glyph(glyph_offset);
|
||||||
return glyph.rasterize(m_os2.typographic_ascender(), m_os2.typographic_descender(), x_scale, y_scale, [&](u16 glyph_id) {
|
return glyph.rasterize(m_hhea.ascender(), m_hhea.descender(), x_scale, y_scale, [&](u16 glyph_id) {
|
||||||
if (glyph_id >= glyph_count()) {
|
if (glyph_id >= glyph_count()) {
|
||||||
glyph_id = 0;
|
glyph_id = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue