Make DirectWrite backend to work with different font sizes
Actually copyedited same logic from Uniscribe to make it just work
diff --git a/src/hb-directwrite.cc b/src/hb-directwrite.cc
index af0fd3d..fd8ab5c 100644
--- a/src/hb-directwrite.cc
+++ b/src/hb-directwrite.cc
@@ -739,6 +739,11 @@
#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,
clusters,
textProperties,
@@ -747,7 +752,7 @@
glyphProperties,
actualGlyphs,
fontFace,
- face->get_upem(),
+ font_size * x_mult,
FALSE,
FALSE,
&runHead->mScript,