4

I'm supposed to add some modifications to a PHP web site which uses a font with Arabic style numbers. I'm asked to convert the numbers style (language) to the English style (language) using the same font, is that achievable ?

Arabic(red) & English (green) numbering:

enter image description here

Hazem Taha
  • 1,154
  • 6
  • 18
  • 31
  • 1
    The title strikes me as strange since you want to convert to [arabic numerals](https://en.wikipedia.org/wiki/Arabic_numerals). –  Dec 13 '14 at 15:11
  • 1
    look here, can help you: http://stackoverflow.com/questions/8132997/why-are-arabic-numbers-%D9%A1%D9%A2%D9%A3-not-accepted-in-textboxes-as-real-numbers – Francesco Irrera Dec 13 '14 at 15:11

1 Answers1

2

In principle, it is possible to create a font that has alternate glyphs for Arabic digits, selectable with OpenType font features and looking like common (European) digits. However, I do not know any such font, and such an approach would be odd on several accounts. The Arabic digits have been encoded as separate characters, and treating the difference between them and common digits as merely a glyph difference would deviate from normal reasonable practices.

Thus, the change, if desired, should be made at the character level. The details depend on the context, but the principle is simple: common digits are U+0030...U+0039 and Arabic digits are U+0660...U+0669, both in numeric order, so at the character code level it is simply a matter of adding or subtracting a constant.

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390