A curious bug

Vasil StanevVasil Stanev Posts: 432
edited June 2018 in Technique and Theory
Hi,
when I tried to export a .vfb file, FL5 gave me this warning:
for the TTF: [X] <font-name> cmap{plat=3,script=1,lang=0}: multiple glyphs uni0218 Scommaaccent mapped to code <218>
and for the OTF:
[WARNING] <X> Pair positioning has two different values in 'kern' feature; choosing the smaller absolute value: X f
[WARNING] <X> Pair positioning has two different values in 'kern' feature; choosing the smaller absolute value: X q
[WARNING] <X> Pair positioning has two different values in 'kern' feature; choosing the smaller absolute value: X g
[NOTE] <X> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 473]
[NOTE] <X> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 474]
[NOTE] <X> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 475]
[NOTE] <X> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 476]
[NOTE] <X> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 477]
where X stands for the name of the font.
The OTF couldn't even be opened with the MS font viwer. HOWEVER, when I opened the exported TTF and save the OTF from it, lo and behold, it is visible!

????????

Also, I hat a glyph in the /percent cell, but the good folk at MyFonts could not see it in the OTF/TTF versions and asked me to create a  % U+0025 PERCENT SIGN. What should have been a simple matter of adding glyphs turned into a quagmire. What baffles me the most is that 2 months ago they got the exported files, so there should have been no exporting trouble then. 

Comments

  • To deal with that warning message, you're gonna have to go through your kerning classes with a fine tooth comb. It could be actual duplications, with the same glyph named in multiple classes or it could be the wrong side bearing is activated somewhere.

  • Chris LozosChris Lozos Posts: 1,167
    also, be sure you are rebuilding your kern feature.
  • Vasil StanevVasil Stanev Posts: 432
    I am not sure which of the duplicated glyphs to remove. I went with the unicodes, e.g. I removed Ygrave, ygrave for uni1EF2, 1EF3, which as far as I can gather are Vietnamese with tone marks.

    Matters got worse:  :#

    Start of new pair positioning subtable; some pairs may never be accessed: [T Tcaron Tcommaaccent uni1E6A uni021A uni1E6E uni1E70] [A Aacute Agrave Atilde Adieresis Aogonek Amacron Abreve Aring Acircumflex uni01DE uni0226 uni1E00 uni1EA0 uni1EA2 uni1EA4 uni1EA6 uni1EA8 uni1EAA uni1EAC uni1EAE uni1EB0 uni1EB2 uni1EB4 uni1EB6 ] [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 485]
  • Chris LozosChris Lozos Posts: 1,167
    check your {locl} feature code.
  • Ray LarabieRay Larabie Posts: 925
    Check for duplicate kerning class names.
  • Kent LewKent Lew Posts: 894
    That latest warning looks like someone or something attempted to create subtables for the kerning in order to prevent overflow and, in the process, split the class kerning in such a way as to orphan some pairs in the subsequent subtable.

    It seems like the kerning structure and groups definitions needs to be carefully evaluated and cleaned up. Most of these errors look to me to be the result of conflicts in these two data sets.
  • Vasil StanevVasil Stanev Posts: 432
    I removed three kerning pairs: Xq, Xf and Xg. this seems to reduce error warnings/notes to
    [WARNING] <Ergam> Glyph class @Ergam redefined [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 21]
    [WARNING] <Ergam> Glyph class @Ergam redefined [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 33]
    [WARNING] <Ergam> Glyph class @Ergam redefined [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 36]
    [NOTE] <Ergam> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 479]
    [NOTE] <Ergam> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 480]
    [NOTE] <Ergam> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 481]
    [NOTE] <Ergam> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 482]
    [NOTE] <Ergam> Removing duplicate glyph <O> [C:/Users/PC-Admin/Documents/FontLab/Studio5/fontlab.fea 483]
    but I still can't build a valid OTF. Also, i do not see .fea files at the above location. I am not certain if the TTF got built right, some kerning pairs seem a little off.

    I'm afraid I have no idea what subtables are and what exactly duplicates:

    @_A=[A  Aacute Abreve Acircumflex Adieresis Agrave Amacron Aogonek Aring Atilde];







  • Mark SimonsonMark Simonson Posts: 1,160
    edited June 2018
    I haven't used FontLab for a while now and there's so much I've forgotten, but a thing I remember doing to avoid this kind of problem: When you define kerning classes, make sure they only are used for the left or right side of a pair. When I made classes that could be used on either side of a pair (usually symmetrical glyphs, like A or T), that's when I would get into trouble with "duplicate glyph" problems. At least that's how I remember it.

    FYI, I think the .fea file is something that is generated temporarily and then removed when you generate a font. That's why you can't find it. If you do "Save features..." from the OpenType panel, I think you can generate that file manually to inspect where the problems are occurring. The line numbers in the error message should correspond to lines in the manually generated .fea file. But, like I say, it's all a bit hazy to me.

    Also, have you tried asking on the FontLab forum?
  • Vasil StanevVasil Stanev Posts: 432
    Thank You for the information. No, it did not occur to me that there is a FontLab forum. Pretty obvious now that You mention it that I should have asked there. 
  • Vasil StanevVasil Stanev Posts: 432
    edited June 2018
    I had the sense to recreate the conditions that led to the whole problem. Somewhere along the line when I copy-pasted some glyph cells directly between two versions of the .vfb work file, I have removed the OTF tables:

    After I manually copy-pasted the Beziers themselves into the receiving cell, everything went well.
    But I learned much here and hope other people and my future me will too. :) Thank you all!
  • Thomas PhinneyThomas Phinney Posts: 1,685
    Glad this got solved!

    I mostly agree with Mark Simonson. While I have no problem with having a "both sides" class, it means that I can't use any glyph in that class *also* in a single-side class. So generally, I end up using glyphs only in single-side classes because it is more flexible. The existence of the Æ means that putting all my cap A's in a both-sides class is not feasible. So it effectively means I might as well have a single-side classes only, for the A.
Sign In or Register to comment.