This commit is contained in:
Andrey Sidorov 2014-04-01 23:42:04 +11:00
parent 8c81c10edc
commit b9264546a9

View file

@ -390,7 +390,7 @@ exports.requireExt = function(display, callback)
}
// width + heiht + origin xy + advance xy
for (i = 0; i < numGlyphs; i++) {
X.pack_stream.pack('SSssss', [glyphs[i].width, glyphs[i].height, glyphs[i].x, glyphs[i].y, glyphs[i].offX, glyphs[i].offY]);
X.pack_stream.pack('SSssss', [glyphs[i].width, glyphs[i].height, -glyphs[i].x, glyphs[i].y, glyphs[i].offX, glyphs[i].offY]);
}
// image
for (i = 0; i < numGlyphs; i++) {
@ -419,6 +419,9 @@ exports.requireExt = function(display, callback)
// [ "just string (0,0) offset is used", [ 10, 10, "string offseted 10,10 from previous pen position" ], 1234567 ] 1234567 is glypfset id or FONT
// TODO: pre-process input so strings larger than 254 chars are supported
// (split them into multiple entries with 0,0 offset)
var compositeGlyphsOpcodeFromBits = [,,,,,,,,23,,,,,,,,24,,,,,,,,,,,,,,,,25];
var formatFromBits = [,,,,,,,,'C',,,,,,,,'S',,,,,,,,,,,,,,,,'L'];
ext.CompositeGlyphs = function(glyphBits, op, src, dst, maskFormat, gsid, srcX, srcY, glyphs)
@ -458,7 +461,6 @@ exports.requireExt = function(display, callback)
case 'number': // glyphset id
X.pack_stream.pack('CxxxL', [0xff, g]);
break;
}
}
X.pack_stream.flush();