MCPcopy Create free account
hub / github.com/UNLINEARITY/Obsidian-CodeSpace / getFontSizeExtension

Method getFontSizeExtension

src/code_view.ts:855–874  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

853 }
854
855 getFontSizeExtension(): Extension {
856 // 使用 EditorView.theme 统一设置所有元素的字体大小和行高
857 const lineHeight = 1.5;
858 return EditorView.theme({
859 "&": {
860 fontSize: `${this.fontSize}px`
861 },
862 ".cm-content": {
863 fontSize: `${this.fontSize}px`,
864 lineHeight: `${lineHeight}`
865 },
866 ".cm-gutters": {
867 fontSize: `${this.fontSize}px`
868 },
869 ".cm-line": {
870 fontSize: `${this.fontSize}px`,
871 lineHeight: `${lineHeight}`
872 }
873 });
874 }
875
876 // 供外部调用的刷新方法
877 refreshSettings() {

Callers 3

refreshSettingsMethod · 0.95
initCodeMirrorMethod · 0.95
setupZoomHandlerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected