fix size bugs
This commit is contained in:
parent
1362a6f9e1
commit
7477092959
@ -73,7 +73,7 @@ define(
|
||||
flags += componentFlag.WE_HAVE_A_TWO_BY_TWO;
|
||||
}
|
||||
else {
|
||||
if (a !== 1 || d !== 1 && a === d) {
|
||||
if ((a !== 1 || d !== 1) && a === d) {
|
||||
flags += componentFlag.WE_HAVE_A_SCALE;
|
||||
}
|
||||
else if (a !== 1 || d !== 1) {
|
||||
|
@ -104,12 +104,12 @@ define(
|
||||
ttf.post.maxMemType1 = numberOfGlyphs;
|
||||
|
||||
// version 3 不设置post信息
|
||||
if (post.format === 3 || post.format === 1) {
|
||||
return 34;
|
||||
if (ttf.post.format === 3 || ttf.post.format === 1) {
|
||||
return 32;
|
||||
}
|
||||
|
||||
// version 2
|
||||
var size = 34 + numberOfGlyphs * 2; // header + numberOfGlyphs * 2
|
||||
var size = 34 + numberOfGlyphs * 2; // header + numberOfGlyphs + numberOfGlyphs * 2
|
||||
var glyphNames = [];
|
||||
var nameIndexArr = [];
|
||||
var nameIndex = 0;
|
||||
|
@ -28,7 +28,7 @@ define(
|
||||
glyfs.forEach(function (g) {
|
||||
var glyph = ttf.glyf[g.glyphIndex];
|
||||
|
||||
if (!glyph) {
|
||||
if (!glyph && !glyph.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user