Re: Alignment of baseline



On Fri, Jun 11, 2010 at 07:11:21PM -0400, Behdad Esfahbod wrote:
> On 06/10/2010 06:04 PM, Lutz Gehlen wrote:
> > Therefore I subtract the value of pango_layout_get_baseline from the
> > desired y position. My unsureness lies with the transformation of
> > the return value of pango_layout_get_baseline into Cairo device
> > units. Currently, I am using the PANGO_PIXELS() macro to do that. It
> > seems to work, but I am still wondering if it is the right way to do
> > it and specifically if it will work on different Cairo surfaces,
> > with font sizes different from the default size and so on.
> 
> Use pango_units_to_double().

Thanks, Behdad, that was what I was looking for.
Cheers,
Lutz


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