Points vs device units (PDF surface + Pango)

Mikael Claesson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

I'm having some trouble with Pango and the PDF backend. I'm wondering what the device unit is for PDF surfaces. I would have expected it to be points. But if it was then wouldn't these two calls be equivalent?

      pango_font_description_set_size( font_desc, 12 * PANGO_SCALE );

      pango_font_description_set_absolute_size( font_desc, 12 * PANGO_SCALE );

I'm getting different text sizes, with a ratio close to 72:96.

What confuses me most it that to get the same text size as I get in LibreOffice when using  the same font I need to specify the absolute size, which does seem to indicate that the device unit is indeed points? So why doesn't pango_font_description_set_size() work? It is as if Pango doesn't know what the ratio between points and device units should be for the surface. Almost as if it believes that it is an image surface with 96 DPI?

So, is pango_font_description_set_absolute_size() the correct function to use for PDF surfaces?

Best regards,

Mikael

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