A curious bug

Vasil Stanev
Vasil Stanev Posts: 775
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 Lozos
    Chris Lozos Posts: 1,458
    also, be sure you are rebuilding your kern feature.
  • Vasil Stanev
    Vasil Stanev Posts: 775
    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 Lozos
    Chris Lozos Posts: 1,458
    check your {locl} feature code.
  • Ray Larabie
    Ray Larabie Posts: 1,436
    Check for duplicate kerning class names.
  • Kent Lew
    Kent Lew Posts: 944
    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 Stanev
    Vasil Stanev Posts: 775
    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:

    <div class="Quote">@_A=[A&nbsp; Aacute Abreve Acircumflex Adieresis Agrave Amacron Aogonek Aring Atilde];<br>@_AE=[AE&nbsp; E Eacute Ecaron Ecircumflex Edieresis Edotaccent Egrave Emacron Eogonek OE];<br>@_H=[B&nbsp; D Dcaron E Eacute Ecaron Ecircumflex Edieresis Edotaccent Egrave Emacron Eogonek F H I Iacute Icircumflex Idieresis Idotaccent Igrave Imacron Iogonek Itilde K Kcommaaccent L Lacute Lcaron Lcommaaccent M N Nacute Ncaron Ncommaaccent Eng Ntilde P Thorn R Racute Rcaron Rcommaaccent];<br>@_O=[C&nbsp; Cacute Ccaron Ccedilla Cdotaccent G Gbreve Gcommaaccent Gdotaccent O Oacute Ocircumflex Odieresis Ograve Ohungarumlaut Omacron Oslash Otilde OE Q];<br>@_C=[C&nbsp; Cacute Ccaron Ccedilla Cdotaccent];<br>@_O=[D&nbsp; Eth Dcaron Dcroat O Oacute Ocircumflex Odieresis Ograve Ohungarumlaut Omacron Oslash Otilde];<br>@_Eth=[Eth&nbsp; Dcroat Lslash];<br>@_G=[G&nbsp; Gbreve Gcommaaccent Gdotaccent];<br>@_H=[H&nbsp; I Iacute Icircumflex Idieresis Idotaccent Igrave Imacron Iogonek Itilde M N Nacute Ncaron Ncommaaccent Ntilde];<br>@_Hbar=[Hbar&nbsp; Eng d dcroat i i.loclTRK igrave iogonek lacute lcommaaccent tbar f_f_i f_f_l fi fl ordfeminine ordmasculine backslash underscore braceright bracketright asciitilde uni00B5 bar asciicircum];<br>@_K=[K&nbsp; Kcommaaccent];<br>@_L=[L&nbsp; Lacute Lcaron Lcommaaccent Lslash];<br>@_R=[R&nbsp; Racute Rcaron Rcommaaccent];<br>@_S=[S&nbsp; Sacute Scaron Scedilla Scommaaccent];<br>@_T=[T&nbsp; Tbar Tcaron uni0162 uni021A];<br>@_U=[U&nbsp; Uacute Ucircumflex Udieresis Ugrave Uhungarumlaut Umacron Uogonek Uring Utilde];<br>@_W=[W&nbsp; Wacute Wcircumflex Wdieresis Wgrave];<br>@_Y=[Y&nbsp; Yacute Ycircumflex Ydieresis Ygrave];<br>@_Z=[Z&nbsp; Zacute Zcaron Zdotaccent];<br>@_a1=[a&nbsp; aacute abreve acircumflex adieresis agrave amacron aogonek aring atilde];<br>@_a=[a&nbsp; aacute aogonek aring ae cent infinity partialdiff];<br>@_abreve=[abreve&nbsp; acircumflex adieresis agrave amacron atilde];<br>@_ae=[ae&nbsp; e eacute ecaron ecircumflex edieresis edotaccent egrave emacron eogonek o oacute ocircumflex odieresis ograve ohungarumlaut omacron oslash otilde oe];<br>@_asterisk=[asterisk&nbsp; registered trademark];<br>@_b1=[b&nbsp; h hbar i i.loclTRK iogonek k kcommaaccent l lacute lcaron lcommaaccent thorn];<br>@_b=[b&nbsp; p thorn];<br>@_braceleft=[braceleft&nbsp; bracketleft parenleft];<br>@_braceright=[braceright&nbsp; bracketright parenright];<br>@_c1=[c&nbsp; cacute ccedilla e eacute eogonek o oacute oslash oe];<br>@_c=[c&nbsp; cacute ccaron ccedilla cdotaccent];<br>@_ccaron=[ccaron&nbsp; eth ecaron edieresis egrave emacron odieresis ograve omacron otilde];<br>@_cdotaccent=[cdotaccent&nbsp; ecircumflex edotaccent ocircumflex ohungarumlaut];<br>@_colon=[colon&nbsp; semicolon];<br>@_comma=[comma&nbsp; ellipsis period quotedblbase quotesinglbase];<br>@_d=[d&nbsp; dcaron dcroat gbreve gcommaaccent gdotaccent q];<br>@_dcaron=[dcaron&nbsp; lcaron];<br>@_emdash=[emdash&nbsp; endash hyphen];<br>@_f1=[f&nbsp; f_f f_f_i f_f_l fi fl];<br>@_f=[f&nbsp; f_f];<br>@_g=[g&nbsp; gbreve gcommaaccent gdotaccent];<br>@_h=[h&nbsp; hbar m n nacute ncaron ncommaaccent eng ntilde];<br>@_iacute1=[iacute&nbsp; icircumflex idieresis imacron itilde];<br>@_iacute=[iacute&nbsp; ncaron rcaron];<br>@_icircumflex=[icircumflex&nbsp; idieresis igrave imacron itilde];<br>@_k=[k&nbsp; kcommaaccent kgreenlandic];<br>@_kgreenlandic=[kgreenlandic&nbsp; m n nacute ncommaaccent eng ntilde r racute rcommaaccent];<br>@_quotedbl=[quotedbl&nbsp; quotesingle degree];<br>@_quotedblleft=[quotedblleft&nbsp; quoteleft];<br>@_quotedblright=[quotedblright&nbsp; quoteright];<br>@_r=[r&nbsp; racute rcaron rcommaaccent];<br>@_s1=[s&nbsp; sacute scaron scedilla scommaaccent];<br>@_s=[s&nbsp; sacute scedilla scommaaccent];<br>@_t1=[t&nbsp; tbar tcaron uni0163 uni021B];<br>@_t=[t&nbsp; tcaron uni0163 uni021B];<br>@_u1=[u&nbsp; uacute ucircumflex udieresis ugrave uhungarumlaut umacron uogonek uring utilde];<br>@_u=[u&nbsp; uacute uogonek];<br>@_ucircumflex=[ucircumflex&nbsp; uhungarumlaut uring];<br>@_udieresis=[udieresis&nbsp; ugrave umacron utilde];<br>@_v=[v&nbsp; y yacute ycircumflex ydieresis ygrave];<br>@_w=[w&nbsp; wacute wcircumflex wdieresis wgrave];<br>@_y=[y&nbsp; yacute];<br>@_ycircumflex=[ycircumflex&nbsp; ydieresis ygrave];<br>@_z=[z&nbsp; zacute zcaron zdotaccent];<br>@aalt1=[A O Scedilla uni0162 a j o scedilla uni0163];<br>@aalt2=[ordfeminine ordmasculine Scommaaccent uni021A ordfeminine uni0237 ordmasculine scommaaccent uni021B];<br>@ccmp1=[uni0308 uni0307 gravecomb acutecomb uni030B uni0302 uni030C uni0306 uni030A tildecomb uni0304 uni0312];<br>@class1661=[uni0308 uni0307 gravecomb acutecomb uni030B uni0302 uni030C uni0306 uni030A tildecomb uni0304 uni0312 uni0326 uni0327];<br>@class1663=[uni0308 uni0307 gravecomb acutecomb uni030B uni0302 uni030C uni0306 uni030A tildecomb uni0304 uni0312 uni0326 uni0327 uni0328 uni0335 uni0336 uni0337 uni0338];<br>@class1664=[A Aacute Abreve uni01CD Acircumflex Adieresis Agrave Amacron Aogonek Aring Atilde AE B C Cacute Ccaron Ccedilla Cdotaccent D Dcaron E Eacute Ecaron Ecircumflex Edieresis Edotaccent Egrave Emacron Eogonek uni1EBC F G Gbreve Gcommaaccent Gdotaccent H Hbar I Iacute uni01CF Icircumflex Idieresis Idotaccent Igrave Imacron Iogonek Itilde J K Kcommaaccent L Lacute Lcaron Lcommaaccent Lslash M N Nacute Ncaron Ncommaaccent Eng Ntilde O Oacute uni01D1 Ocircumflex Odieresis Ograve Ohungarumlaut Omacron Oslash Oslashacute Otilde OE P Thorn Q R Racute Rcaron Rcommaaccent S Sacute Scaron Scedilla Scommaaccent T Tbar Tcaron uni0162 uni021A U Uacute uni01D3 Ucircumflex Udieresis uni01D7 uni01D9 uni01DB uni01D5 Ugrave Uhungarumlaut Umacron Uogonek Uring Utilde V W Wacute Wcircumflex Wdieresis Wgrave X Y Yacute Ycircumflex Ydieresis Ygrave uni1EF8 Z Zacute Zcaron Zdotaccent a aacute abreve uni01CE acircumflex adieresis agrave amacron aogonek aring atilde ae b c cacute ccaron ccedilla cdotaccent d dcaron dcroat e eacute ecaron ecircumflex edieresis edotaccent egrave emacron eogonek uni1EBD f g gbreve gcommaaccent gdotaccent h hbar i dotlessi iacute uni01D0 icircumflex idieresis i.loclTRK igrave imacron iogonek itilde uni0237 k kcommaaccent kgreenlandic l lacute lcaron lcommaaccent lslash m n nacute ncaron ncommaaccent ntilde o oacute uni01D2 ocircumflex odieresis ograve ohungarumlaut omacron oslash oslashacute otilde oe p thorn q r racute rcaron rcommaaccent s sacute scaron scedilla scommaaccent t tbar tcaron uni0163 uni021B u uacute uni01D4 ucircumflex udieresis uni01D8 uni01DA uni01DC uni01D6 ugrave uhungarumlaut umacron uogonek uring utilde v w wacute wcircumflex wdieresis wgrave x y yacute ycircumflex ydieresis ygrave uni1EF9 z zacute zcaron zdotaccent ordfeminine];<br>@ordn1=[zero one two three four five six seven eight nine];</div>







  • Mark Simonson
    Mark Simonson Posts: 1,739
    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 Stanev
    Vasil Stanev Posts: 775
    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 Stanev
    Vasil Stanev Posts: 775
    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 Phinney
    Thomas Phinney Posts: 2,897
    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.