What you're seeing here is hinting being scaled up. By default things
are set up so the DirectWrite and CoreText generally aren't hinting
the metrics (though they still may with some fonts). The
implementation of drawString gets the glyph metrics from the font
object (which is a size 1 with normal hinting) and then creates the
text blob with those metrics. This text blob is then scaled up and
drawn. The glyphs are drawn with the scale known and aren't actually
size 1 with normal hinting scaled up (which is something I don't think
we directly support at the moment, though you might be able to emulate
it by getting paths and scaling those up).
In theory drawString could take the matrix into account when getting
the glyph metrics, however it's something of a test only method anyway
(at least at the moment it makes no attempt to do any proper shaping
or anything beyond simple char to glyph mapping). At the moment the
right thing to do for such test string printing would be to set
'font.setLinearMetrics(true);' which will get the linear glyph metrics
which can scale freely (and maybe set the hinting to slight or none if
you want the glyphs to match).
> --
> You received this message because you are subscribed to the Google Groups "skia-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
skia-discuss...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/skia-discuss/b76e4832-771c-4859-8171-a9cd041536aan%40googlegroups.com.