feat: bundle M PLUS 1 as default overlay font

- Add M PLUS 1 variable weight font (100-900) to src/renderer/fonts/
- Add @font-face declaration in style.css
- Update default fontFamily for primary and secondary subtitles
- Add macOS (Hiragino Sans) and Windows (Yu Gothic) fallbacks
- Update build script to copy fonts dir to dist/renderer/
This commit is contained in:
2026-02-19 20:34:25 -08:00
parent 18648cb6fc
commit a3569afdcf
4 changed files with 12 additions and 4 deletions

View File

@@ -173,7 +173,7 @@ export const DEFAULT_CONFIG: ResolvedConfig = {
subtitleStyle: {
enableJlpt: false,
preserveLineBreaks: false,
fontFamily: 'Noto Sans CJK JP Regular, Noto Sans CJK JP, Arial Unicode MS, Arial, sans-serif',
fontFamily: 'M PLUS 1, Noto Sans CJK JP Regular, Noto Sans CJK JP, Hiragino Sans, Hiragino Kaku Gothic ProN, Yu Gothic, Arial Unicode MS, Arial, sans-serif',
fontSize: 35,
fontColor: '#cad3f5',
fontWeight: 'normal',
@@ -202,7 +202,7 @@ export const DEFAULT_CONFIG: ResolvedConfig = {
backgroundColor: 'transparent',
fontWeight: 'normal',
fontStyle: 'normal',
fontFamily: 'Noto Sans CJK JP Regular, Noto Sans CJK JP, Arial Unicode MS, Arial, sans-serif',
fontFamily: 'M PLUS 1, Noto Sans CJK JP Regular, Noto Sans CJK JP, Hiragino Sans, Hiragino Kaku Gothic ProN, Yu Gothic, Arial Unicode MS, Arial, sans-serif',
},
},
auto_start_overlay: false,

Binary file not shown.

View File

@@ -16,6 +16,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
@font-face {
font-family: 'M PLUS 1';
src: url('./fonts/MPLUS1[wght].ttf') format('truetype');
font-weight: 100 900;
font-display: swap;
}
* {
margin: 0;
padding: 0;
@@ -29,7 +36,8 @@ body {
overflow: hidden;
background: transparent;
font-family:
'Noto Sans CJK JP Regular', 'Noto Sans CJK JP', 'Arial Unicode MS', Arial, sans-serif;
'M PLUS 1', 'Noto Sans CJK JP Regular', 'Noto Sans CJK JP', 'Hiragino Sans',
'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Arial Unicode MS', Arial, sans-serif;
}
#overlay {