Re: PDF: Font size is rounded

Adrian Johnson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 01/04/16 21:03, Kouhei Sutou wrote:
> Hi,
> 
> The specified font size of scaled TrueType font is rounded
> when PDF surface is used. Is it the expected behavior?

The PDF surface should turn off hinting metrics when generating PDF
output. Have you tried checking the metrics returned by
cairo_scaled_font_glyph_extents()?. Use cairo_set_font_options() to turn
off hinting metrics when doing this.


> 
> 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
> 

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.