pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font sizes


From: Ben Pfaff
Subject: Re: font sizes
Date: Mon, 28 Jun 2010 08:02:47 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

John Darrington <address@hidden> writes:

> On Sun, Jun 27, 2010 at 03:53:53PM -0700, Ben Pfaff wrote:
>
>      My experience is:
>      
>              * For on-screen display, pango_font_description_set_size
>                is correct, because it scales fonts by the same factor
>                as other programs on my computer (106 dpi for my
>                machine), so fonts look the same size as with other
>                programs.
>      
>              * For PDF, pango_font_description_set_size does the wrong
>                thing.  I think that this is because it *still* scales
>                fonts by the fontconfig dpi.  10pt * (106/72) is
>                14.7pt, so that would explain the huge fonts in my
>                printouts.
>      
>              * For PDF, pango_font_description_set_absolute_size does
>                the right thing, because the PSPP cairo driver is
>                designed so that cairo device units match Pango font
>                units 1:1 so that I can be less confused while working
>                on the code.
>      
> The documentation for pango_cairo_font_map_set_resolution says:
>
>  This is a scale factor between points specified in a PangoFontDescription 
> and 
>  Cairo units. The default value is 96, meaning that a 10 point font will be 
>  13 units high. (10 * 96. / 72. = 13.3).
>
> I agree that the docs are not terribly helpful.

I knew about that, but I always assumed that it only applied to
devices that don't have a native dpi, such as pixmaps and
screens.  It seems awfully stupid to apply an arbitrary "dpi"
scale factor to devices that have a real native dpi, such as PDF
and PostScript devices.

I guess we need to do different things based on what kind of
device we've got?
-- 
"GNU does not eliminate all the world's problems,
 only some of them."
--Richard Stallman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]