| 644 | let createFontWeight = editorConfigRuntimeRef.current.font_weight || 'normal'; |
| 645 | let createLineHeight = 0; |
| 646 | const applyFontConfig = (c: Partial<EditorConfigType>) => { |
| 647 | createFontSize = c.font_size ?? 14; |
| 648 | createFontFamily = c.font_family || createFontFamily; |
| 649 | createFontWeight = c.font_weight || createFontWeight; |
| 650 | createLineHeight = c.line_height ? Math.round(createFontSize * c.line_height) : 0; |
| 651 | }; |
| 652 | try { |
| 653 | const preloadConfig = await configManager.getConfig<EditorConfigType>('editor'); |
| 654 | if (preloadConfig) applyFontConfig(preloadConfig); |