Шрифты и разные глифы

334
Bura Chuhadar

Мне всегда было любопытно, как создавать нестандартные шрифты, и я не мог найти хорошую документацию о том, как работает механизм шрифтов.

Почему экран рендерит это? Если это Unicode, как я могу создать шрифты, как в этом примере:

Звездочкой ················· Глес


7

1 ответ на вопрос

5
harrymc

The Unicode character set contains the concept of Combining characters :

combining characters are characters that are intended to modify other characters

When copying the above text and displaying it with notepad++, one gets :

text

The text string contains no less than 38 characters, where most are combining ones.
For example, one can find the character COMBINING LEFT HALF RING ABOVE which looks like:

half ring

These combining characters, mostly intended for use in complex Asian languages, can also be used creatively as decoration for Latin characters, which is what was done here.

From Unicode 6.2, chapter 2:

All combining characters can be applied to any base character and can, in principle, be used with any script. As with other characters, the allocation of a combining character to one block or another identifies only its primary usage; it is not intended to define or limit the range of characters to which it may be applied. In the Unicode Standard, all sequences of character codes are permitted.

This does not create an obligation on implementations to support all possible combinations equally well. Thus, while application of an Arabic annotation mark to a Han character or a Devanagari consonant is permitted, it is unlikely to be supported well in rendering or to make much sense.

Очень хороший ответ, спасибо. Bura Chuhadar 9 лет назад 0

Похожие вопросы