fontforge/fontforge — pull request #1989 by catharanthus (2014-12-10 08:03:24+00:00)
Title: An option to exclude non-BMP glyphs from the old-style kern table

Under Microsoft Windows, non-OpenType-aware applications use [GetKerningPairs()] (http://msdn.microsoft.com/en-us/library/windows/desktop/dd144895%28v=vs.85%29.aspx) API function to obtain kerning information from the old-style *kern* table. Unfortunately, Windows has a "feature" that if *kern* table contains at least one unencoded glyph (or a glyph encoded outside of the BMP), GetKerningPairs() returns 0 (zero) kern pairs, i.e. kerning doesn't work at all. Since the old-style *kern* table is intended primarily for non-OpenType-aware applications, which can't access unencoded glyphs in the first place, the *kern* table with unencoded glyphs is thus almost useless, at least on Windows.

Currently FontForge only warns the user if there are any non-BMP glyphs in the *kern* table, but doesn't offer any solution apart from disabling the old-style *kern* table altogether. The proposed patch implements an option, accessible both via "Generate fonts" dialog and scripting interface, to automatically exclude non-BMP glyphs from the *kern* table.

Some additional information about the GetKerningPairs() behavior:

* http://sourceforge.net/p/fontforge/mailman/message/23103450/
* http://forum.fontlab.com/index.php?topic=8910.0