chrissimpkins / codeface

Typefaces for source code beautification
Other
6.21k stars 415 forks source link

CJK glyph support in fonts #55

Closed chrissimpkins closed 8 years ago

chrissimpkins commented 9 years ago

Info from Unicode consortium: http://www.unicode.org/faq/han_cjk.html

Snack-X commented 9 years ago

I think almost every fonts at here don't support CJK glyphs.

There is a CJK(actually JK) font designed for code, called NanumGothic Coding(나눔고딕 코딩).

You can download it at here.

chrissimpkins commented 9 years ago

Thank you! I am looking for more and will include this one. There is Japanese glyph support in the M+ fonts.

chrissimpkins commented 9 years ago

@Snack-X : Added new issue for this font #65. I will have a look to confirm the license and include it.

chrissimpkins commented 9 years ago

@Snack-X: NanumGothic Coding is now included in the list. If you happen to know of any others, please let me know. Thanks much!

Snack-X commented 9 years ago

NAVER Corp. released another font called D2 Coding. It is licensed under OFL.

It supports:

Not full CJK support, but partial CJK.

You can download it at here.

D2Coding

chrissimpkins commented 9 years ago

Thanks for suggesting this. Looks great. I will try to update the repository tomorrow and add it to the font zip archive.

chrissimpkins commented 9 years ago

@Snack-X created issue #109 for this

be5invis commented 9 years ago

Well I also made a composite font contains CJK characters and Iosevka: Iosevka Inziu. The "inziu" also contains hints generated by sfdhanautohint.

ps. Recently Iosevka has changed a lot. Please update your images.

chrissimpkins commented 9 years ago

@be5invis Will you link to the development site or webpage describing your new fonts. I would be happy to include them.

ps. Recently Iosevka has changed a lot. Please update your images.

Be glad to update these. Is 1.0-beta1 the version that you would like me to include here?

be5invis commented 9 years ago

@chrissimpkins yeah. but it would be better to download the newest release from my repo.

mkasu commented 9 years ago

+1. Very interested in CJK compatible fonts. Maybe it would be a great idea to just add some flags per language. In most cases a "full Japanese" or "full Korean" flag would probably be more descriptive than "partial CJK support". It seems there are quite a few fonts, which basically focus on a single language like Korean or Japanese, with missing a lot of glyphs for the other ones. For example, I wouldn't call a Korean font with Hiragana glyphs but without Kanji glyphs a Japanese font, as Kanji are quite essential for any Japanese text.

I can't say anything about Chinese or Korean, as I don't speak those languages. For Japanese support, I know the following programming fonts. Most of them probably won't fit in your repository well, as they are mostly composite fonts suited for Japanese speakers. I'll list them anyhow, in case somebody reading this is interested.

If anyone wants screenshots, I have all of them installed (mostly using Ricty). I'll update this post if I find other interesting fonts with Japanese support.

chrissimpkins commented 9 years ago

@mkasu how about a separate page in the repository or a CJK fork that you maintain?

chrissimpkins commented 8 years ago

@mkasu Marc, would it be possible to discuss the CJK fonts in more detail at some point? I would like to include information about these fonts here if you do not intend to create a separate fork. We will need to come up with specimens to demonstrate the glyphs for those who are interested. This is an area where I will have absolutely no expertise and will need a great deal of feedback from yourself and others who use the CJK glyphs with these typefaces. Let's discuss this further.

be5invis commented 8 years ago

@chrissimpkins How about this? It is a composite of Iosevka, M+ and Source Han Sans, designed for Chinese and Japanese, and, contains COMPLETE HINTS. The TTCs provided in the link contains almost complete support for Han characters (over 28000 glyphs per font, seriously), and Japanese Kanas.

be5invis commented 8 years ago

@chrissimpkins And, the sample text

Han:

Region Sample
Traditional Chinese 花鳥風月 春夏秋冬 生老病死 喜怒哀樂 櫻梅桃李 起承轉合
Simplified Chinese 花鸟风月 春夏秋冬 生老病死 喜怒哀乐 樱梅桃李 起承转合
Japanese 花鳥風月 春夏秋冬 生老病死 喜怒哀楽 桜梅桃李 起承転結

The “Thousand Character Classic” (千字文) is another good sample, but, well, it has 1000 characters.

Kana: いろはにほへど ちりぬるを わがよたれぞ つねならむ ウヰノオクヤマ ケフコエテ アサキユメミジ ヱヒモセズ

Hangul: 나는 유리를 먹을 수 있어요. 그래도 아프지 않아요

You can also include a sample to show the alignment, i.e., whether Latin characters is half-width:

一二三四五六七
abcabc一二三四
chrissimpkins commented 8 years ago

@mkasu @be5invis where are the two of you using CJK monospaced fonts and seeing these glyphs? terminals? strings / comments in source code text editors?

Snack-X commented 8 years ago

I'd like to suggest different sample text for Hangul. Kana sample text is first half of Iroha, which is known as a Kana pangram. Various pangram exists, but I suggest 챠트 피면 술컵도 유효작. This sentence includes all Hangul consonants and vowels.

be5invis commented 8 years ago

@chrissimpkins Inziu Iosevka an be used directly in terminal, especially on Windows (by assigning them to codepage 936, 932 and 950). @Snack-X Well... I am not familiar with Korean, the sample is just an "I can eat glass".

chrissimpkins commented 8 years ago

Do you suggest we show these in a terminal screenshot?

mkasu commented 8 years ago

@chrissimpkins Chris, sorry I blatantly ignored your question three weeks ago. I've been a little bit busy with other projects as well as my master's thesis.

I don't like the "forking-culture" and would rather have one big project which focuses on all kinds of fonts. Maybe you can put CJK fonts in a separate file, because they'd probably be quite uninteresting for everyone not using CJK languages. It would probably also make sense to separate it in language-specific sections, as there seem to be a lot of fonts which only support Korean or only support Japanese character sets.

I could provide further information and links to Japanese fonts. I don't know any specific Korean or Chinese fonts, as I don't speak those languages. I could also try to provide screenshots. However, your screenshot process looks quite manual, so I don't know if I can provide the exact format.

As far as samples go, the Japanese samples should mix Kanji as well as Kana. Also, Japanese has a few characters which can look the same, depending on the font (Like in Latin alphabet, big i and small L.) For example, the Kanji 力 and the Kana カ have same appearence in most fonts (and also in handwriting, they are basically the same character with two usages, but it also has multiple Unicode entries for that reason). Some programming fonts have small indicators, which make those two characters more visually distinctive. I'll try to find, or write, some example text for Japanese.

About my usage, I usually use CJK monospace fonts in my editor (Emacs) as default font. I have source-code with Japanese comments as well as LaTeX files with Japanese text.

chrissimpkins commented 8 years ago

As I have absolutely no familiarity with any of these glyphs can I count on any/all of you to assist me with the screenshots of the fonts and confirmation of licensing (if they are not in English)? I am more than happy to include all of the recommended fonts if they permit redistribution and fit the developer oriented theme of the repository.

chrissimpkins commented 8 years ago

If so we will need to agree on a specimen to display to users and a consistent color scheme + editor combination that is simple to replicate if we expand this collection and you are no longer contributing to the project.

mkasu commented 8 years ago

I could assist with screenshots and translating relevant Japanese information to English if necessary.

I noticed a lot of fonts look quite different depending on your platform (Linux vs OS X) and/or DPI settings (Retina/Non-Retina), even if displayed in same editor. So I don't know if agreeing on an editor makes the results consistent enough.

I found your render.py etc. scripts. How reliable would it be to automatise the whole screenshot process? Is the font rendering comparable to editors or does it create some kind of unrealistic effects or artefacts? That would probably the easiest way to replicate identical rendering behaviours for everyone.

chrissimpkins commented 8 years ago

No matter what approach you take (including an automated approach) the images will only reflect what some users see. There are simply too many variables at play in the display of glyphs on the screen. My goal here is to provide a taste and users will need to install to try for themselves with their own platform/renderer/display density combination. My comment above was intended to set a goal of a terminal and/or editor + syntax highlighter that I can support down the road as the project expands (unless you intend to stay involved and continue to maintain this portion of the project).

mkasu commented 8 years ago

Well, my suggestion was the automated approach, as I think it will probably be the most consistent thing if you have multiple contributors. Furthermore, I'd probably be the easiest for contributors to setup if they only need some libraries and a script.

But if you'd rather prefer a manual approach using an editor or terminal, just choose a platform/application/settings combination and I'll try to replicate it the best I can, when I have time for it.

I don't know how constantly I can contribute in future, so I'd rather not take a big role or enforce decisions for your project.

be5invis commented 8 years ago

@mkasu Perhaps including a hinting test is necessary. I do not know whether Cairo can simulate how Windows rasterizes typefaces: the 16×1 anisotropic antialiasing, well, uncommon on *nix systems.

chrissimpkins commented 8 years ago

I added #114 and intend to begin work on a new CJK font gallery in the cjk branch in the next week. I would greatly appreciate (and really need!) help from anyone who is interested in contributing to this. Let's start discussing the scripts for automated approaches to the display of the extended character sets in CJK fonts and continue the discussion about appropriate text specimen(s) for display to developers who have an interest in exploring the fonts through the gallery.

Please join me in #114 if you have an interest in contributing to this effort. Thanks for all of the suggestions here.

chrissimpkins commented 8 years ago

@mkasu a scripted approach is in the works for the main gallery and I intend to use it for the CJK fonts that we discussed here. See #119 for example images with ASCII.

chrissimpkins commented 8 years ago

CJK gallery has been released and is available. Please submit any new CJK fonts as new issue reports or pull requests. Thanks to all for their help here.