Drawing without going through the layout (gtkmm, pangomm)



Is there any documentation related to using Pango to draw text without
going through the layout engine?
All I need is:
Given a string and font:
- get the measurements of that string in that font
- draw that string in that font

For the first, I've tried going through Glib::ustring, AttrList,
ListHandle_Item, GlyphString, Rectangle, FontDesc and Font, but I get
very strange values for the sizes (bearings and widths in the tens of
thousands).

Is there a worked example that just draws text without any special
processing?  Or should I just go through Cairo?

(Reason:  I'm porting a Windows app with its own layout engine in
portable code.  As such, I can't go through Pango's engine.)


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