Page 1 of 1

Kerning pairs not exporting?

Posted: Sat May 17, 2014 11:11 pm
by sammi
Hi, I'm new here. :)

So I'm making (not really designing per se) my own implementation of the American road sign fonts. I had an idea to implement arbitrary fractions, using superior and inferior digits and the fraction slash:
Image

Then I have some kerning pairs between the digits and the fraction slash:
Image

I export the font with both `kern` and `GPOS`-style kerning and the default OpenType script, but it doesn't really work:
Image

There's really not much need for arbitrary fractions, so my users currently just use the pre-built composite fractions (¼½¾⅐⅑⅒⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞). Still, they would love me so much if I made this work! :D

This is the font I am working on:
RG2014StdEM.ttf
(14.24 KiB) Downloaded 367 times
Thanks in advance! ~Sammi

EDIT: The screenshot above is from this program: TrueType Viewer. I click the Features button to find the kern feature unchecked. Checking it makes the kerning work perfectly, but I assume this wouldn't work in other programs. Why is kerning optional? :roll:

Re: Kerning pairs not exporting?

Posted: Sun May 18, 2014 4:01 am
by Bhikkhu Pesala
Not all programs will support GPOS tables, and as far as I know the older KERN table won't kern glyphs in the Private Use Area.

Design your fraction slash to work with fractions, i.e. use a narrow advance width and large negative side-bearing.
Fraction Slash.png
Fraction Slash.png (6.27 KiB) Viewed 5659 times
BTW: Scientific Inferiors (sinf) are usually below the baseline, use Denominators (dnom) instead.
Arbitrary Fraction.png
Arbitrary Fraction.png (3.25 KiB) Viewed 5659 times

Re: Kerning pairs not exporting?

Posted: Mon May 19, 2014 3:10 pm
by sammi
None of those glyphs are in the Private Use Area. Those characters are mapped to $2070,$B9,$B2,$B3,$2074-$2079 (superscripts) and $2080-$2089 (subscripts).

The .sinf suffix was added by FontCreator itself when I added $2080-$2089. I've changed .sinf to .dnom and the superscripts to .sups in order to enable the automatic OpenType fractions.

As for the fraction slash, I need to have the numbers at a specific distance from the slash (in this case, the width of the slash). While I can reduce the bearings on the slash, I can't place the numbers consistently without kerning. I tried doing that and removing the kerning pairs, and as expected, it worked for some fractions but not others:

Image

Re: Kerning pairs not exporting?

Posted: Tue May 20, 2014 4:54 pm
by Bhikkhu Pesala
sammi wrote:The .sinf suffix was added by FontCreator itself when I added $2080-$2089. I've changed .sinf to .dnom and the superscripts to .sups in order to enable the automatic OpenType fractions.
That's correct — the subscripts are usually below the baseline. Denominators usually sit on the baseline, though there is no hard and fast rule how they are designed. I copy/paste superscript glyphs to create denominators as composites, then I move them down to the baseline — they are unmapped.
sammi wrote:I can't place the numbers consistently without kerning.
It can be done. I don't know why kerning of subscripts with fraction slash does not work.

Re: Kerning pairs not exporting?

Posted: Mon May 26, 2014 11:46 pm
by David Webber
I'd really like to get to the bottom of this one too. Here are three pairs defined with kerning in the preview window:
Preview toolbar
Preview toolbar
preview-toolbar.png (4.47 KiB) Viewed 5604 times
and in the test window:
test window
test window
testwindow.png (1.14 KiB) Viewed 5604 times
The kerning shows on all three in the preview toolbar but only on the AV in the test window!

The delta is the Greek Capital at U+0394 and the natural sign is a standard 'miscellaneous symbol' at U+266E, so they're not really that peculiar.

I suspect that the code which draws the test window uses similar Windows APIs to what I'm using in my program, so it would be useful to know what the preview toolbar and test window do differently!

Dave

Re: Kerning pairs not exporting?

Posted: Thu Jun 12, 2014 4:06 pm
by Bhikkhu Pesala
See this other thread.

I think the problem will be fixed soon, so your kerning pairs with fraction slash will be exported.

Re: Kerning pairs not exporting?

Posted: Fri Jun 13, 2014 11:03 am
by Erwin Denissen
I've tried to see if the upcoming update of FontCreator would make a difference here, but unfortunately no improvements were found.

The Test dialog (which uses the kerning information from the OpenType layout feature tables) fails to process the first kerning pair (Delta seven), so I suspect Windows (Uniscribe) refuses to display it. Word 2007 uses the old kern table, and fails to show the second kerning pair (Latin capital A with Music natural sign $266E).

So it seems like a shortcoming or bug within Windows, Microsoft Word, or both.