mirror of
https://github.com/danbulant/node-x11
synced 2026-05-24 12:35:39 +00:00
tabs
This commit is contained in:
parent
8c81c10edc
commit
b9264546a9
1 changed files with 28 additions and 26 deletions
|
|
@ -390,7 +390,7 @@ exports.requireExt = function(display, callback)
|
||||||
}
|
}
|
||||||
// width + heiht + origin xy + advance xy
|
// width + heiht + origin xy + advance xy
|
||||||
for (i = 0; i < numGlyphs; i++) {
|
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
|
// image
|
||||||
for (i = 0; i < numGlyphs; i++) {
|
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
|
// [ "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 compositeGlyphsOpcodeFromBits = [,,,,,,,,23,,,,,,,,24,,,,,,,,,,,,,,,,25];
|
||||||
var formatFromBits = [,,,,,,,,'C',,,,,,,,'S',,,,,,,,,,,,,,,,'L'];
|
var formatFromBits = [,,,,,,,,'C',,,,,,,,'S',,,,,,,,,,,,,,,,'L'];
|
||||||
ext.CompositeGlyphs = function(glyphBits, op, src, dst, maskFormat, gsid, srcX, srcY, glyphs)
|
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
|
case 'number': // glyphset id
|
||||||
X.pack_stream.pack('CxxxL', [0xff, g]);
|
X.pack_stream.pack('CxxxL', [0xff, g]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
X.pack_stream.flush();
|
X.pack_stream.flush();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue