-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add lang specific font stacks for CJK #6007
Add lang specific font stacks for CJK #6007
Conversation
Agh so that's the reason for the !important - sorry I removed that. Have you set your Gitea language to Chinese? That should also change the font stack - I don't see the lang matcher in your screenshot |
Signed-off-by: Andrew Thornton <art27@cantab.net>
@lunny, I've added back in the !important to override the semantic-ui css. I think this probably isn't the correct way to do it, but it's the way we've been doing it. I've also added a reoverride to restore the icons. Any chance you could retest? |
Codecov Report
@@ Coverage Diff @@
## master #6007 +/- ##
==========================================
- Coverage 38.89% 38.87% -0.02%
==========================================
Files 363 363
Lines 51210 51211 +1
==========================================
- Hits 19917 19909 -8
- Misses 28425 28434 +9
Partials 2868 2868
Continue to review full report at Codecov.
|
I have set the welcome page's language as Simplified Chinese, but it seems the
|
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Heya @lunny, it's unfortunately not just a template and less change so you need to rebuild gitea to get it to put the language into the context. I've put some more changes in to simply override the semantic css where necessary rather than use important. It's horrible but without it icons and monospace won't work properly. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath Conflicts. |
I can confirm it is rendering English glyphs, as it is placed right at the beginning of the fallback list, a decision I cannot put up with. Gitea is definitely ahead regarding i18n!
Yes, please! The stacks in d014ae5 look thrilling indeed, but I don't get why Microsoft YaHei gets prioritized over PingFang SC. My current private settings look like this:
Some humble personal opinions:
|
Conflict |
Seems obvious that such a thorough rewrite of Remark on updating Lato: the original files (same as on Google Fonts) are significantly out of date, but I didn't touch them considering the lack of legacy iOS support with the updated files. Instead I just dropped in the new files (larger, but not really a big issue for me, at least not as serious as the inconsistencies with Cyrillic/Latin-Extended rendering). Of course this wouldn't matter if we were to ditch Lato in favor of native system fonts. |
We are having a discussing in #6203 on how to avoid these merge conflicts for css (and potentially js) bundles. |
commit 7d1679e9079541359869c9e677ba7412bfcc59f3 Author: Mike L <cl.jeremy@qq.com> Date: Wed Mar 13 13:53:49 2019 +0100 Remove missed YaHei leftover from _home.less commit 0079121ea91860a323ed4e5cc1a9c0d490d9cefd Author: Mike L <cl.jeremy@qq.com> Date: Wed Mar 13 12:03:54 2019 +0100 Fix overdone fixes (inherit, :lang) commit 62c919915928ec1db4731d547e95885f91a0618d Author: Mike L <cl.jeremy@qq.com> Date: Wed Mar 13 02:29:10 2019 +0100 Fix elements w/ explicit lang (language chooser) commit b3117587aa2eb8570d60bed583a11ee5565418be Author: Mike L <cl.jeremy@qq.com> Date: Tue Mar 12 20:17:26 2019 +0100 Fix textarea also (to match body) commit 81cedf2c3012c4dd05a7680782b4a98e1b947f67 Author: Mike L <cl.jeremy@qq.com> Date: Tue Mar 12 19:41:39 2019 +0100 Revert css temporarily to fix conflict commit 80ff82797f3203cbeaf866f22e961334e137df89 Author: Mike L <cl.jeremy@qq.com> Date: Tue Mar 12 19:15:30 2019 +0100 Tweak CJK, fix Yu Gothic, more monospace inherits commit 581dceb9a869646c2c486dabb925c88c2680d70c Author: Mike L <cl.jeremy@qq.com> Date: Mon Mar 11 13:09:26 2019 +0100 Add Lato for latin extd. & cyrillic, improve CJK
With changes from @CL-Jeremy
Thanks @CL-Jeremy for your changes. So the major negative thing that is left in this PR is the use of the specific semanticUI overrides. The main benefit of doing it that way is that you don't have |
Unfortunately, this is still unavailable for Chinese language environment. The sementic ui will override index.css. I think maybe we could move this to v1.9 @zeripath |
Moving to 1.9 |
Are you sure you have used the latest code base? I believe I have cleared the last trace of these general rules in the latest commit. Probably you used my commit without If you may, please check the instance on https://mikeslab.dix.asia/gitea, which is built with the changes from this PR, plus the deletion of |
@lunny it seems you've never had this working for you. Are you sure you've not ended up with cached templates or stylesheets? It's worth noting it won't select the Chinese stack unless you set the language to Chinese. |
@zeripath @CL-Jeremy It seems it's my Chrome cache problem? I tested it again on my Firefox, it's OK for Simple Chinese |
So in 1.8? |
The PR #5983 proposed deleting the YaHei font from the default font stack in order to fix issues with the presentation of Kanji in Japanese being forced in to simplified Chinese glyph forms. The Meiryo UI font being removed earlier.
The underlying issue is Han Unification - any font providing the Han unified glyphs has to choose a glyph form. Therefore deleting fonts isn't the answer, we need to provide different fonts and tell them to choose the right glyph forms for CJK languages.
We should also probably choose a default glyph form to display - likely that is simplified Chinese in honour of @lunny one of our owners.
This PR proposes that we should set up CJK language specific font-families and then set these as appropriate. It doesn't deal with the issue of documents that should contain different languages, in say markdown etc. That should be dealt with at a later point.