0
votes

I am just looking to get a better look for my iPad using custom font.

The default Arabic font for iOS8 devices is GeezaPro. and it's in .ttc format.

I am trying to replace it with my custom font.

I use DOSBOX to break system font ttc file into ttf files to make them editable.

Then i use FontLab Studio to replace system font glyphs with my custom font glyphs.

I just copy the glyph from custom font and paste them in the system font (using special paste option FontLab provide).

Then i use DOSBOX again to join these ttf files into ttc file.

That's worked for custom English fonts i used. but using it with arabic fonts show some issues.

The text letters appear separated in iOS apps and everywhere.(as you already know that Arabic language use joined letters and sometimes separated letters depending on the context. if the letter is the first letter it will use specific glyph, the same goes if the letter is in the middle or in the end using different glyph. while in English all letters are always remain separated no matter what. except for handwritten scripts.)

any idea how to fix?

some links:

tutorial I followed to port my fonts

the arabic font I am trying to accomplish (it's free and legit)

P.S: some may say use Bytafont library of fonts but i want to use this specific font. and arabic fonts also limited in the library (20 font only available).

1
What do you mean when you say you use dosbox? Dosbox is a DOS emulator, not a font editing tool, so which actual commandline utility are you using to split and join the fonts into a collection?Mike 'Pomax' Kamermans
I just forget that part! I use ttsdk. I added it's folder to c: then run this commands: BREAKTTC GeezaPro.ttcStephan rog
Also other commands at first to mount ttsdk folder. I also use ttsdk as joiner. Do you think DOS Doesn't support arabic?Stephan rog
unlikely, since it's all just binary data inside the font files. It sounds like you've only copied the glyphs, but not the associated GPOS and GSUB information (which are the parts of a font that controls how to position letters and marks, and how to do contextual substitution, which is pretty important for Arabic)Mike 'Pomax' Kamermans
Your are absolutely right! I read something about that a hour ago. Well, the real question is how to copy them. Because i did Ctrl+A thing and didn't workedStephan rog

1 Answers

1
votes

Fonts are complex programs that run on embedded hardware interpreters and font engines (the same way game ROMs run on game hardware or in emulators), and don't just contain the pictures for each letter, but also all the instructions on how to position, combine, and substitute those letters based on what sequence of input it's being told to process.

For almost every font, just copying the glyph outlines is not enough, you also need to make sure that:

  1. the original font's glyph ordering is preserved,
  2. the GPOS table gets copied over (which determines mark positioning, kerning, etc), and
  3. the GSUB table gets copied over (which handles glyph substitution, without which you can't even write Arabic. As an example, you need ـب, ـبـ, بـ or ب depending on context for the same "letter" bā’)

So you generally want to unpack the TTC (which as of OpenType 1.7 can be either truetype or postscript/type2, so that's a thing to remember for the future), then perform the replacements of glyphs (with order-preservation), as well as replacing the GPOS and GSUB tables (using FontForge or TTX) and then pack it back up into the TTC.