How do I change the number type from Arabic to English for a font?

I have to add some changes to a PHP website that uses a font with Arabic style numbers. I am asked to convert the style (language) of numbers to English style (language) using the same font, achievable?

Arabic (red) and English (green) numbering:

enter image description here

+3


source to share


1 answer


Basically, it is possible to create an alternate glyph font for Arabic numerals that can be selected using the OpenType font features and look like regular (European) numerals. However, I do not know of such a font, and this approach would be odd on multiple accounts. Arabic numerals were coded as separate characters, and treating the difference between them and ordinary numerals simply as a glyph difference would be different from normal sane practices.



Thus, the change, if desired, must be done at the character level. The details depend on the context, but the principle is simple: the normal numbers are U + 0030 ... U + 0039 and the Arabic numbers are U + 0660 ... U + 0669, both in numerical order and at the character code level is just a matter of adding or subtracting a constant.

+1


source







All Articles