Re: PangoFontMetrics
- From: "Venkat Ramakrishnan" <venkat_ramakrishnan hotmail com>
- To: hp redhat com
- Cc: gtk-list gnome org
- Subject: Re: PangoFontMetrics
- Date: Sat, 09 Mar 2002 18:18:28 +0000
From: Havoc Pennington <hp redhat com>
If you need ascent/descent probably you could get the PangoLayoutLine
from the layout and get the geometry of the lines. The extents of the
line are given relative to the baseline, so the Y value is "-ascent"
essentially. Also if you use PangoLayoutIter you can iterate over the
lines in the layout and get the baseline of each one.
Out of curiosity, what are you using ascent/descent for?
The font comes from the PangoContext used to create the layout by
default, and can be overridden with a PangoAttrList. You should not
need to call pango_load_font(), you should only need to provide a
PangoFontDescription to PangoAttrList, for a non-default font.
Havoc
Thanks Havoc,
I am new to gtk+ so also to pango and I read Pango is the thing
to use for application using fonts etc . I am designing a UI for
a application (a user interface for a mediaplayer) on Linux. I have
so many text strings to display ,with various font and color, so that it
looks attractive :).
I calculate the max ascent/descent returned for each string so that
I can allocate the space for each string propely in a table kind of thing.
The reason of using the PangoMetrics is only the name suggests
I can get all the above parameters from it only .
Thanks again . I think I need to study more on Pango.
venkat
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]