Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

豎排模式下某些字體顯示偏移 #616

Open
Eliot00 opened this issue Jan 24, 2022 · 6 comments
Open

豎排模式下某些字體顯示偏移 #616

Eliot00 opened this issue Jan 24, 2022 · 6 comments

Comments

@Eliot00
Copy link

Eliot00 commented Jan 24, 2022

截屏2022-01-24 下午12 04 44

MacOS: 11.2.1
鼠鬚管:0.15.2
字體:LxgwWenkai
配置:

patch:
  "style/color_scheme": my_custom
  "preset_color_schemes/my_custom":
    name: "my_custom"
    font_face: "LXGWWenKaiTC-Regular"
    font_point: 15.0
    candidate_list_layout: stacked
    text_orientation: vertical
    inline_preedit: false
    corner_radius: 15.0
    hilited_corner_radius: 11.0
    border_height: 1.0
    border_width: 1.0
    line_spacing: -2.0
    spacing: 6.0
    color_space: display_p3
    back_color: 0x6F603C
    border_color: 0x323232
    candidate_text_color: 0xD8FFFFFF
    comment_text_color: 0x3FFFFFFF
    label_color: 0xE5F07785
    hilited_candidate_back_color: 0x8CA557
    hilited_candidate_text_color: 0xD8FFFFFF
    hilited_comment_text_color: 0x3FFFFFFF
    hilited_candidate_label_color: 0xE5D9E1C2
    preedit_back_color: 0x323232
    text_color: 0x3FFFFFFF
    hilited_back_color: 0x323232
    hilited_text_color: 0xD8FFD2FF

試過幾種字體,只有楷體可以正常顯示

@LEOYoon-Tsaw
Copy link
Member

用offset調

@Eliot00
Copy link
Author

Eliot00 commented Jan 24, 2022

用offset調

这是哪个配置项?

@LEOYoon-Tsaw
Copy link
Member

LEOYoon-Tsaw commented Jan 30, 2022

style/base_offset
可以借助 https://github.com/LEOYoon-Tsaw/Squirrel-Designer 設計

@Eliot00
Copy link
Author

Eliot00 commented Feb 18, 2022

配置base_offse=-8.0,看上去稍微好看點

截屏2022-02-18 下午5 58 26

不過方案選單極光拼音的極光兩個字混到了一起,朙月拼音的朙字位置不統一,應該是字體fallback的原因

截屏2022-02-18 下午6 01 22

@LEOYoon-Tsaw
Copy link
Member

LEOYoon-Tsaw commented Feb 18, 2022

fallback沒辦法
AppKit對豎排的支援太差了,你如果能研究出來更好的實現就善莫大焉了
豎排的主要部份在這個函數裏

void convertToVerticalGlyph(NSMutableAttributedString *originalText, NSRange stringRange) {

@LEOYoon-Tsaw
Copy link
Member

LEOYoon-Tsaw commented Jul 3, 2022

在Pages中使用該字體,有很大偏移。所以這是字體本身的問題,我不管了,tag: won't fix
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants