feat(SquirrelTheme): allow customizing preedit area font - #1170
Merged
Conversation
Adds two style fields so the preedit row's font can be configured independently of the candidate text: - style/preedit_font_face - style/preedit_font_point Falls back to style/font_face / style/font_point when not set.
Member
|
可是可以,但是這項字體設置做什麼用呢?代碼裏並沒有使用。
|
Contributor
Author
是的有这个需求的人可能不多,我自己觉得对于某些字体能够单独调整大小的话视觉效果会协调一点,毕竟整个preedit和候选区的大小也是可以单独调整的,这个PR也是之前顺手一改的,您看看有没有必要吧!^_^ |
Member
|
哦,看到了, 上次沒看全。整行換字體,這倒是不複雜。如果要只換編碼部分就比較麻煩。 准了! |
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.
问题
现有的字形 fallback 是按字形覆盖选字体的,无法按界面区域区分。当同一种文字同时出现在 preedit 和候选区时(例如中英混输时两边都有拉丁字母),就没办法只改其中一个区域的字体。preedit 也无法单独设置字体大小而只是跟随全局的
style/font_point解决
新增两个 style 配置项,让 preedit 区域的字体可以独立于候选区域设置字体和大小:
style/preedit_font_facestyle/preedit_font_point未设置时回退到
style/font_face/style/font_point。实现方式与已有的label_font_*/comment_font_*相同,同样支持在配色方案中覆盖。配置
情况一:
情况二:
效果
情况一:

情况二:
