Replaced String.prototype.normalize with library unorm.
This commit is contained in:
parent
96c1551b85
commit
ba2834ce5d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -26,6 +26,7 @@ node_modules
|
|||
|
||||
|
||||
.settings
|
||||
.vscode
|
||||
|
||||
# Special
|
||||
*.ttf
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"bezier-js" : "*",
|
||||
"yargs" : "*",
|
||||
"libspiro-js" : ">=0.2.1",
|
||||
"toml": ">=2.3.0"
|
||||
"toml": ">=2.3.0",
|
||||
"unorm": ">=1.4.1"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user