[Top][All Lists]

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

[ft] Using FreeType for matching font metrics

From: Martin Kotulla (SoftMaker)
Subject: [ft] Using FreeType for matching font metrics
Date: Wed, 23 Oct 2013 12:12:09 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0


I am looking at the following problem and hope that FreeType allows me to implement a solution:

Office documents are created by our customers on Windows using fonts that are available there. These document shall then be rendered by our software on other platforms (such as Linux). When the original font is missing, we currently use a replacement font that is available on the destination platform.

The replacement font has different metrics, so line breaks and sometimes even page breaks will vary (the Office files contain no linebreak information; a paragraph is just a stream of characters). This is something we wish to avoid. Breaks should be the same as on the PC the documents have been created on.

My idea is to create a Multiple Master font with a "width" axis and provide this as a replacement font. Our software would then use FreeType to create a font instance from the Multiple Master font where each glyph is individually scaled so that it mimics the width of the same character in the original font.

As far as I can see, the FreeType API provides functions for creating instances from Multiple Master fonts, but the same design vector is applied to all characters.

Is it possible to apply individual design scalings to individual glyphs?

Note that this is not the same as just scaling glyphs. Such scaling leads to unpleasant looks because the ratio of vertical and horizontal stem widths is not preserved.

Any hints or ideas appreciated.

Martin Kotulla

reply via email to

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