Skip to content

Commit 5766765

Browse files
committed
add Base fonts for windows
1 parent eadd66f commit 5766765

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

browser/components/MarkdownPreview.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const ipc = electron.ipcRenderer
1111

1212
const katex = window.katex
1313

14+
const OSX = global.process.platform === 'darwin'
15+
1416
const sanitizeOpts = {
1517
allowedTags: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol',
1618
'nl', 'li', 'b', 'i', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div',
@@ -202,7 +204,7 @@ export default class MarkdownPreview extends React.Component {
202204
dangerouslySetInnerHTML={{__html: ' ' + content}}
203205
style={{
204206
fontSize: this.state.fontSize,
205-
fontFamily: this.state.fontFamily.trim() + ', helvetica, arial, sans-serif'
207+
fontFamily: this.state.fontFamily.trim() + ', helvetica, arial' + (OSX ? '' : ', meiryo, \'Microsoft YaHei\'') + ', sans-serif'
206208
}}
207209
/>
208210
)

0 commit comments

Comments
 (0)