Avoid drawing text when the font size is zero (issue 4484)
This commit is contained in:
parent
7d5bf83ce8
commit
08eb9a960a
@ -1322,6 +1322,19 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
var vertical = font.vertical;
|
var vertical = font.vertical;
|
||||||
var defaultVMetrics = font.defaultVMetrics;
|
var defaultVMetrics = font.defaultVMetrics;
|
||||||
|
|
||||||
|
if (fontSize === 0) {
|
||||||
|
if (textSelection) {
|
||||||
|
geom = this.createTextGeometry();
|
||||||
|
geom.canvasWidth = canvasWidth;
|
||||||
|
if (vertical) {
|
||||||
|
var VERTICAL_TEXT_ROTATION = Math.PI / 2;
|
||||||
|
geom.angle += VERTICAL_TEXT_ROTATION;
|
||||||
|
}
|
||||||
|
this.textLayer.appendText(geom);
|
||||||
|
}
|
||||||
|
return canvasWidth;
|
||||||
|
}
|
||||||
|
|
||||||
// Type3 fonts - each glyph is a "mini-PDF"
|
// Type3 fonts - each glyph is a "mini-PDF"
|
||||||
if (font.coded) {
|
if (font.coded) {
|
||||||
ctx.save();
|
ctx.save();
|
||||||
|
Loading…
Reference in New Issue
Block a user