Re: Accessing get_ascent/get_descent from a FontDescription
- From: Behdad Esfahbod <behdad behdad org>
- To: Alex Faucher <afaucher cetoncorp com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Accessing get_ascent/get_descent from a FontDescription
- Date: Sun, 28 Jan 2007 02:35:08 -0500
Hi Alex,
On Wed, 2007-01-10 at 18:12 -0800, Alex Faucher wrote:
> I'm tasked with doing some very precise font positioning. In order to
> do this it seems I need to access the ascent/descent from the
> FontMetrics class. I've spent quite a bit of time with the
> documentation (mostly gtkmm, but I can use the c bindings if thats the
> only way) and I am unable to see how I can get a FontMetrics class from
> a PangoFontDescription or a textual description "Times New Roman"
> Preferably the translation would be short, but I can modify our font
> management to keep the result if nessicary. Does anyone have any
> recommendations as to how I can get at these metrics?
You can get the font metrics for a font using pango_font_get_metrics().
You get the PangoFont either from a pango_itemize(), PangoLayout, or
pango_font_map_load_font(), depending on what you want to do.
> Thanks,
> Alexander Faucher
>
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]