This adds the logic needed to switch between multiple char atlas implementations, and an example second implementation to test it out with. This also offers an escape hatch if something goes wrong with the char atlas implementation(s).
26 lines
604 B
TypeScript
26 lines
604 B
TypeScript
/**
|
|
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
|
|
* @license MIT
|
|
*
|
|
* A dummy CharAtlas implementation that always fails to draw characters.
|
|
*/
|
|
|
|
import { IGlyphIdentifier } from './Types';
|
|
import { ICharAtlasConfig } from '../../shared/atlas/Types';
|
|
import BaseCharAtlas from './BaseCharAtlas';
|
|
|
|
export default class NoneCharAtlas extends BaseCharAtlas {
|
|
constructor(document: Document, config: ICharAtlasConfig) {
|
|
super();
|
|
}
|
|
|
|
public draw(
|
|
ctx: CanvasRenderingContext2D,
|
|
glyph: IGlyphIdentifier,
|
|
x: number,
|
|
y: number
|
|
): boolean {
|
|
return false;
|
|
}
|
|
}
|