[NTG-context] Problems with ttc-fonts

Ulrike Fischer news3 at nililand.de
Fri Apr 29 09:51:36 CEST 2016

I was playing with the addfeature handler mentioned here
https://mailman.ntg.nl/pipermail/ntg-context/2016/083952.html and
run into a problem with ttc-fonts:

    fonts.handlers.otf.addfeature {
        name = "oneb",
            type = "substitution",
            data = {
                ["1"] = "period",
        "feature test",
\font\test= name:LatinModernRoman:+oneb \test


\font\test= name:cambria:+oneb \test



This gives:


So with latin modern it works fine, while with cambria the first
letter of the substituation is used. 

The used fonts are:

filename=lmroman10-bold.otf filetype=otf format=otf

filename=c:/windows/fonts/cambria.ttc format=ttc
foundname=c:/windows/fonts/cambria.ttc usedmethod=direct

(I have no idea why the bold version of lm is used, but I don't care

Looking at the tma I see one difference between both fonts:
glyphs in cambria have no "name". A typical entry looks like this

   ["boundingbox"]={ 109, 0, 311, 232 },

while with latin modern it looks like this:

   ["boundingbox"]={ 81, 0, 237, 156 },
Is is normal that glyph of ttc-fonts have no name data? If yes how
should one do substituations in such fonts? 

Ulrike Fischer 

More information about the ntg-context mailing list