From: <pa...@um...> - 2008-05-22 03:42:45
|
Hello, I recently upgraded to the latest version of FontForge. I noticed that a lot of my scripts no longer work due to the changes to the syntax of the AddAnchorClass command. Moreover, I cannot figure out what the appropriate syntax might be. The old syntax AddAnchorClass(name,type,script-lang,tag,flags,merge-with) has been replaced with AddAnchorClass(name,type,lookup-subtable-name) An example of my old code is: AddAnchorClass("sub","default","deva{dflt}","blwm",-1,"") AddAnchorClass("top","default","deva{dflt}","abvm",-1,"") Could someone kindly please advise me of the valid options for lookup-subtable-name? Thank you. Regards, Anshuman |
From: George W. <gw...@si...> - 2008-05-22 04:21:39
|
On Wed, 2008-05-21 at 20:42, pa...@um... wrote: > The old syntax > > AddAnchorClass(name,type,script-lang,tag,flags,merge-with) > > has been replaced with > > AddAnchorClass(name,type,lookup-subtable-name) > > An example of my old code is: > > AddAnchorClass("sub","default","deva{dflt}","blwm",-1,"") > AddAnchorClass("top","default","deva{dflt}","abvm",-1,"") > > Could someone kindly please advise me of the valid options for > lookup-subtable-name? ff's internal representation of GPOS/GSUB moved from a feature based system to a lookup based system about a year and a half ago. It used to be that an anchor class was attached to a feature ("blwm" and script "deva{dflt}") Now anchor classes live in lookup subtables which live in lookups which are attached to features. In other words ff now represents things the same way GPOS does. So if you are starting with a blank font then the first thing you must do is create a lookup AddLookup("belowbaseline","gpos_mark2base",0, [["blwm",[["deva",["dflt"]]]]]) then in that lookup you need to create (at least one) subtable AddLookupSubtable("belowbaseline", "belowbasesub") then in that subtable you create your anchor class AddAnchorClass("sub","default","belowbasesub") If you have more than one anchor class in the "blwm" feature it can live in the same lookup subtable. But your anchor class "top" is in a different feature, and it needs its own lookup and lookup-subtable. I'm sorry this is so complicated. But that's the way OpenType works. I tried to hide some of the complexity when I first did things, but came to realize the complexity was needed and had to scrap the earlier methodology. |
From: Anshuman P. <pa...@um...> - 2008-05-22 23:07:22
|
Dear George, On Thu, 21 May 2008, George Williams wrote: > So if you are starting with a blank font then the first thing you must > do is create a lookup > AddLookup("belowbaseline","gpos_mark2base",0, > [["blwm",[["deva",["dflt"]]]]]) > then in that lookup you need to create (at least one) subtable > AddLookupSubtable("belowbaseline", "belowbasesub") > then in that subtable you create your anchor class > AddAnchorClass("sub","default","belowbasesub") > If you have more than one anchor class in the "blwm" feature it can live > in the same lookup subtable. Ok. This makes sense. I set up the lookup subtables in my script and everything works as expected. > I'm sorry this is so complicated. But that's the way OpenType works. I > tried to hide some of the complexity when I first did things, but came > to realize the complexity was needed and had to scrap the earlier > methodology. Ah, it's bound to end up this way! :) Thanks for the prompt advice on how to set up the lookup subtable and declaring anchor classes. I will look into the OpenType specification later. I'm trying to create TrueType fonts from TeX bitmaps that supplement new Indic scripts that I've proposed for inclusion in Unicode. Now, I'm struggling with the AddPosSub syntax that replaced AddATT. Regards, Anshuman |
From: <pa...@um...> - 2008-05-22 07:02:49
|
In several of my scripts I used the deprecated AddATT command: AddATT("Ligature","deva{dflt}","abvs",-1,"glyph_a glyph_b") ff reports that AddATT has been replaced by AddPosSub: AddPosSub(subtable-name,variant-glyph-name(s)) AddPosSub(subtable-name,dx,dy,dadv_x,dadv_y) AddPosSub(subtable-name,other-glyph-name,dx1,dy1, dadv_x1,dadv_y1,dx2,dy2,dadv_x2,dadv_y2) I am not quite sure how to go about migrating the AddATT command to the new AddPosSub. I appreciate any advice regarding this matter. Regards, Anshuman |
From: George W. <gw...@si...> - 2008-05-23 02:56:37
|
On Thu, 2008-05-22 at 00:02, pa...@um... wrote: > In several of my scripts I used the deprecated AddATT command: > > AddATT("Ligature","deva{dflt}","abvs",-1,"glyph_a glyph_b") > > ff reports that AddATT has been replaced by AddPosSub: > > AddPosSub(subtable-name,variant-glyph-name(s)) > AddPosSub(subtable-name,dx,dy,dadv_x,dadv_y) > AddPosSub(subtable-name,other-glyph-name,dx1,dy1, > dadv_x1,dadv_y1,dx2,dy2,dadv_x2,dadv_y2) > > I am not quite sure how to go about migrating the AddATT command to > the new AddPosSub. I appreciate any advice regarding this matter. Er... The answer is pretty much the same as the one I gave you yesterday. If that didn't make it clear I'm not sure what I could say to improve matters. Perhaps it would help to look at http://fontforge.sf.net/fontinfo.html#Lookups http://fontforge.sf.net/lookups.html these describe the basic philosophy behind lookups. Once again you will need to create a lookup and then a subtable with in it. AddLookup("above-ligs","gsub_ligature",0, [["abvs",[["deva",["dflt"]]]]]) AddLookupSubtable("above-ligs", "above-ligs-sub") AddPosSub("above-ligs-sub","glyph_a glyph_b") |