Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue where TextNode does not render when it is an empty string and the line-height issue in non-Firefox browsers; also, fix the misalignment of textDecorationLine at high resolutions. #3182

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
fix build failure
xweiba committed Jul 18, 2024
commit 7071e329839713ec6f8607d2d562ec48e79a53c7
2 changes: 1 addition & 1 deletion src/render/canvas/canvas-renderer.ts
Original file line number Diff line number Diff line change
@@ -188,7 +188,7 @@ export class CanvasRenderer extends Renderer {
this.ctx.direction = styles.direction === DIRECTION.RTL ? 'rtl' : 'ltr';
this.ctx.textAlign = 'left';
this.ctx.textBaseline = 'alphabetic';
const {baseline, middle} = this.fontMetrics.getMetrics(fontFamily, fontSize);
const {baseline} = this.fontMetrics.getMetrics(fontFamily, fontSize);
const paintOrder = styles.paintOrder;

text.textBounds.forEach((text) => {