Add fallback editor font family (#209)

This commit is contained in:
Felix Häusler 2018-04-26 04:19:39 +02:00 committed by 冉四夕
parent b8f33f9e6f
commit 68b0594597
2 changed files with 4 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "marktext", "name": "marktext",
"version": "0.9.25", "version": "0.10.21",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -2,8 +2,8 @@
<div <div
class="editor-wrapper" class="editor-wrapper"
:class="[{ 'typewriter': typewriter, 'focus': focus, 'source': sourceCode }, theme]" :class="[{ 'typewriter': typewriter, 'focus': focus, 'source': sourceCode }, theme]"
:style="{ 'color': theme === 'dark' ? darkColor : lightColor, 'lineHeight': lineHeight, 'fontSize': fontSize, :style="{ 'color': theme === 'dark' ? darkColor : lightColor, 'lineHeight': lineHeight, 'fontSize': fontSize,
'font-family': editorFontFamily ? `${editorFontFamily}, sans-serif`:'sans-serif'}" 'font-family': editorFontFamily ? `${editorFontFamily}, ${defaultFontFamily}` : `${defaultFontFamily}`}"
> >
<div <div
ref="editor" ref="editor"
@ -104,6 +104,7 @@
]) ])
}, },
data () { data () {
this.defaultFontFamily = '"Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'
return { return {
selectionChange: null, selectionChange: null,
editor: null, editor: null,