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

Some issues when making Adobe Source Han Sans as default Chinese fonts #57

Closed
epico opened this issue Aug 25, 2014 · 9 comments
Closed
Assignees
Labels

Comments

@epico
Copy link

epico commented Aug 25, 2014

The new Adobe Source Chinese fonts are great!
I plan to use the Adobe Source Han Sans as default Chinese fonts for Fedora 21.

After discussion, I found an issue about non-monospaced English characters.

In Fedora, we usually provide one font for each language.
So we also use this font as default monospace font on Linux terminal.

But the English characters are not monospaced, which the Linux terminal can't handle it.

From terminal spec, the terminal can handle dual-width fonts gracefully.
Chinese characters are handled correctly, but some English characters like "@" will overlap other characters.

Could you make the English characters monospaced?
Or add a new font with monospaced English characters to the zip archive?

Here are the screenshots for Linux terminal.
gnome-terminal

@miguelsousa
Copy link
Member

Can you use Source Code Pro for the English?

@epico
Copy link
Author

epico commented Aug 25, 2014

I am the Chinese font maintainer of Fedora.

Yes, I can prepend an English fonts in fontconfig conf file.
But this approach may break some legacy applications, which is not allowed in Fedora Packaging.

We removed all binding="strong" from nearly all fonts in Fedora to fix the legacy applications, which is needed for English font prepend to take effects.

From the screenshot, maybe only a few glyphs needs adjustment.
English characters are okay, but "@" has the problem.
Do you need a list of English characters which needs fixes?

@miguelsousa
Copy link
Member

I think that the problem is with the Linux Terminal and not with the fonts. If you look closely at your screenshot, you'll see that only the @ and the numbers are set in Source Han Sans. All the letters in the prompt line (e.g. epico, Desktop) are from some other font.

@epico
Copy link
Author

epico commented Aug 25, 2014

Sorry, I make some mistake in the previous screenshot.
Please check the new one, thanks:
gnome-terminal2

@miguelsousa
Copy link
Member

You're trying to use a proportional width font in an environment that requires a mono width font.
Source Hans Sans is not going to work for you. I think your only options are:

  • use a different font
  • use Source Han Sans for the CJK characters, and Source Code Pro for all the other characters
  • hire a font designer to modify Source Han Sans to suit your needs

@kenlunde kenlunde added DIY and removed invalid labels Aug 25, 2014
@kenlunde kenlunde self-assigned this Aug 25, 2014
@kenlunde
Copy link
Contributor

This is a DIY (Do It Yourself) issue, because the glyphs for half-width ASCII are present in the font, but are not encoded by default. They are accessible via the 'hwid' GSUB feature. If you want them to be encoded by default, the source UTF-32 CMap resource needs to be modified, and you then rebuild the OpenType font, being sure to specify the modified UTF-32 CMap resources as the argument of the "-ch" command-line option. The modification is simple. Change the following line:

<00000020> <0000007e> 1

To this:

<00000020> <0000007e> 63039

That will map the range U+0020 through U+007E to CIDs 63039 through 63133, which are the glyphs for half-width ASCII.

@epico
Copy link
Author

epico commented Aug 26, 2014

Thanks very much for the information!
I will have a try.

@epico
Copy link
Author

epico commented Aug 27, 2014

I tried the changes, it works!

Are you willing to encode the half-width ASCII in monospace fonts?
We need to package Chinese fonts in Fedora Linux.

URL:
https://admin.fedoraproject.org/pkgdb/package/adobe-source-han-sans-cn-fonts/
https://admin.fedoraproject.org/pkgdb/package/adobe-source-han-sans-twhk-fonts/

@kenlunde
Copy link
Contributor

I knew that it would work. ☺

We are considering this at the moment. See: https://code.google.com/p/noto/issues/detail?id=136

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

No branches or pull requests

3 participants