@xterm/addon-ligatures 0.11.0-beta.28 → 0.11.0-beta.281
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +25 -1
- package/lib/addon-ligatures.js +3 -0
- package/lib/addon-ligatures.js.map +1 -0
- package/lib/addon-ligatures.mjs +3 -2
- package/lib/addon-ligatures.mjs.map +4 -4
- package/package.json +10 -12
- package/src/LigaturesAddon.ts +2 -2
- package/src/font.ts +12 -10
- package/src/fontLigatures/flatten.ts +40 -0
- package/src/fontLigatures/index.ts +262 -0
- package/src/fontLigatures/merge.ts +393 -0
- package/src/fontLigatures/mergeRange.ts +65 -0
- package/src/fontLigatures/processors/6-1.ts +82 -0
- package/src/fontLigatures/processors/6-2.ts +96 -0
- package/src/fontLigatures/processors/6-3.ts +73 -0
- package/src/fontLigatures/processors/8-1.ts +69 -0
- package/src/fontLigatures/processors/classDef.ts +84 -0
- package/src/fontLigatures/processors/coverage.ts +43 -0
- package/src/fontLigatures/processors/helper.ts +183 -0
- package/src/fontLigatures/processors/substitution.ts +59 -0
- package/src/fontLigatures/tables.ts +112 -0
- package/src/fontLigatures/types.ts +86 -0
- package/src/fontLigatures/walk.ts +67 -0
- package/src/index.ts +3 -3
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { Terminal } from '@xterm/xterm';
|
|
7
|
-
import { Font } from '
|
|
7
|
+
import { Font } from './fontLigatures/index';
|
|
8
8
|
|
|
9
9
|
import load from './font';
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ const CACHE_SIZE = 100000;
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Enable ligature support for the provided Terminal instance. To function
|
|
24
|
-
* properly, this must be called after `open()` is called on the
|
|
24
|
+
* properly, this must be called after `open()` is called on the terminal. If
|
|
25
25
|
* the font currently in use supports ligatures, the terminal will automatically
|
|
26
26
|
* start to render them.
|
|
27
27
|
* @param term Terminal instance from xterm.js
|
|
@@ -30,7 +30,7 @@ export function enableLigatures(term: Terminal, fallbackLigatures: string[] = []
|
|
|
30
30
|
let currentFontName: string | undefined = undefined;
|
|
31
31
|
let font: Font | undefined = undefined;
|
|
32
32
|
let loadingState: LoadingState = LoadingState.UNLOADED;
|
|
33
|
-
let loadError:
|
|
33
|
+
let loadError: unknown = undefined;
|
|
34
34
|
|
|
35
35
|
return term.registerCharacterJoiner((text: string): [number, number][] => {
|
|
36
36
|
// If the font hasn't been loaded yet, load it and return an empty result
|