mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Update FontMetric
This commit is contained in:
parent
101c32ed71
commit
650d71e23b
@ -47,7 +47,7 @@ export class FontMetrics {
|
||||
span.appendChild(this._document.createTextNode(SAMPLE_TEXT));
|
||||
container.appendChild(span);
|
||||
container.appendChild(img);
|
||||
const baseline = img.offsetTop - span.offsetTop + 2;
|
||||
const baseline = img.offsetTop - span.offsetTop + 1;
|
||||
|
||||
container.removeChild(span);
|
||||
container.appendChild(this._document.createTextNode(SAMPLE_TEXT));
|
||||
@ -55,7 +55,7 @@ export class FontMetrics {
|
||||
container.style.lineHeight = 'normal';
|
||||
img.style.verticalAlign = 'super';
|
||||
|
||||
const middle = img.offsetTop - container.offsetTop + 2;
|
||||
const middle = img.offsetTop - container.offsetTop + 1;
|
||||
|
||||
body.removeChild(container);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user