freetype
[Top][All Lists]
Advanced

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

RE: [ft] How to get the char width (bitmap width) without rendering


From: Jaco van der Westhuizen
Subject: RE: [ft] How to get the char width (bitmap width) without rendering
Date: Wed, 24 May 2006 13:46:57 +0200

Hi all,

..first post.

To the creator of FreeType, I have successfully integrated FreeType into
a GIS engine I developed and FT is simply awesome!

I wrote a very basic c++ wrapper around freetype that supports the basic
stuff you would do with truetype fons, rotation, scaling, different
colors, outlining, nounding box calculations etc...

It is dependent on some other stuff, but if any of you are interested in
it I can put it somewhere for your full use as you like. (You will
ofcourse have to modify it to get it to compile as it depends on other
windows specific GDI rendering stuff for the GIS engine).

Or drop me a mail at 

jacovdw0000 at hotmail.com 

And I'll send you the files.

(PS, this wrapper is largely based on one of the sample implementations
that came with FR 2.1.10)


Thanks
Jaco.
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Werner LEMBERG
Sent: 24 May 2006 13:35
To: address@hidden
Cc: address@hidden
Subject: Re: [ft] How to get the char width (bitmap width) without
rendering



> I need get the string width before drawing.  So how to get the char 
> width (bitmap width) without rendering ?

If you need exact values, you have to render it (and caching the created
bitmaps for efficiency).  This is because some formats like TrueType
adjust the advance width values during the hinting process.

Otherwise, loading the glyphs is sufficient to extract the linear
advance width.


    Werner


_______________________________________________
Freetype mailing list
address@hidden http://lists.nongnu.org/mailman/listinfo/freetype




reply via email to

[Prev in Thread] Current Thread [Next in Thread]