Skip to content

Commit 6f3f8ca

Browse files
authored
Merge pull request #120 from ut-code/xterm-mplus
NotoSansJPをやめる
2 parents 4d5f461 + 9e1536d commit 6f3f8ca

File tree

5 files changed

+7
-24
lines changed

5 files changed

+7
-24
lines changed

app/globals.css

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,19 @@ mycdark:
124124
/* CDNからダウンロードするURLを指定したらなんかエラー出るので、npmでインストールしてlayout.tsxでimportすることにした */
125125
@theme {
126126
/*
127-
Variable がついているほうはlayout.tsxでインポートしているwebフォント、
128-
それ以外はフォールバック (インストールされていればwebフォントをダウンロードする必要はないため)
127+
Inconsolata Variable はlayout.tsxでインポートしているwebフォント
129128
130-
UbuntuでシステムにインストールされたInconsolataには、太字がなかったので、Inconsolataは除外
129+
UbuntuでシステムにインストールされたInconsolataには、太字がなかったので、Inconsolata は使用しない
131130
それに加えて、 "Inconsolata", "Inconsolata Variable" という指定にしたとしても
132131
terminal.tsxで Inconsolata Variable をloadしているので意味ない...
133132
134-
NotoSansJPの指定は正直なくても良い気はするが
133+
日本語フォントは正直なんでもいいが
135134
あまり変なフォントが選ばれるとxtermやaceエディターの表示が崩れる可能性があるので、
136-
確実にフォントを統一するために適当に指定している
135+
確実にフォントを統一するためにRoundedM+を指定することにした
136+
以前NotoSansJPを指定していたが、xterm.jsで全角の()の幅がバグった
137137
*/
138138
--font-mono:
139-
"Inconsolata Variable",
140-
/* Inconsolataのfallbackとしての欧文フォント */ "Inconsolata",
141-
"Noto Sans Mono", "Roboto Mono", "SFMono-Regular", "Menlo", "Monaco",
142-
"Consolas", "Liberation Mono", "Courier New",
143-
/* 日本語用にNotoSans */ "Noto Sans Mono CJK JP", "Noto Sans JP",
144-
"Noto Sans CJK JP", "Source Han Sans JP", "Noto Sans JP Variable", monospace;
139+
"Inconsolata Variable", "Rounded M+ 1c", "Rounded M+ 1p", "M PLUS Rounded 1c", monospace;
145140
/*
146141
本家のフォント名は Rounded M+ 1c 、または1pでもいいかも
147142
layout.tsxでインポートしているwebフォントが M PLUS Rounded 1c

app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Metadata } from "next";
2-
import "@fontsource-variable/noto-sans-jp";
32
import "@fontsource-variable/inconsolata";
43
import "@fontsource/m-plus-rounded-1c/400.css";
54
import "@fontsource/m-plus-rounded-1c/700.css";

app/terminal/terminal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export function useTerminal(props: TerminalProps) {
133133
lineHeight: 1.2,
134134
letterSpacing: 0,
135135
fontFamily:
136-
"'Inconsolata Variable', 'Noto Sans JP', 'Noto Sans CJK JP', 'Source Han Sans JP', '源ノ角ゴシック', 'Noto Sans JP Variable', monospace",
136+
"'Inconsolata Variable', 'Rounded M+ 1c', 'Rounded M+ 1p', 'M PLUS Rounded 1c', monospace",
137137
theme: computeTerminalTheme(),
138138
});
139139
terminalInstanceRef.current = term;

package-lock.json

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
},
1818
"dependencies": {
1919
"@fontsource-variable/inconsolata": "^5.2.7",
20-
"@fontsource-variable/noto-sans-jp": "^5.2.6",
2120
"@fontsource/m-plus-rounded-1c": "^5.2.9",
2221
"@google/genai": "^1.21.0",
2322
"@opennextjs/cloudflare": "^1.7.1",

0 commit comments

Comments
 (0)