[Top][All Lists]
[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: |
Werner LEMBERG |
Subject: |
Re: [ft] How to get the char width (bitmap width) without rendering |
Date: |
Wed, 24 May 2006 13:35:07 +0200 (CEST) |
> 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