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

Chinese fonts not working #6

Closed
brlin-tw opened this issue Jun 13, 2018 · 9 comments
Closed

Chinese fonts not working #6

brlin-tw opened this issue Jun 13, 2018 · 9 comments
Labels
bug Something isn't working

Comments

@brlin-tw
Copy link

Chinese characters in the interface are not properly rendered by default, as depicted with the following screenshot:

screenshot_20180613_235042

The default font used in the system:

$ fc-match sans
NotoSansCJK-Regular.ttc: "Noto Sans CJK TC" "Regular"
@mmtrt mmtrt added the bug Something isn't working label Jun 16, 2018
@mmtrt
Copy link
Owner

mmtrt commented Jun 16, 2018

does font render fine on normal wine install in npp aside from this snap.

@brlin-tw
Copy link
Author

Though the font selection is ugly as hell, yes:

screenshot_20180617_032431

Wine from WineHQ official deb archive, 3.0.1

@mmtrt
Copy link
Owner

mmtrt commented Jun 16, 2018

alright can you tell me the output all of these from regedit, export them individually also paste their contents or reg files so I could implement it further into the snap thanks.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements

also tell default font name used on npp as well.

@brlin-tw
Copy link
Author

brlin-tw commented Jun 17, 2018

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink
    Lucida Sans Unicode    REG_MULTI_SZ    MINGLIU.TTC,PMingLiu\0SIMSUN.TTC,SimSun\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang
    Microsoft Sans Serif    REG_MULTI_SZ    MINGLIU.TTC,PMingLiu\0SIMSUN.TTC,SimSun\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang
    Tahoma    REG_MULTI_SZ    MINGLIU.TTC,PMingLiu\0SIMSUN.TTC,SimSun\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes


HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes
    Arial Baltic,186    REG_SZ    Arial,186
    Arial CE,238    REG_SZ    Arial,238
    Arial CYR,204    REG_SZ    Arial,204
    Arial Greek,161    REG_SZ    Arial,161
    Arial TUR,162    REG_SZ    Arial,162
    Courier New Baltic,186    REG_SZ    Courier New,186
    Courier New CE,238    REG_SZ    Courier New,238
    Courier New CYR,204    REG_SZ    Courier New,204
    Courier New Greek,161    REG_SZ    Courier New,161
    Courier New TUR,162    REG_SZ    Courier New,162
    Helv    REG_SZ    MS Sans Serif
    Helvetica    REG_SZ    Arial
    MS Shell Dlg    REG_SZ    PMingLiU
    MS Shell Dlg 2    REG_SZ    Tahoma
    Times    REG_SZ    Times New Roman
    Times New Roman Baltic,186    REG_SZ    Times New Roman,186
    Times New Roman CE,238    REG_SZ    Times New Roman,238
    Times New Roman CYR,204    REG_SZ    Times New Roman,204
    Times New Roman Greek,161    REG_SZ    Times New Roman,161
    Times New Roman TUR,162    REG_SZ    Times New Roman,162
    Tms Rmn    REG_SZ    MingLiU

HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements

reg: The system was unable to find the specified registry key or value

NOTE:

  • The result is under LANG=zh_TW.UTF-8
  • This is an upstream build, should have different settings than builds from distributions

also tell default font name used on npp as well.

It seems to be using PMingLiU, but it really should use Noto Sans CJK/Droid Sans Fallback.

@mmtrt
Copy link
Owner

mmtrt commented Jun 17, 2018

@Lin-Buo-Ren thanks and I've working local npp snap with that noto cjk sc font that looks way better then PMingLiU so I'm implementing a check for detecting locale then use cjk font if user locale is on zh_* and I might implement command flag to change fonts to cjk

can you tell output of locale inside of npp snap shell of locale.

  • sudo snap run --shell notepad-plus-plus

then run

  • locale

PS: do tell locale output of your system as well.

@brlin-tw
Copy link
Author

In snap:

$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh_CN
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=

Host:

LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh_CN
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=

@mmtrt
Copy link
Owner

mmtrt commented Jun 17, 2018

Test 7.5.6 (62) on edge, gui font should be now Noto Sans CJK TC Regular though you have to manually set npp font to Noto Sans CJK TC Regular for text.

Make sure remove .wine folder from ~/snap/notepad-plus-plus/common/ before test.

@brlin-tw
Copy link
Author

brlin-tw commented Jun 17, 2018

screenshot_20180617_183825

The UI font change seems to be effective however the application locale are forced to English, it's switchable in setting UI though, just not default.

@brlin-tw
Copy link
Author

screenshot_20180617_184050

Yep it works properly now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants