Welcome to Typophile
Please Sign in.

Is't possible to make different glyph for same unicode codepoint with dependencies on language tag?

Primary tabs

4 posts / 0 new
Last post
Muhammad Nur Hidayat's picture
Joined: 14 Nov 2014 - 4:57am
Is't possible to make different glyph for same unicode codepoint with dependencies on language tag?

As most of contents are now written in unicode, there are some cases where two (or more) slightly different character from different language are emerged into one unicode codepoint, making them shared the same codepoint, but usually two (or more) different fonts would required to display them correctly because one glyph style are pointing to one codepoint only. So, what I'm thinking now is how can I merged them and include both glyph in one font because I am using both in same article, and there are some programs which can only load one font at one time despite have language tag support in it.

In my website, currently I'm using a language tag so that it would appear correctly according to the user-installed font's language. Maybe if I can create a font which contains all the glyphs inside it, I can embed it inside my website and user can loads them properly even if they didn't have the fonts (as it's embedded).

Maybe, or maybe not??

How about point the glyph to codepoint in different systems while pointing to unicode at the same time? Example, Unicode U+76F4 "CJK Ideograph" which is appearing as 直 (Wiktionary here) should render as the first image in simplified Chinese (China), Hong Kong Chinese, Singapore & Malaysia's Chinese and render as second image in Taiwanese Chinese, Japanese and Korean.

First image: Second image:

Maybe it's impossible to make distinction between Taiwanese and Hong Kong either Unicode or their own codepoint because it's still the same codepoint, but it might be possible to differentiate between Simplified Chinese, Traditional Chinese and Japanese in general? For example U+76F4 (直) that I used above, maybe different glyph can be pointed to character 0xD6B1 in Code 134 (GB2312, simplified Chinese), character 0xAABD in Code 136 (BIG5, traditional Chinese), and character 0x92BC in Code 128 (Shift JIS, Japanese) respectively and one "general" glyph when no selection made OR fall back to some kind of language tags between font itself??

I don't want to create three (or four) different font files just because it looks slightly different in a lot of characters in simplified Chinese, traditional Chinese, Japanese and Korean (Hanja) ... and that still not count to include the additional Vietnam's Chữ Nôm script which also came from Chinese and have same codepoints but displayed differently (I didn't include Chữ Nôm because I don't use it, but I do use Chinese and Japanese, in Malaysia both simplified and traditional are being used and we will write them differently in par with situations)

Sample text of Chinese in Malaysia:

The two looks different because the person who wrote it has tagged language code and it loads two different fonts to display, one for simplified Chinese and another for traditional Chinese (and it's in same paragraph). If only one font loaded, it would look the same (either one will display for both).

If you say that just make one glyph for all Chinese Japanese Korean Vietnamese, then it is same like "make one glyph for the latin letter 'a', Greek letter 'ɑ', and Cyrillic letter 'а' too" as they also looks identical. LOL

Even though Truetype font might not support, OPENTYPE FONT should be supporting some kind of things like this, right????

If there's really a way to make, please teach me how to get workaround, I'm making my own font.
Note that I'm using Font Forge (open-source) because it's just a hobby (though I really like to see my own font design) plus paid font creators are expensive

(basically anything over RM100 (US$29.88) is expensive because I'm a student dependent on study loan money only, which is RM2500 (US$750) (the loan amount will be decreased in future because of unstable economy), or after subtract study expenses become RM2000 (US$597.55) for 6 months or when converted to monthly will become only around RM333 (US$99.49) and many other basic things are already expensive, even food is RM10 per day in cafeteria now (RM5 for lunch and RM5 for dinner, no breakfast), food itself makes RM300 per 30 days (a month) and no one is allowed to cook food ourselves at this residential college. No jobs for students either, whether offline or online. That not include internet yet, my parent had to send me additional RM10 for buying internet as it's RM40 a month, for 100KB/s, with 1GB quota only, I can't hope on parents so much because my parents also only have RM900 (US$268.90) salary per month and need to pay more things at home)

Sorry for writing so long, though...
I'm following all replies to my posts...

Riccardo Sartori's picture
Joined: 13 Jul 2009 - 4:20am

I hope someone more knowledgeable than me will chime in. In the meantime, my understanding is that you will need to set up a locl OpenType feature.
Two primers on the subject:

Muhammad Nur Hidayat's picture
Joined: 14 Nov 2014 - 4:57am

Thanks for the links, I'll read them properly later and try following the guides... From the overview of the website, it seems like there IS the function to load specific glyph in specific language via "contextual" function. But, it's 12AM now and I can't follow the instructions properly. I'll try it once I get up tomorrow.

Thank you very much, riccard0

Jan Żurawski's picture
Joined: 3 Sep 2005 - 12:21pm

You can choose languages from this list: https://www.microsoft.com/typography/otspec/languagetags.htm
so it is possible to show some alternative glyphs, when one of these languages is chosen:
chinese Hong Kong ZHH
chinese phonetic ZHP
chinese simplified ZHS
chinese traditional ZHT