diff --git a/generate.js b/generate.js index ad4967e..5cc2a8d 100644 --- a/generate.js +++ b/generate.js @@ -64,6 +64,10 @@ if(argv.dumpfeature) { // mkmk var mkmk = ttfFont.features.mkmk; featurefile += 'lookup mkmkAuto {' + mkmk.marks.join(';\n') + ';\n' + mkmk.bases.join(';\n') + ';} mkmkAuto;' + + // gdef + var gdef = ttfFont.features.gdef; + featurefile += '@GDEF_Simple = [' + gdef.simple.join(' ') + ']; @GDEF_Ligature =[' + gdef.ligature.join(' ') + ']; @GDEF_Mark = [' + gdef.mark.join(' ') + ']; table GDEF { GlyphClassDef @GDEF_Simple, @GDEF_Ligature, @GDEF_Mark, ;} GDEF;' fs.writeFileSync(argv.dumpfeature, featurefile, 'utf8'); }; \ No newline at end of file diff --git a/glyphs/autobuilds.patel b/glyphs/autobuilds.patel index 6f69b65..9cbd32b 100644 --- a/glyphs/autobuilds.patel +++ b/glyphs/autobuilds.patel @@ -535,7 +535,7 @@ create-glyph 'servicemark' : glyph-construction { set font.features.mark (.) set font.features.mkmk (.marks () .bases ()) set font.features.markGlyphs (.) - +set font.features.gdef (.simple () .ligature () .mark ()) define [buildAnchorDescription glyph inserter propx propy] : begin { local buf '' foreach key [items-of : Object.keys glyph.anchors] : buf = buf + ' ' + inserter + ' @' + key @@ -559,21 +559,22 @@ createMarkLookup 'topright' createMarkLookup 'bottomright' createMarkLookup 'overlay' createMarkLookup 'slash' -# mkmk +# mkmk and GDEF foreach glyph [items-of glyphList] : if [glyph.anchors && [begin [local anchorKeys : Object.keys glyph.anchors] anchorKeys.length]] : begin { local isMarkGlyph false foreach key [items-of anchorKeys] : if [glyph.anchors.(key).type == 'mark'] : set isMarkGlyph true if isMarkGlyph { then { -# font.features.mark.marks.push : 'markClass [' + glyph.name + '] ' + [buildAnchorDescription glyph '' 'x' 'y'] + font.features.mkmk.marks.push : 'markClass [' + glyph.name + '] ' + [buildAnchorDescription glyph '' 'x' 'y'] font.features.mkmk.bases.push : 'pos mark [' + glyph.name + '] ' + [buildAnchorDescription glyph 'mark' 'mbx' 'mby'] foreach key [items-of anchorKeys] : begin { if [not font.features.markGlyphs.(key)] : set font.features.markGlyphs.(key) () font.features.markGlyphs.(key).push glyph.name } + font.features.gdef.mark.push glyph.name } -# else : font.features.mark.bases.push : 'pos base [' + glyph.name + '] ' + [buildAnchorDescription glyph 'mark' 'x' 'y'] + else : if [[regex '_'].test glyph.name] [font.features.gdef.ligature.push glyph.name] [font.features.gdef.simple.push glyph.name] } } \ No newline at end of file diff --git a/parameters.patel b/parameters.patel index 7897670..40f7333 100644 --- a/parameters.patel +++ b/parameters.patel @@ -45,7 +45,7 @@ define regular ( .family 'Iosevka' .style 'Regular' .weight 400 - .version 'r0.1.6' + .version 'r0.1.7' .variantSelector (.) .copyright 'Copyright (c) 2015 Belleve Invis.' )