[PR #484] [MERGED] feat: 支持为日语单独设置字体 #477

Closed
opened 2026-02-27 07:11:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/imsyy/SPlayer/pull/484
Author: @MoYingJi
Created: 10/9/2025
Status: Merged
Merged: 10/13/2025
Merged by: @imsyy

Base: devHead: feat


📝 Commits (6)

📊 Changes

5 files changed (+75 additions, -3 deletions)

View changed files

📝 src/components/Player/MainAMLyric.vue (+28 -0)
📝 src/components/Player/MainLyric.vue (+8 -3)
📝 src/components/Setting/GeneralSetting.vue (+27 -0)
📝 src/stores/setting.ts (+2 -0)
📝 src/utils/lyric.ts (+10 -0)

📄 Description

原因是:在日本标准中某些汉字的字形与中国标准并不一致,单独设置字体以获得更好的体验

更改

  • 增加「日语歌词字体」设置项
  • lyric.ts 下新增函数 getLyricLanguage 用于简单的获取歌词语言,将原 MainLyric.vue 中歌词的 lang 属性改为这个函数获取
  • MainLyric.vueMainAMLyric.vue 都增加了当 lang=ja 时使用特定字体的 css
  • MainAMLyric.vue 的歌词也使用 getLyricLanguage 设置了 lang 属性

缺点

目前 getLyricLanguage 比较简陋,是根据这行歌词是否含有日语假名进行的判断,对一整行都没有假名的全汉字歌词没法判断


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/imsyy/SPlayer/pull/484 **Author:** [@MoYingJi](https://github.com/MoYingJi) **Created:** 10/9/2025 **Status:** ✅ Merged **Merged:** 10/13/2025 **Merged by:** [@imsyy](https://github.com/imsyy) **Base:** `dev` ← **Head:** `feat` --- ### 📝 Commits (6) - [`60f7517`](https://github.com/imsyy/SPlayer/commit/60f751713a69d792c30fd9ce45e56dcde883e561) 日文字形设置和 MainLyric 的基础支持 - [`554cf45`](https://github.com/imsyy/SPlayer/commit/554cf45500e3384f614382866d44497d14a4458e) fix - [`52e8458`](https://github.com/imsyy/SPlayer/commit/52e84585905b42d464fc8a5b3a7ecc7431fdf7d0) fix - [`86f33d0`](https://github.com/imsyy/SPlayer/commit/86f33d054a809d30fdbc17a15e9519bc9375315e) 日语单独字体 AM 支持 - [`6158dd2`](https://github.com/imsyy/SPlayer/commit/6158dd27509d12bf67ca6646d321b9ed51d93178) Merge branch 'imsyy:dev' into feat - [`89117d4`](https://github.com/imsyy/SPlayer/commit/89117d4198c506a5ece0f1b46162f2068c77d694) 规范代码 ### 📊 Changes **5 files changed** (+75 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/components/Player/MainAMLyric.vue` (+28 -0) 📝 `src/components/Player/MainLyric.vue` (+8 -3) 📝 `src/components/Setting/GeneralSetting.vue` (+27 -0) 📝 `src/stores/setting.ts` (+2 -0) 📝 `src/utils/lyric.ts` (+10 -0) </details> ### 📄 Description 原因是:在日本标准中某些汉字的字形与中国标准并不一致,单独设置字体以获得更好的体验 ## 更改 - 增加「日语歌词字体」设置项 - `lyric.ts` 下新增函数 `getLyricLanguage` 用于简单的获取歌词语言,将原 `MainLyric.vue` 中歌词的 `lang` 属性改为这个函数获取 - 为 `MainLyric.vue` 和 `MainAMLyric.vue` 都增加了当 `lang=ja` 时使用特定字体的 css - `MainAMLyric.vue` 的歌词也使用 `getLyricLanguage` 设置了 `lang` 属性 ## 缺点 目前 `getLyricLanguage` 比较简陋,是根据这行歌词是否含有日语假名进行的判断,对一整行都没有假名的全汉字歌词没法判断 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:11:59 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SPlayer#477
No description provided.