Re: PDF: Font size is rounded
Kouhei Sutou <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
Hi, In <[email protected]> "Re: [cairo] PDF: Font size is rounded" on Sat, 2 Apr 2016 14:16:27 +1030, Adrian Johnson <[email protected]> wrote: > I put some printfs in _cairo_ft_scaled_glyph_init (in cairo-ft-font.c). > It appears that FreeType is returning hinted metrics. I'm guessing that > to get unhinted metrics of TrueType fonts we need to set the scale to > the EM size like we do for win32 fonts. > > I'm attaching a patch to do this. It fixes your test case. I don't know > if this patch is the correct way to fix the problem. I am not familiar > with the FreeType font backend. Thanks for the patch. I've also confirmed that the patch fix this case. With the patch: http://pub.cozmixng.org/~kou/tmp/truetype-size-with-cairo-patch.pdf Without the patch: http://pub.cozmixng.org/~kou/tmp/truetype-size-without-cairo-patch.pdf And explicit CAIRO_HINT_METRICS_OFF isn't needed. Source: http://pub.cozmixng.org/~kou/tmp/truetype-size-without-explicit-hint-metrics-off.c I hope that this patch is included into the next cairo release. Thanks, -- kou -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo