get things to work

Co-authored-by: Daniel Imms <daimms@microsoft.com>
This commit is contained in:
meganrogge
2021-08-12 10:12:43 -07:00
parent 46cb37876d
commit d13afa1b37
2 changed files with 23 additions and 8 deletions
+3 -3
View File
@@ -412,7 +412,7 @@ export abstract class BaseRenderLayer implements IRenderLayer {
if (!lineSegments) {
return false;
}
const xOffset = x * this._scaledCellWidth + this._scaledCharLeft;
const xOffset = x * this._scaledCellWidth;
const verticalCenter = Math.round(this._scaledCellHeight / 2);
const yOffset = y * this._scaledCellHeight + this._scaledCharTop + verticalCenter;
@@ -420,10 +420,10 @@ export abstract class BaseRenderLayer implements IRenderLayer {
this._ctx.strokeStyle = this._ctx.fillStyle;
// increase # of pixels when font size incremented by 10
this._ctx.lineWidth = Math.max(Math.floor(this._optionsService.options.fontSize / 10), 1);
// this._ctx.lineWidth = Math.max(Math.floor(this._optionsService.options.fontSize / 10), 1);
const horizontalCenter = Math.round(this._scaledCellWidth / 2);
// yOffset - verticalCenter
draw(this._ctx, char, xOffset, y * this._scaledCellHeight + this._scaledCharTop, this._scaledCellWidth, this._scaledCellHeight);
draw(this._ctx, char, xOffset, y * this._scaledCellHeight, this._scaledCellWidth, this._scaledCellHeight);
return true;