feat: 支持为日语单独设置字体#484
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原因是:在日本标准中某些汉字的字形与中国标准并不一致,单独设置字体以获得更好的体验
更改
lyric.ts下新增函数getLyricLanguage用于简单的获取歌词语言,将原MainLyric.vue中歌词的lang属性改为这个函数获取MainLyric.vue和MainAMLyric.vue都增加了当lang=ja时使用特定字体的 cssMainAMLyric.vue的歌词也使用getLyricLanguage设置了lang属性缺点
目前
getLyricLanguage比较简陋,是根据这行歌词是否含有日语假名进行的判断,对一整行都没有假名的全汉字歌词没法判断