diff --git a/.gitignore b/.gitignore index 727d091..fefa56a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ node_modules .settings +.vscode # Special *.ttf diff --git a/buildglyphs.patel b/buildglyphs.patel index 0d7bc81..a1697e8 100644 --- a/buildglyphs.patel +++ b/buildglyphs.patel @@ -326,7 +326,7 @@ define [buildFont para recursive] : begin { otherwise unimportant } return knots - } + } define [g4 x y f] (.x x .y y .type 'g4' .af f) define [g2 x y f] (.x x .y y .type 'g2' .af f) define [corner x y f] (.x x .y y .type 'corner' .af f) diff --git a/glyphs/autobuilds.patel b/glyphs/autobuilds.patel index 47cd4e1..9631fe5 100644 --- a/glyphs/autobuilds.patel +++ b/glyphs/autobuilds.patel @@ -3,7 +3,7 @@ local font.features (.) # Build accented glyphs - +define unorm : require 'unorm' define [isAboveMark mark] : mark && mark.anchors && mark.anchors.above && mark.anchors.above.type === MARK define customDecompositions ( @@ -149,7 +149,7 @@ define [decideName namingParts parts code] : begin { foreach code [range 0x0000 0xFFFF] : if [not unicodeGlyphs`code] : begin { local str : String.fromCharCode code - local nfd : fallback customDecompositions.(str) : str.normalize 'NFD' + local nfd : fallback customDecompositions.(str) : unorm.nfd str if [nfd.length > 1] : begin { local parts () local allFound true diff --git a/package.json b/package.json index 113a987..0bf53c9 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "bezier-js" : "*", "yargs" : "*", "libspiro-js" : ">=0.2.1", - "toml": ">=2.3.0" + "toml": ">=2.3.0", + "unorm": ">=1.4.1" } } \ No newline at end of file