Re: Pango device units



On Thu, 2003-08-28 at 15:43, Pawel S. Veselov wrote:
Owen,

Yeah, I'm aware of PANGO_SCALE being a multiplier between device
units and pango units, but it doesn't seem to me that the device
units are actually pixels. If I set a font, say "Sans 10" for
pango layout, or call the pango_font_description_set_size(desc, 10),
the pango_layout_get_pixel_size() returns like 14 for the height.

Oh, you mean "it doesn't seem to me that the device units are
actually points". The points <=> device units conversion isn't 
something that is available at the current time.,

 http://mail.gnome.org/archives/gtk-i18n-list/2003-August/msg00001.html 
 (Includes how to get it if you know you are using Xft2, and
 are willing to have a bunch of hacky code)

 http://bugzilla.gnome.org/show_bug.cgi?id=119081

Basically, what I'm trying to do is to figure the largest font size
while fitting text in a box... If I keep scaling down until
pango_layout_get_pixel_size() returns the height I need, the
text becomes extremely small and unreadable...

No, I don't understand that. pango_layout_get_pixel_size()
returns how big the layout is in pixels.

Regards,
                                        Owen






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