Skip to content

Commit e1d0620

Browse files
committed
add noto emoji font; add restart function
1 parent 7df9f0c commit e1d0620

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Diff for: demo/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/fonts/NotoColorEmoji-Regular.ttf

22.9 MB
Binary file not shown.

Diff for: src/leanmonaco.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ export type LeanMonacoOptions = {
181181
"JuliaMono",
182182
`url(${new URL("./fonts/JuliaMono-Regular.ttf", import.meta.url)})`,
183183
),
184+
new FontFace(
185+
"Noto Color Emoji",
186+
`url(${new URL("./fonts/NotoColorEmoji-Regular.ttf", import.meta.url)})`,
187+
),
184188
// new FontFace(
185189
// "LeanWeb",
186190
// `url(${new URL("./fonts/LeanWeb-Regular.otf", import.meta.url)})`,
@@ -215,7 +219,7 @@ export type LeanMonacoOptions = {
215219

216220
// other options
217221
"editor.renderWhitespace": "trailing",
218-
"editor.fontFamily": "'JuliaMono'",
222+
"editor.fontFamily": "'JuliaMono', 'Noto Color Emoji'",
219223
"editor.wordWrap": "on",
220224
"editor.wrappingStrategy": "advanced",
221225
"workbench.colorTheme": "Visual Studio Light",
@@ -300,6 +304,14 @@ export type LeanMonacoOptions = {
300304
}
301305
}
302306

307+
/** Restarting all clients.
308+
* Note: I think with the current implementation, there is always just one client
309+
* (is that true?), but the vscode-extension is designed for more.
310+
*/
311+
restart() {
312+
this.clientProvider?.getClients().map(client => {client.restart()})
313+
}
314+
303315
dispose() {
304316
if (LeanMonaco.activeInstance == this) {
305317
LeanMonaco.activeInstance = null

0 commit comments

Comments
 (0)