opentype.js
Advanced tools
Comparing version 0.4.10 to 0.4.11
{ | ||
"name": "opentype.js", | ||
"version": "0.4.10", | ||
"version": "0.4.11", | ||
"main": "dist/opentype.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "opentype.js", | ||
"description": "OpenType font parser", | ||
"version": "0.4.10", | ||
"version": "0.4.11", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Frederik De Bleser", |
@@ -0,1 +1,7 @@ | ||
0.4.11 (September 27, 2015) | ||
=========================== | ||
* Fix issue with loading of TrueType composite glyphs. | ||
* Fix issue with missing hmtx values. | ||
* Sensible getMetrics() values for empty glyphs (e.g. space). | ||
0.4.10 (July 30, 2015) | ||
@@ -2,0 +8,0 @@ ====================== |
@@ -169,2 +169,19 @@ // The Glyph object | ||
}; | ||
if (!isFinite(metrics.xMin)) { | ||
metrics.xMin = 0; | ||
} | ||
if (!isFinite(metrics.xMax)) { | ||
metrics.xMax = this.advanceWidth; | ||
} | ||
if (!isFinite(metrics.yMin)) { | ||
metrics.yMin = 0; | ||
} | ||
if (!isFinite(metrics.yMax)) { | ||
metrics.yMax = 0; | ||
} | ||
metrics.rightSideBearing = this.advanceWidth - metrics.leftSideBearing - (metrics.xMax - metrics.xMin); | ||
@@ -171,0 +188,0 @@ return metrics; |
@@ -179,7 +179,4 @@ // opentype.js | ||
font.glyphs = glyf.parse(data, glyfOffset, locaTable, font); | ||
hmtx.parse(data, hmtxOffset, font.numberOfHMetrics, font.numGlyphs, font.glyphs); | ||
encoding.addGlyphNames(font); | ||
} else if (cffOffset) { | ||
cff.parse(data, cffOffset, font); | ||
encoding.addGlyphNames(font); | ||
} else { | ||
@@ -189,2 +186,5 @@ throw new Error('Font doesn\'t contain TrueType or CFF outlines.'); | ||
hmtx.parse(data, hmtxOffset, font.numberOfHMetrics, font.numGlyphs, font.glyphs); | ||
encoding.addGlyphNames(font); | ||
if (kernOffset) { | ||
@@ -191,0 +191,0 @@ font.kerningPairs = kern.parse(data, kernOffset); |
@@ -270,2 +270,4 @@ // The `glyf` table describes the glyphs in TrueType outline format. | ||
var componentGlyph = glyphs.get(component.glyphIndex); | ||
// Force the ttfGlyphLoader to parse the glyph. | ||
componentGlyph.getPath(); | ||
if (componentGlyph.points) { | ||
@@ -272,0 +274,0 @@ var transformedPoints = transformPoints(componentGlyph.points, component); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
616545
12042
11
58