From d04bdc881db49dd45e53edd2ef203166e99654e1 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Thu, 18 Jul 2019 22:51:04 +0900
Subject: [PATCH] Add default fonts for emoji in Linux
---
src/renderer/App.vue | 2 +-
src/renderer/store/Preferences/Appearance.ts | 2 +-
src/renderer/utils/fonts/index.js | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/renderer/App.vue b/src/renderer/App.vue
index 28937b16..0f91147d 100644
--- a/src/renderer/App.vue
+++ b/src/renderer/App.vue
@@ -80,7 +80,7 @@ body,
}
--specified-fonts: 'Noto Sans', 'Noto Sans CJK JP', 'Takaoゴシック', 'ヒラギノ角ゴ ProN W3', '-apple-system', 'BlinkMacSystemFont',
- 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
+ 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Noto Emoji';
font-family: var(--specified-fonts);
diff --git a/src/renderer/store/Preferences/Appearance.ts b/src/renderer/store/Preferences/Appearance.ts
index fee91293..42a69567 100644
--- a/src/renderer/store/Preferences/Appearance.ts
+++ b/src/renderer/store/Preferences/Appearance.ts
@@ -37,7 +37,7 @@ const mutations: MutationTree = {
state.appearance = conf
},
[MUTATION_TYPES.UPDATE_FONTS]: (state, fonts: Array) => {
- state.fonts = fonts
+ state.fonts = Array.from(new Set(fonts))
}
}
diff --git a/src/renderer/utils/fonts/index.js b/src/renderer/utils/fonts/index.js
index b16ef4a7..cdeeeeef 100644
--- a/src/renderer/utils/fonts/index.js
+++ b/src/renderer/utils/fonts/index.js
@@ -10,5 +10,7 @@ export default [
'Helvetica Neue',
'Apple Color Emoji',
'Segoe UI Emoji',
- 'Segoe UI Symbol'
+ 'Segoe UI Symbol',
+ 'Noto Color Emoji',
+ 'Noto Emoji'
]