mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1137588 - patch 2 - Use a better default vOrigin in fonts without real vertical metrics. r=jdaggett
This commit is contained in:
parent
83393239d4
commit
2085929bcb
@ -389,8 +389,11 @@ gfxHarfBuzzShaper::GetGlyphVOrigin(hb_codepoint_t aGlyph,
|
||||
reinterpret_cast<const MetricsHeader*>(hb_blob_get_data(hheaTable,
|
||||
&len));
|
||||
if (len >= sizeof(MetricsHeader)) {
|
||||
*aY = -FloatToFixed(GetFont()->FUnitsToDevUnitsFactor() *
|
||||
int16_t(hhea->ascender));
|
||||
// divide up the default advance we're using (1em) in proportion
|
||||
// to ascender:descender from the hhea table
|
||||
int16_t a = int16_t(hhea->ascender);
|
||||
int16_t d = int16_t(hhea->descender);
|
||||
*aY = -FloatToFixed(GetFont()->GetAdjustedSize() * a / (a - d));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user