Closed wwwwwwzx closed 3 years ago
Thanks for the PR!
I have a concern about memory usage (that I already had for the Korean font at the time).
How large is the Chinese font? Does it contain latin characters as well?
My idea would be to only load Chinese font if the system language is Chinese (same for Korean). What do you think?
Agree with loading the font if the system language is so. (But I am not familiar with the API) Have done this for Plutonium: https://github.com/zaksabeast/CaptureSight/pull/18/commits/aaccce5cb20282462d2c444bab48393aa1d3a4c3
And can we avoid loading the Latin font as well? Or do you need both on Chinese systems?
Le 19 juillet 2020 11:18:54 wwwwwwzx notifications@github.com a écrit :
Agree with loading the font if the system language is so. (But I am not familiar with the API) Have done this for Plutonium: zaksabeast/CaptureSight@aaccce5 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Latin font should always be loaded. In EdiZon for example I always fall back to thr English translation if there's none in the currently selected language. That way you can have translations but don't make your app completely unusable if a few important translations are missing
@WerWolv yeah but what if the Chinese font also contains [A-Za-z0-9]? We don't need to load both then, do we?
Does it have it? I never checked. If so then yeah. A way to still force load the fonts if needed would be nice though. I have a custom language switcher in my settings which really depends on all of them
Well then I guess we can start by only loading Chinese and Korean if the system language needs it.
@wwwwwwzx can you make the change in your PR?
Checked in CaptureSight.
That looks nice! Can you ensure that all latin characters are present, including accentued ones? It's for @WerWolv
Also I'm going to ask you to run./scripts/format --fix
(you will need clang-format >= 10) and rebase + squash your PR before I can merge it.
Tested with string: "Å å Ǻ ǻ Ḁ ḁ ẚ Ă ă Ặ ặ Ắ ắ Ằ ằ Ẳ ẳ Ẵ ẵ Ȃ ȃ Â â Ậ ậ Ấ ấ Ầ ầ Ẫ ẫ Ẩ ẩ Ả ả Ǎ ǎ Ⱥ ⱥ Ȧ ȧ Ǡ ǡ Ạ ạ Ä ä Ǟ ǟ À à Ȁ ȁ Á á Ā ā Ā̀ ā̀ Ã ã Ą ą Ą́ ą́ Ą̃ ą̃ A̲ a̲ ᶏ" (copied from wiki) Only loaded Chinese font Added regular font So probably let's load the regular font in Chinese and Korean system as well.
clang-format is automatically running in my IDE. I have 14 other changed files after running the script. Are you sure to squash them into this pull request?
clang-format is automatically running in my IDE. I have 14 other changed files after running the script. Are you sure to squash them into this pull request?
Uh, no 😅 Please run it using the script we provide, it has our configuration with our code style in it.
Then we need to always load regular latin font as well, which is what you did in the commit.
However it seems like you catched junk from master while rebasing, can you fix that please?
I did run your script. And at first, the error is the following (I have 10.0.0 installed):
run-clang-format.py: error: Command 'clang-format-8 --version' failed to start: [Errno 2] No such file or directory
After changing the --clang-format-executable
to clang-format
, there are 14 changed files (see the second commit)
Oh shoot I misunderstood the first time. Let me run clang-format on the entirety of master, that way it doesn't interfere with your changes. Sorry about that.
Uh, conflicts are still there. Sorry I am not familiar with git commands.
You need to rebase on the master branch, they should resolve themselves
If not, git will prompt you to fix them and it should be fairly easy
Hi, sorry for the delay! I do not accept contributions for master anymore so I will be closing this PR. #76 aims to reimplement what you did in the rework branch, if you want to have a look.
also works for traditional Chinese characters. issue #26