From 0c8d38d9c0659f532358a0d0c3250c1f813005fd Mon Sep 17 00:00:00 2001 From: Erik Koopmans Date: Wed, 6 Dec 2017 23:49:11 +1100 Subject: [PATCH] Fix underlines, relative to 'bottom' baseline --- src/renderer/CanvasRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/CanvasRenderer.js b/src/renderer/CanvasRenderer.js index ee5c3f4..273f014 100644 --- a/src/renderer/CanvasRenderer.js +++ b/src/renderer/CanvasRenderer.js @@ -212,7 +212,7 @@ export default class CanvasRenderer implements RenderTarget { const {baseline} = this.options.fontMetrics.getMetrics(font); this.rectangle( text.bounds.left, - Math.round(text.bounds.top + baseline), + Math.round(text.bounds.top + text.bounds.height - baseline), text.bounds.width, 1, textDecorationColor