Re: Pango, set height in pixels
- From: Alex Larsson <alexl redhat com>
- To: Havoc Pennington <hp redhat com>
- Cc: Dennis Bjorklund <db zigo dhs org>, <gtk-list gnome org>
- Subject: Re: Pango, set height in pixels
- Date: Mon, 14 Jan 2002 10:30:31 -0500 (EST)
On Mon, 14 Jan 2002, Alex Larsson wrote:
> On 13 Jan 2002, Havoc Pennington wrote:
>
> >
> > Dennis Bjorklund <db zigo dhs org> writes:
> > > The doc of pango_font_description_set_size () says
> > >
> > > size : the size for the font description in pango units. (PANGO_SCALE
> > > pango units equals one point)
> >
> > PANGO_SCALE pango units equals one "device unit" which for the screen
> > is pixels and for printed output would probably be points. The docs
> > there are broken, yeah. I'll fix them.
>
> No. This is wrong. All Pango units are in points, but scaled by
> PANGO_SCALE (1024) in order to support fractional values in an integer
> type.
>
> There is no way to specify the pixel size of a font in pango.
Uhm. Replying to myself here. This is not entierly correct.
Specifying *font sizes* in Pango is always in points*1024, but units you
get from pango_layout_get_extents() and other extents measurements are in
device units*1024 (pixels for the screen).
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]