Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "fontkit", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "An advanced font engine for Node and the browser", | ||
@@ -85,3 +85,3 @@ "keywords": [ | ||
"tiny-inflate": "^1.0.3", | ||
"unicode-properties": "^1.3.1", | ||
"unicode-properties": "^1.4.0", | ||
"unicode-trie": "^2.0.0" | ||
@@ -88,0 +88,0 @@ }, |
import { cache } from '../decorators'; | ||
import Path from './Path'; | ||
import unicode from 'unicode-properties'; | ||
import {isMark} from 'unicode-properties'; | ||
import StandardNames from './StandardNames'; | ||
@@ -32,3 +32,3 @@ | ||
// TODO: get this info from GDEF if available | ||
this.isMark = this.codePoints.length > 0 && this.codePoints.every(unicode.isMark); | ||
this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark); | ||
this.isLigature = this.codePoints.length > 1; | ||
@@ -35,0 +35,0 @@ } |
@@ -6,3 +6,2 @@ import KernProcessor from './KernProcessor'; | ||
import * as Script from './Script'; | ||
import unicode from 'unicode-properties'; | ||
import AATLayoutEngine from '../aat/AATLayoutEngine'; | ||
@@ -9,0 +8,0 @@ import OTLayoutEngine from '../opentype/OTLayoutEngine'; |
@@ -1,2 +0,2 @@ | ||
import unicode from 'unicode-properties'; | ||
import {getScript} from 'unicode-properties'; | ||
@@ -173,3 +173,3 @@ // This maps the Unicode Script property to an OpenType script tag | ||
let script = unicode.getScript(code); | ||
let script = getScript(code); | ||
if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { | ||
@@ -186,3 +186,3 @@ return UNICODE_SCRIPTS[script]; | ||
let codePoint = codePoints[i]; | ||
let script = unicode.getScript(codePoint); | ||
let script = getScript(codePoint); | ||
if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { | ||
@@ -189,0 +189,0 @@ return UNICODE_SCRIPTS[script]; |
@@ -1,2 +0,2 @@ | ||
import unicode from 'unicode-properties'; | ||
import {getCombiningClass} from 'unicode-properties'; | ||
@@ -139,3 +139,3 @@ /** | ||
getCombiningClass(codePoint) { | ||
let combiningClass = unicode.getCombiningClass(codePoint); | ||
let combiningClass = getCombiningClass(codePoint); | ||
@@ -142,0 +142,0 @@ // Thai / Lao need some per-character work |
@@ -1,2 +0,2 @@ | ||
import unicode from 'unicode-properties'; | ||
import {isMark} from 'unicode-properties'; | ||
import OTProcessor from './OTProcessor'; | ||
@@ -47,3 +47,3 @@ | ||
} else { | ||
this.isMark = this.codePoints.length > 0 && this.codePoints.every(unicode.isMark); | ||
this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark); | ||
this.isBase = !this.isMark; | ||
@@ -50,0 +50,0 @@ this.isLigature = this.codePoints.length > 1; |
import DefaultShaper from './DefaultShaper'; | ||
import unicode from 'unicode-properties'; | ||
import {getCategory} from 'unicode-properties'; | ||
import UnicodeTrie from 'unicode-trie'; | ||
@@ -117,3 +117,3 @@ import { decodeBase64 } from '../../utils'; | ||
let category = unicode.getCategory(codePoint); | ||
let category = getCategory(codePoint); | ||
if (category === 'Mn' || category === 'Me' || category === 'Cf') { | ||
@@ -120,0 +120,0 @@ return ShapingClasses.Transparent; |
@@ -1,2 +0,2 @@ | ||
import unicode from 'unicode-properties'; | ||
import {isDigit} from 'unicode-properties'; | ||
@@ -53,3 +53,3 @@ const VARIATION_FEATURES = ['rvrn']; | ||
// Apply numerator | ||
while (start > 0 && unicode.isDigit(glyphs[start - 1].codePoints[0])) { | ||
while (start > 0 && isDigit(glyphs[start - 1].codePoints[0])) { | ||
glyphs[start - 1].features.numr = true; | ||
@@ -61,3 +61,3 @@ glyphs[start - 1].features.frac = true; | ||
// Apply denominator | ||
while (end < glyphs.length && unicode.isDigit(glyphs[end].codePoints[0])) { | ||
while (end < glyphs.length && isDigit(glyphs[end].codePoints[0])) { | ||
glyphs[end].features.dnom = true; | ||
@@ -64,0 +64,0 @@ glyphs[end].features.frac = true; |
import DefaultShaper from './DefaultShaper'; | ||
import StateMachine from 'dfa'; | ||
import UnicodeTrie from 'unicode-trie'; | ||
import unicode from 'unicode-properties'; | ||
import {getCategory} from 'unicode-properties'; | ||
import * as Script from '../../layout/Script'; | ||
@@ -900,3 +900,3 @@ import GlyphInfo from '../GlyphInfo'; | ||
// Apply 'init' to the Left Matra if it's a word start. | ||
if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(unicode.getCategory(glyphs[start - 1].codePoints[0])))) { | ||
if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(getCategory(glyphs[start - 1].codePoints[0])))) { | ||
glyphs[start].features.init = true; | ||
@@ -903,0 +903,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6117931
64521
Updatedunicode-properties@^1.4.0