freetype
[Top][All Lists]
Advanced

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

RE: [ft] WG: Character Width Problem


From: Anton Zemlyanov
Subject: RE: [ft] WG: Character Width Problem
Date: Thu, 6 Oct 2005 16:21:41 +0400

Martin,

 

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).

 

Anton

 

 


From: address@hidden [mailto:address@hidden On Behalf Of Martin Schollerl
Sent: Thursday, October 06, 2005 3:13 PM
To: address@hidden
Subject: [ft] WG: Character Width Problem

 

Dear sirs,

 

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.

 

Our problem is, that the character widths returned by Freetype differs immensely to those delivered by GetCharWidth32. In one of our test – cases every printed line differs from 0.5 to 1 cm. In this case the average character width returned by freetype is smaller than the average from GetCharWidth32.

 

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?

 

Best regards,

 

 

Martin Schöllerl

Teammanager Software Development

 

_________________________________________

 

INVARIS Informationssysteme GmbH

INVARIS Center

A-7000 Eisenstadt

 

Tel.:  +43 (0)2682/ 64 000-512

Fax:  +43 (0)2682/ 64 000-900

e-mail:    address@hidden

Internet:  www.invaris.com

_________________________________________

 


reply via email to

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