Skip to content

Commit 906acbd

Browse files
committed
web: enable font ligatures
1 parent c09a2c8 commit 906acbd

File tree

12 files changed

+47
-26
lines changed

12 files changed

+47
-26
lines changed
-375 KB
Binary file not shown.

web/public/fonts/CascadiaMono.ttf

-332 KB
Binary file not shown.
-357 KB
Binary file not shown.

web/public/fonts/FiraCode-Bold.ttf

317 KB
Binary file not shown.
288 KB
Binary file not shown.
292 KB
Binary file not shown.
288 KB
Binary file not shown.
304 KB
Binary file not shown.

web/src/editor/props.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ export const DEMO_CODE = [
1616

1717
// stateToOptions converts MonacoState to IEditorOptions
1818
export const stateToOptions = (state: MonacoSettings): monaco.editor.IEditorOptions => {
19-
const {selectOnLineNumbers, mouseWheelZoom, smoothScrolling, cursorBlinking, cursorStyle, contextMenu } = state;
19+
const {
20+
selectOnLineNumbers,
21+
mouseWheelZoom,
22+
smoothScrolling,
23+
cursorBlinking,
24+
fontLigatures,
25+
cursorStyle,
26+
contextMenu
27+
} = state;
2028
return {
21-
selectOnLineNumbers, mouseWheelZoom, smoothScrolling, cursorBlinking, cursorStyle,
29+
selectOnLineNumbers, mouseWheelZoom, smoothScrolling, cursorBlinking, cursorStyle, fontLigatures,
2230
fontFamily: state.fontFamily ? getFontFamily(state.fontFamily) : getDefaultFontFamily(),
2331
showUnused: true,
2432
automaticLayout: true,

web/src/services/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export enum RuntimeType {
1515

1616
export interface MonacoSettings {
1717
fontFamily: string,
18+
fontLigatures: boolean,
1819
cursorBlinking: 'blink' | 'smooth' | 'phase' | 'expand' | 'solid',
1920
cursorStyle: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin',
2021
selectOnLineNumbers: boolean,
@@ -26,6 +27,7 @@ export interface MonacoSettings {
2627

2728
const defaultMonacoSettings: MonacoSettings = {
2829
fontFamily: DEFAULT_FONT,
30+
fontLigatures: false,
2931
cursorBlinking: 'blink',
3032
cursorStyle: 'line',
3133
selectOnLineNumbers: true,

0 commit comments

Comments
 (0)