mirror of https://github.com/GNOME/gimp.git
b7796b0bfb
First of all, "CJK Unified Ideographs" block should not be the highest priority to determine showing an ideograph. Indeed most fonts for a Korean and Japanese audience would also contain at least the main ideographs. So instead, look first for Korean alphabet (Hangul) and Japanese syllabaries to determine if it's a Korean or Japanese-targetted font. Only then Chinese. Also check Korean before Japanese because most of the Korean fonts I saw actually also include Japanese syllabaries (but not the other way around). This way, it will be much easier for CJK graphists to skim through the font list and detect fonts made for the needed language in a glance. Also modifying the Korean display text. KIYEOK and SSANGKIYEOK were obviously chosen because they were the first in the block. But they are very bad choice. We hesitated with 가 at first, as it is considered the first in the syllabary form (가나다라 is kind of similar to our ABCD). But it wouldn't show a form with a second consonant (below) which is a good stylistic indication. So we hesitated between 한 (han) and 글 (geul, which also means text so it's a nice sample), and finally went with 한 because of the circle shape in ㅎ (hieut) but also its small "hat" which has many stylistic variants. So it's quite a good hint of stylistic choices made by a font designer from just the sample box. Moreover I switched the block check from "Hangul Jamo" to "Hangul Syllables" block. "Hangul Jamo" are positional forms of the letters to dynamically compose syllables (in particular legacy syllables not in use anymore). Though a feature-full Korean font set would design these, it is less important than "Hangul Syllables" (pre-composed syllables design) or "Hangul Compatibility Jamo" (basically the same letters as "Hangul Jamo" but for standalone usage). Also I actually saw some fonts made for Korean without "Hangul Syllables" support. Finally I also added a test for Japanese. I check the Hiragana block which is most likely the most basic which has to be in any Japanese-targetted font and use 'あ' (a) as sample text, which is the first Hiragana syllable and here definitely a good sample text in my opinion. I believe that this can still be improved though. Checking only a single block to determine the probable target language is not necessarily enough. For instance very complete fonts for Chinese may also design Korean and Japanese characters, but will also have most CJK blocks and more ideographs (whereas Japanese/Korean will likely have less). Yet let's say this is good for now, at least better than before! |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile.am | ||
gimpfont.c | ||
gimpfont.h | ||
gimpfontfactory.c | ||
gimpfontfactory.h | ||
gimptext-compat.c | ||
gimptext-compat.h | ||
gimptext-parasite.c | ||
gimptext-parasite.h | ||
gimptext-vectors.c | ||
gimptext-vectors.h | ||
gimptext-xlfd.c | ||
gimptext-xlfd.h | ||
gimptext.c | ||
gimptext.h | ||
gimptextlayer-transform.c | ||
gimptextlayer-transform.h | ||
gimptextlayer-xcf.c | ||
gimptextlayer-xcf.h | ||
gimptextlayer.c | ||
gimptextlayer.h | ||
gimptextlayout-render.c | ||
gimptextlayout-render.h | ||
gimptextlayout.c | ||
gimptextlayout.h | ||
gimptextundo.c | ||
gimptextundo.h | ||
meson.build | ||
text-enums.c | ||
text-enums.h | ||
text-types.h |