Make DirectWrite backend to work with different font sizes
Actually copyedited same logic from Uniscribe to make it just work
This commit is contained in:
parent
0251b0cc5c
commit
1c00a46c7a
|
@ -739,6 +739,11 @@ _hb_directwrite_shape(hb_shape_plan_t *shape_plan,
|
||||||
|
|
||||||
#undef ALLOCATE_ARRAY
|
#undef ALLOCATE_ARRAY
|
||||||
|
|
||||||
|
int font_size = font->face->get_upem();
|
||||||
|
if (font_size < 0)
|
||||||
|
font_size = -font_size;
|
||||||
|
int x_mult = (double)font->x_scale / font_size;
|
||||||
|
|
||||||
hr = analyzer->GetGlyphPlacements(pchars,
|
hr = analyzer->GetGlyphPlacements(pchars,
|
||||||
clusters,
|
clusters,
|
||||||
textProperties,
|
textProperties,
|
||||||
|
@ -747,7 +752,7 @@ _hb_directwrite_shape(hb_shape_plan_t *shape_plan,
|
||||||
glyphProperties,
|
glyphProperties,
|
||||||
actualGlyphs,
|
actualGlyphs,
|
||||||
fontFace,
|
fontFace,
|
||||||
face->get_upem(),
|
font_size * x_mult,
|
||||||
FALSE,
|
FALSE,
|
||||||
FALSE,
|
FALSE,
|
||||||
&runHead->mScript,
|
&runHead->mScript,
|
||||||
|
|
Loading…
Reference in New Issue