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
package/dist/html2canvas-pro.js
CHANGED
|
@@ -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
|
*/
|
|
@@ -7600,15 +7600,14 @@
|
|
|
7600
7600
|
};
|
|
7601
7601
|
CanvasRenderer.prototype.renderTextNode = function (text, styles) {
|
|
7602
7602
|
return __awaiter(this, void 0, void 0, function () {
|
|
7603
|
-
var
|
|
7603
|
+
var font, paintOrder;
|
|
7604
7604
|
var _this = this;
|
|
7605
|
-
return __generator(this, function (
|
|
7606
|
-
|
|
7605
|
+
return __generator(this, function (_a) {
|
|
7606
|
+
font = this.createFontStyle(styles)[0];
|
|
7607
7607
|
this.ctx.font = font;
|
|
7608
7608
|
this.ctx.direction = styles.direction === 1 /* DIRECTION.RTL */ ? 'rtl' : 'ltr';
|
|
7609
7609
|
this.ctx.textAlign = 'left';
|
|
7610
7610
|
this.ctx.textBaseline = 'alphabetic';
|
|
7611
|
-
baseline = this.fontMetrics.getMetrics(fontFamily, fontSize).baseline;
|
|
7612
7611
|
paintOrder = styles.paintOrder;
|
|
7613
7612
|
text.textBounds.forEach(function (text) {
|
|
7614
7613
|
paintOrder.forEach(function (paintOrderLayer) {
|
|
@@ -7658,7 +7657,7 @@
|
|
|
7658
7657
|
_this.ctx.lineWidth = styles.webkitTextStrokeWidth;
|
|
7659
7658
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7660
7659
|
_this.ctx.lineJoin = !!window.chrome ? 'miter' : 'round';
|
|
7661
|
-
_this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top +
|
|
7660
|
+
_this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
|
7662
7661
|
}
|
|
7663
7662
|
_this.ctx.strokeStyle = '';
|
|
7664
7663
|
_this.ctx.lineWidth = 0;
|