MCPcopy Create free account
hub / github.com/GCWing/BitFun / applyFontConfig

Function applyFontConfig

src/web-ui/src/tools/editor/components/CodeEditor.tsx:646–651  ·  view source on GitHub ↗
(c: Partial<EditorConfigType>)

Source from the content-addressed store, hash-verified

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);

Callers 1

initEditorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected