Fix blurry text by supporting floating pt devicePixelRatios

This commit is contained in:
Daniel Imms
2017-09-06 10:36:34 -07:00
parent b69ff5d31a
commit fb90c98f81
2 changed files with 25 additions and 8 deletions
+1 -3
View File
@@ -26,9 +26,7 @@ let charAtlasCache: ICharAtlasCacheEntry[] = [];
* @param terminal The terminal.
* @param colors The colors to use.
*/
export function acquireCharAtlas(terminal: ITerminal, colors: IColorSet): HTMLCanvasElement | Promise<ImageBitmap> {
const scaledCharWidth = terminal.charMeasure.width * window.devicePixelRatio;
const scaledCharHeight = terminal.charMeasure.height * window.devicePixelRatio;
export function acquireCharAtlas(terminal: ITerminal, colors: IColorSet, scaledCharWidth: number, scaledCharHeight: number): HTMLCanvasElement | Promise<ImageBitmap> {
const newConfig = generateConfig(scaledCharWidth, scaledCharHeight, terminal, colors);
// Check to see if the terminal already owns this config