|Subject:||RE: [ft] WG: Character Width Problem|
|Date:||Thu, 6 Oct 2005 16:21:41 +0400|
FreeType is a font (face) rendering engine, not a word processor. This is for FT user to build a text line from the individual glyphs. For TT fonts, “char width” is useless because chars (Glyphs) can be overlapped. Width of a string is not a sum of widthes of individual chars. I use the following method:
StringWidth = sum(AdvanceWidths) – LeftBearingFirstChar – RightBearingLastChar;
This is not very precise but it works for me.
Are you sure font sizes are indentical (the same point size and dpi in both applications, MS uses 96dpi)? Are you sure byte interpreter is on? Personally I was very surprised when I’ve got the “bit-exact” strings in Word and using my own algorithm using FT2 on Linux (22.5 points at 50% Word and 15points at 72ppem FT2).
[mailto:address@hidden On Behalf Of Martin Schollerl
we changed our windows-font-handling to freetype (version 2.1.4) to be platform-independent.
Our product runs on Windows-System as well as on Unix-Derivates.
What are the differences between those two functions? Does freetype use an other algorithm than the GDI-Functions? Can we do anything to get the same widths in both cases?
INVARIS Informationssysteme GmbH
Tel.: +43 (0)2682/ 64 000-512
Fax: +43 (0)2682/ 64 000-900
|[Prev in Thread]||Current Thread||[Next in Thread]|