瀏覽代碼

字体调整

mxd 3 年之前
父節點
當前提交
89a3c431fa

二進制
magic-editor/src/console/src/assets/JetBrainsMono-Regular.woff2


+ 10 - 3
magic-editor/src/console/src/assets/index.css

@@ -1,6 +1,12 @@
+@font-face{
+    font-family:JetBrainsMono;
+    src:url(JetBrainsMono-Regular.woff2) format("woff2");
+    font-weight:100;
+    font-style:normal
+}
 .ma-container {
     font-size: 12px;
-    font-family: 'Consolas', "Courier New",monospace, '微软雅黑';
+    font-family: 'JetBrainsMono','Consolas', "Courier New",monospace, '微软雅黑';
     letter-spacing: 0px;
     overflow: auto;
     display: flex;
@@ -127,8 +133,9 @@
 
 }
 
-.ma-container pre{
-    font-family: 'Consolas', "Courier New",monospace, '微软雅黑';
+.ma-container pre,
+.ma-container .monaco-editor{
+    font-family: 'JetBrainsMono','Consolas', "Courier New",monospace, '微软雅黑';
 }
 
 .ma-container * {

+ 1 - 0
magic-editor/src/console/src/components/editor/magic-history.vue

@@ -46,6 +46,7 @@ export default {
       fixedOverflowWidgets: false,
       fontFamily: contants.EDITOR_FONT_FAMILY,
       fontSize: contants.EDITOR_FONT_SIZE,
+      fontLigatures: true
     })
     bus.$on('update-window-size', this.layout)
   },

+ 1 - 0
magic-editor/src/console/src/components/editor/magic-script-editor.vue

@@ -114,6 +114,7 @@ export default {
       theme: store.get('skin') || 'default',
       fontFamily: contants.EDITOR_FONT_FAMILY,
       fontSize: contants.EDITOR_FONT_SIZE,
+      fontLigatures: true,
       // 自动调整大小
       automaticLayout: true
     })

+ 1 - 0
magic-editor/src/console/src/components/layout/magic-request.vue

@@ -350,6 +350,7 @@
             lineDecorationsWidth: 35,
             fontFamily: contants.EDITOR_FONT_FAMILY,
             fontSize: contants.EDITOR_FONT_SIZE,
+            fontLigatures: true,
             theme: store.get('skin') || 'default',
             value: formatJson(this.info.requestBody) || '{\r\n\t\r\n}'
           })

+ 1 - 0
magic-editor/src/console/src/components/layout/magic-run.vue

@@ -112,6 +112,7 @@ export default {
         wordWrap: 'on',
         fontFamily: contants.EDITOR_FONT_FAMILY,
         fontSize: contants.EDITOR_FONT_SIZE,
+        fontLigatures: true,
         value: this.info.responseBody || '',
         theme: store.get('skin') || 'default'
       })

+ 1 - 0
magic-editor/src/console/src/components/layout/magic-search.vue

@@ -76,6 +76,7 @@ export default {
           lineDecorationsWidth: 0,
           wordWrap: 'on',
           readOnly: true,
+          fontLigatures: true,
           scrollBeyondLastLine: false,
           fontFamily: contants.EDITOR_FONT_FAMILY,
           fontSize: contants.EDITOR_FONT_SIZE,

+ 1 - 0
magic-editor/src/console/src/components/resources/magic-datasource-list.vue

@@ -315,6 +315,7 @@ export default {
             wordWrap: 'on',
             fontFamily: contants.EDITOR_FONT_FAMILY,
             fontSize: contants.EDITOR_FONT_SIZE,
+            fontLigatures: true,
             theme: store.get('skin') || 'default',
             value: formatJson(temp) || '{\r\n\t\r\n}'
           })

+ 1 - 1
magic-editor/src/console/src/scripts/contants.js

@@ -28,7 +28,7 @@ const contants = {
   JDBC_DRIVERS: [],
   DATASOURCE_TYPES: [],
   OPTIONS: [],
-  EDITOR_FONT_FAMILY: 'Consolas, "Courier New", monospace',
+  EDITOR_FONT_FAMILY: 'JetBrainsMono, Consolas, "Courier New",monospace, 微软雅黑',
   EDITOR_FONT_SIZE: 14,
   config: {}
 }