Merge pull request #1417 from eKoopmans/bugfix/underlines

Revert "Fix underlines, relative to 'bottom' baseline"
This commit is contained in:
Niklas von Hertzen 2018-02-15 21:00:48 +08:00 committed by GitHub
commit e6c44afca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,7 +250,7 @@ export default class CanvasRenderer implements RenderTarget<HTMLCanvasElement> {
const {baseline} = this.options.fontMetrics.getMetrics(font); const {baseline} = this.options.fontMetrics.getMetrics(font);
this.rectangle( this.rectangle(
text.bounds.left, text.bounds.left,
Math.round(text.bounds.top + text.bounds.height - baseline), Math.round(text.bounds.top + baseline),
text.bounds.width, text.bounds.width,
1, 1,
textDecorationColor textDecorationColor