[pygtk] Text handling within PyGTK questions

Art Haas ahaas at airmail.net
Thu Aug 26 23:29:37 WST 2004


On Wed, Aug 25, 2004 at 10:34:12PM -0700, Andrew P. Lentvorski, Jr. wrote:
> 
> On Aug 25, 2004, at 3:09 PM, Art Haas wrote:
> 
> >The pango module does currently provied get_line_count(), get_size(),
> >and get_pixel_size() methods for pango.Layout instances, and these
> >methods are indespensible for determining the size of some blob of 
> >text.
> 
> Actually, you might want to go down to the level of using Freetype
> directly rather than through Pango.  Unfortunately, I don't know
> of any good wrappers for Freetype in Python.

I've got to stick with Python, so interfacing to Freetype is not
possible unless a wrapper exists.

> >I'm certain that text scaling problems like the ones I'm dealing with
> >have occured before, and I'm hoping that some of the list readers can
> >share a little of that knowledge. Thanks in advance.
> 
> These problems have occurred before, but the professional packages
> I have seen dodged the issue by having their own vector fonts and their
> own font renderers.

Another option I can't take. I never liked the stick-figure fonts in
the CAD packages I'd used (ME-10 mostly, AutoCAD long ago).

Art
-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822


More information about the pygtk mailing list