type3 font.coded comment; proper geometery for showText; glyph name
This commit is contained in:
parent
c9981b6ff4
commit
45ef8742ac
@ -687,8 +687,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
|
|
||||||
if (textSelection) {
|
if (textSelection) {
|
||||||
this.save();
|
this.save();
|
||||||
ctx.scale(fontSize, fontSize);
|
ctx.scale(1, -1);
|
||||||
ctx.transform.apply(ctx, fontMatrix);
|
|
||||||
text.geom = this.getTextGeometry();
|
text.geom = this.getTextGeometry();
|
||||||
this.restore();
|
this.restore();
|
||||||
}
|
}
|
||||||
@ -785,6 +784,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
|
|
||||||
if (textSelection) {
|
if (textSelection) {
|
||||||
ctx.save();
|
ctx.save();
|
||||||
|
// Type3 fonts - each glyph is a "mini-PDF" (see also showText)
|
||||||
if (font.coded) {
|
if (font.coded) {
|
||||||
ctx.transform.apply(ctx, current.textMatrix);
|
ctx.transform.apply(ctx, current.textMatrix);
|
||||||
ctx.scale(1, -1);
|
ctx.scale(1, -1);
|
||||||
|
@ -2103,7 +2103,7 @@ var Font = (function FontClosure() {
|
|||||||
|
|
||||||
get spaceWidth() {
|
get spaceWidth() {
|
||||||
// trying to estimate space character width
|
// trying to estimate space character width
|
||||||
var possibleSpaceReplacements = ['space', 'minus', '1', 'i'];
|
var possibleSpaceReplacements = ['space', 'minus', 'one', 'i'];
|
||||||
var width;
|
var width;
|
||||||
for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
|
for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
|
||||||
var glyphName = possibleSpaceReplacements[i];
|
var glyphName = possibleSpaceReplacements[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user