html2canvas-pro 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html2canvas-pro.esm.js +5 -6
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +5 -6
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +2 -2
- package/dist/lib/render/canvas/canvas-renderer.js +4 -5
- package/dist/lib/render/canvas/canvas-renderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* html2canvas-pro 1.5.8 <https://yorickshan.github.io/html2canvas-pro/>
|
|
3
3
|
* Copyright (c) 2024 yorickshan <https://github.com/yorickshan>
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
@@ -7594,15 +7594,14 @@ var CanvasRenderer = /** @class */ (function (_super) {
|
|
|
7594
7594
|
};
|
|
7595
7595
|
CanvasRenderer.prototype.renderTextNode = function (text, styles) {
|
|
7596
7596
|
return __awaiter(this, void 0, void 0, function () {
|
|
7597
|
-
var
|
|
7597
|
+
var font, paintOrder;
|
|
7598
7598
|
var _this = this;
|
|
7599
|
-
return __generator(this, function (
|
|
7600
|
-
|
|
7599
|
+
return __generator(this, function (_a) {
|
|
7600
|
+
font = this.createFontStyle(styles)[0];
|
|
7601
7601
|
this.ctx.font = font;
|
|
7602
7602
|
this.ctx.direction = styles.direction === 1 /* DIRECTION.RTL */ ? 'rtl' : 'ltr';
|
|
7603
7603
|
this.ctx.textAlign = 'left';
|
|
7604
7604
|
this.ctx.textBaseline = 'alphabetic';
|
|
7605
|
-
baseline = this.fontMetrics.getMetrics(fontFamily, fontSize).baseline;
|
|
7606
7605
|
paintOrder = styles.paintOrder;
|
|
7607
7606
|
text.textBounds.forEach(function (text) {
|
|
7608
7607
|
paintOrder.forEach(function (paintOrderLayer) {
|
|
@@ -7652,7 +7651,7 @@ var CanvasRenderer = /** @class */ (function (_super) {
|
|
|
7652
7651
|
_this.ctx.lineWidth = styles.webkitTextStrokeWidth;
|
|
7653
7652
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7654
7653
|
_this.ctx.lineJoin = !!window.chrome ? 'miter' : 'round';
|
|
7655
|
-
_this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top +
|
|
7654
|
+
_this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
|
7656
7655
|
}
|
|
7657
7656
|
_this.ctx.strokeStyle = '';
|
|
7658
7657
|
_this.ctx.lineWidth = 0;
|