Fix a small issue with the 'name' table
This commit is contained in:
parent
17803049a9
commit
1037fdf2ad
8
fonts.js
8
fonts.js
@ -988,7 +988,7 @@ var Font = (function Font() {
|
|||||||
var nameTable =
|
var nameTable =
|
||||||
"\x00\x00" + // format
|
"\x00\x00" + // format
|
||||||
string16(namesRecordCount) + // Number of names Record
|
string16(namesRecordCount) + // Number of names Record
|
||||||
string16(namesRecordCount * 12 + 6); // Storage
|
string16(namesRecordCount * 12 + 6); // Offset to start of storage
|
||||||
|
|
||||||
// Build the name records field
|
// Build the name records field
|
||||||
var strOffset = 0;
|
var strOffset = 0;
|
||||||
@ -1000,7 +1000,7 @@ var Font = (function Font() {
|
|||||||
platforms[i] + // platform ID
|
platforms[i] + // platform ID
|
||||||
encodings[i] + // encoding ID
|
encodings[i] + // encoding ID
|
||||||
languages[i] + // language ID
|
languages[i] + // language ID
|
||||||
string16(i) + // name ID
|
string16(j) + // name ID
|
||||||
string16(str.length) +
|
string16(str.length) +
|
||||||
string16(strOffset);
|
string16(strOffset);
|
||||||
nameTable += nameRecord;
|
nameTable += nameRecord;
|
||||||
@ -1008,9 +1008,9 @@ var Font = (function Font() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nameTable += strings.join("") + stringsUnicode.join("");
|
nameTable += strings.join("") + stringsUnicode.join("");
|
||||||
return nameTable;
|
return nameTable;
|
||||||
}
|
};
|
||||||
|
|
||||||
function isFixedPitch(glyphs) {
|
function isFixedPitch(glyphs) {
|
||||||
for (var i = 0; i < glyphs.length - 1; i++) {
|
for (var i = 0; i < glyphs.length - 1; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user