[cairo] PDF: Font size is rounded
Kouhei Sutou
kou at cozmixng.org
Fri Apr 1 10:33:19 UTC 2016
Hi,
The specified font size of scaled TrueType font is rounded
when PDF surface is used. Is it the expected behavior?
Details:
Here is a program that reproduces the behavior:
https://savannah.nongnu.org/bugs/download.php?file_id=36806
Here is the output of the program:
https://savannah.nongnu.org/bugs/download.php?file_id=36804
8.000, 8.125, 8.250 and 8.375 are the same font size.
8.500, ... and 9.375 are the same font size.
It's caused since FreeType 2.4.6. FreeType 2.4.6 includes
the change:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b0962ac34e66052ccfee7996e5468f30d4bd5a72
If I revert the change by
https://savannah.nongnu.org/bugs/download.php?file_id=36807 ,
the program outputs the following PDF:
https://savannah.nongnu.org/bugs/download.php?file_id=36805
In the PDF, 8.000 and 8.125 are the different font size.
I send a question about whether the change is expected or
not to FreeType developers
https://savannah.nongnu.org/bugs/?47582 , a developer said
that it's expected:
https://savannah.nongnu.org/bugs/?47582#comment2
He also said that the use case may be better handled by
high-level library:
https://savannah.nongnu.org/bugs/?47582#comment8
So I send this question to here. Maybe I should send this
question to Pango. Pango also has the same behavior with
PangoCairoFontMap.
Thanks,
--
kou
More information about the cairo
mailing list