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

Use language-specific fonts for CJK #183

Closed
peller opened this issue May 24, 2019 · 5 comments
Closed

Use language-specific fonts for CJK #183

peller opened this issue May 24, 2019 · 5 comments
Assignees

Comments

@peller
Copy link

peller commented May 24, 2019

Expected Behavior

These are the fonts were were told to use for the respective locales:

ja-JP:

    font-family: 'adobe-clean-han-japanese', 'Yu Gothic', '\30E1 \30A4 \30EA \30AA', '\30D2 \30E9 \30AE \30CE \89D2 \30B4  Pro W3', 'Hiragino Kaku Gothic Pro W3', 'Osaka', '\FF2D \FF33 \FF30 \30B4 \30B7 \30C3 \30AF', 'MS PGothic', sans-serif;

zh-TW aka zh-hant:

    font-family: 'adobe-clean-han-traditional', 'MingLiu', 'Heiti TC Light', sans-serif;

zh-CN aka zh-hans and/or zh:

    font-family: 'adobe-clean-han-simplified', 'SimSun', 'Heiti SC Light', sans-serif;

ko-KO:

    font-family: 'adobe-clean-han-korean', 'Malgun Gothic', 'Apple Gothic', sans-serif;

Actual Behavior

We are seeing adobe-clean-han-japanese for all CJK locales:

.spectrum {
  font-family: adobe-clean, "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
.spectrum:lang(zh-Hans) {
    font-family: adobe-clean-han-japanese, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }
.spectrum:lang(zh) {
    font-family: adobe-clean-han-japanese, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }
.spectrum:lang(ko) {
    font-family: adobe-clean-han-japanese, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }
.spectrum:lang(ja) {
    font-family: adobe-clean-han-japanese, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Spectrum-CSS version

2.10.0

Sample Code that illustrates the problem

Screenshots (if applicable)

@lazd
Copy link
Member

lazd commented May 28, 2019

@GarthDB can you look into this?

@GarthDB
Copy link
Member

GarthDB commented May 28, 2019

Yeah - there was some work left in DNA to update the default font list. I'll revisit it.

@peller
Copy link
Author

peller commented May 30, 2019

@GarthDB please apply the same locale-specific override logic for .spectrum-Textfield

https://github.com/adobe/spectrum-css/blob/master/src/textfield/index.css#L30

@ybayer
Copy link

ybayer commented May 31, 2019

@GarthDB In this commit, individual CCJK Adobe Clean Han fonts are replaced with a single one just with Japanese Adobe Clean Han fonts.

  --spectrum-font-family-zh: adobe-clean-han-traditional, var(--spectrum-font-family-base);
  --spectrum-font-family-zhhans: adobe-clean-han-simplified-c, var(--spectrum-font-family-base);
  --spectrum-font-family-ko: adobe-clean-han-korean, var(--spectrum-font-family-base);
  --spectrum-font-family-ja: adobe-clean-han-japanese,  var(--spectrum-font-family-base);
 --spectrum-font-family-han: adobe-clean-han-japanese, var(--spectrum-font-fallbacks-sans);

Don't we need to keep them separately because each Adobe Clean Han fonts are different fonts? We've seen weird rendering behavior in the app for Korean, S. Chinese and T. Chinese.
In Utility Nav, even though, UI is Korean, the font stack is "adobe-clean-han-japanese" where is should be "adobe-clean-han-korean".

Korean

@lazd
Copy link
Member

lazd commented Nov 6, 2019

This was fixed by #248

@lazd lazd closed this as completed Nov 6, 2019
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

5 participants