A curious bug

Vasil StanevVasil Stanev Posts: 230
edited June 21 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,097
    also, be sure you are rebuilding your kern feature.
  • Vasil StanevVasil Stanev Posts: 230
    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,097
    check your {locl} feature code.
  • Ray LarabieRay Larabie Posts: 789
    Check for duplicate kerning class names.
  • Kent LewKent Lew Posts: 802
    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: 230
    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];
    @_AE=[AE  E Eacute Ecaron Ecircumflex Edieresis Edotaccent Egrave Emacron Eogonek OE];
    @_H=[B  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];
    @_O=[C  Cacute Ccaron Ccedilla Cdotaccent G Gbreve Gcommaaccent Gdotaccent O Oacute Ocircumflex Odieresis Ograve Ohungarumlaut Omacron Oslash Otilde OE Q];
    @_C=[C  Cacute Ccaron Ccedilla Cdotaccent];
    @_O=[D  Eth Dcaron Dcroat O Oacute Ocircumflex Odieresis Ograve Ohungarumlaut Omacron Oslash Otilde];
    @_Eth=[Eth  Dcroat Lslash];
    @_G=[G  Gbreve Gcommaaccent Gdotaccent];
    @_H=[H  I Iacute Icircumflex Idieresis Idotaccent Igrave Imacron Iogonek Itilde M N Nacute Ncaron Ncommaaccent Ntilde];
    @_Hbar=[Hbar  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];
    @_K=[K  Kcommaaccent];
    @_L=[L  Lacute Lcaron Lcommaaccent Lslash];
    @_R=[R  Racute Rcaron Rcommaaccent];
    @_S=[S  Sacute Scaron Scedilla Scommaaccent];
    @_T=[T  Tbar Tcaron uni0162 uni021A];
    @_U=[U  Uacute Ucircumflex Udieresis Ugrave Uhungarumlaut Umacron Uogonek Uring Utilde];
    @_W=[W  Wacute Wcircumflex Wdieresis Wgrave];
    @_Y=[Y  Yacute Ycircumflex Ydieresis Ygrave];
    @_Z=[Z  Zacute Zcaron Zdotaccent];
    @_a1=[a  aacute abreve acircumflex adieresis agrave amacron aogonek aring atilde];
    @_a=[a  aacute aogonek aring ae cent infinity partialdiff];
    @_abreve=[abreve  acircumflex adieresis agrave amacron atilde];
    @_ae=[ae  e eacute ecaron ecircumflex edieresis edotaccent egrave emacron eogonek o oacute ocircumflex odieresis ograve ohungarumlaut omacron oslash otilde oe];
    @_asterisk=[asterisk  registered trademark];
    @_b1=[b  h hbar i i.loclTRK iogonek k kcommaaccent l lacute lcaron lcommaaccent thorn];
    @_b=[b  p thorn];
    @_braceleft=[braceleft  bracketleft parenleft];
    @_braceright=[braceright  bracketright parenright];
    @_c1=[c  cacute ccedilla e eacute eogonek o oacute oslash oe];
    @_c=[c  cacute ccaron ccedilla cdotaccent];
    @_ccaron=[ccaron  eth ecaron edieresis egrave emacron odieresis ograve omacron otilde];
    @_cdotaccent=[cdotaccent  ecircumflex edotaccent ocircumflex ohungarumlaut];
    @_colon=[colon  semicolon];
    @_comma=[comma  ellipsis period quotedblbase quotesinglbase];
    @_d=[d  dcaron dcroat gbreve gcommaaccent gdotaccent q];
    @_dcaron=[dcaron  lcaron];
    @_emdash=[emdash  endash hyphen];
    @_f1=[f  f_f f_f_i f_f_l fi fl];
    @_f=[f  f_f];
    @_g=[g  gbreve gcommaaccent gdotaccent];
    @_h=[h  hbar m n nacute ncaron ncommaaccent eng ntilde];
    @_iacute1=[iacute  icircumflex idieresis imacron itilde];
    @_iacute=[iacute  ncaron rcaron];
    @_icircumflex=[icircumflex  idieresis igrave imacron itilde];
    @_k=[k  kcommaaccent kgreenlandic];
    @_kgreenlandic=[kgreenlandic  m n nacute ncommaaccent eng ntilde r racute rcommaaccent];
    @_quotedbl=[quotedbl  quotesingle degree];
    @_quotedblleft=[quotedblleft  quoteleft];
    @_quotedblright=[quotedblright  quoteright];
    @_r=[r  racute rcaron rcommaaccent];
    @_s1=[s  sacute scaron scedilla scommaaccent];
    @_s=[s  sacute scedilla scommaaccent];
    @_t1=[t  tbar tcaron uni0163 uni021B];
    @_t=[t  tcaron uni0163 uni021B];
    @_u1=[u  uacute ucircumflex udieresis ugrave uhungarumlaut umacron uogonek uring utilde];
    @_u=[u  uacute uogonek];
    @_ucircumflex=[ucircumflex  uhungarumlaut uring];
    @_udieresis=[udieresis  ugrave umacron utilde];
    @_v=[v  y yacute ycircumflex ydieresis ygrave];
    @_w=[w  wacute wcircumflex wdieresis wgrave];
    @_y=[y  yacute];
    @_ycircumflex=[ycircumflex  ydieresis ygrave];
    @_z=[z  zacute zcaron zdotaccent];
    @aalt1=[A O Scedilla uni0162 a j o scedilla uni0163];
    @aalt2=[ordfeminine ordmasculine Scommaaccent uni021A ordfeminine uni0237 ordmasculine scommaaccent uni021B];
    @ccmp1=[uni0308 uni0307 gravecomb acutecomb uni030B uni0302 uni030C uni0306 uni030A tildecomb uni0304 uni0312];
    @class1661=[uni0308 uni0307 gravecomb acutecomb uni030B uni0302 uni030C uni0306 uni030A tildecomb uni0304 uni0312 uni0326 uni0327];
    @class1663=[uni0308 uni0307 gravecomb acutecomb uni030B uni0302 uni030C uni0306 uni030A tildecomb uni0304 uni0312 uni0326 uni0327 uni0328 uni0335 uni0336 uni0337 uni0338];
    @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];
    @ordn1=[zero one two three four five six seven eight nine];







  • Mark SimonsonMark Simonson Posts: 987
    edited June 26
    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: 230
    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: 230
    edited June 26
    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,153
    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.