Arabic

The Arabic Macintosh

  • Home

  • The Arabic Mac
  • Programs
  • Classic

  • Transliteration
  • Jaghbub

  • Eudora Tables

  • Links

  • Back

    Arabic fonts for the Mac - further detail

    The Whys: OpenType and Apple technology

    On a previous page, we have given an overview over how to get hold of Arabic fonts for the Mac, without going too far into the technicalities of why things work or not.

    Here we will go a bit further into the gritty detail - or so much as I have observed, the information on the Net is somewhat contradictory. We will first look a bit into the relation between fonts on the current OS X, and the older Classic or OS 9, which still is used by some people who have machines that can use it. We had Arabic fonts there too, but they can mostly not be used now. Why is that, and what is the reason some fonts do not seem to display Arabic characters at all, othes display only disjointed characters, while some seem to be fine?

    There are three elements that are required for an Arabic font to be useful:

    (1) That the Mac recognizes it as a font (so it appears in the Fonts menu)
    (2) That its Arabic characters are located where the Mac expects them (so the Arabic keyboard can type them)
    (3) That the characters combine properly (so that we do not get just a series of "isolate" forms instead)

    (1) Font files: what appears in the Fonts menu

    These issues are independent of each other. The first is not specific to Arabic; the file we download must be in a type the Mac can utilize as a font. There are many such "font formats" around, and the Mac can recognize a number of them: Postscript laser fonts, Mac TrueType fonts, Windows TrueType, Mac-only "dfonts", and OpenType fonts. TrueType / OpenType fonts have the advantage over PostScript that they can contain thousands of characters in a single font, while Postscript can only have the basic 255; although both can support Unicode. Most Arabic fonts today are TrueType or OpenType. However, some old fonts made especially for the Mac are of an obsolete font format, and will not appear in the fonts menu even if you try to install them (see below for further on old Mac fonts). You will also on Unix-related sites see listed fonts in formats that the Mac cannot recognize, there you should look for "Truetype" ("ttf") types of fonts.

    (2) Is it Arabic? And where?

    We may know that a font is meant to be Arabic, e.g. by its name. But the computer does not know this. In its early days, Macs used to separate fonts by script, so that there were specifically Arabic fonts and different Cyrillic fonts or English (Latin) fonts. Today, we still talk of "Arabic" fonts, but that just means that they contain useful Arabic characters, they may or may not also contain both English or Chinese in the same font. As far as the computer is concerned, the font does not have any particular identificiation with a script, it is just up to the artist who drew the font what characters he did and did not want to include.

    So, while early Macs could just check what font was used to see whether it should apply its right-to-left, character combination, Arabic keyboard etc., it cannot know this just by the font name today. Instead, it must identify the actual characters inside the font to see what kind of tools it must use to present it properly. (That is why the keyboard does not switch automatically to Arabic when you change to an "Arabic" font like Baghdad: as far as the computer is concerned, the font may equally well contain Indian or Thai characters somewhere.) It is only when you start typing that the computer sees what characters you use and applies the relevant ligature combinations, etc. It thus relies on the "ID number", the character code of each character, according to the large Unicode system. Old Mac fonts did not use this system of character codes, and the modern Mac cannot therefore recognize the Arabic characters from the old (pre-2001) Mac systems.

    You will see the result of this difference if you try to open old documents that were written on classic Macs and which contain Arabic text. Since today's Mac cannot recognize these characters as Arabic, it will display the text as some form of accented English, unreadable. Most programs do, however, allow you in this case to tell the program that a text file that you open actually is supposed to be Arabic of the old type ("Arabic (Mac OS)", or "ISO 8859-6", as it was called), and convert it to modern representation of Arabic text. (See the Arabic Mac page for further on saving old Arabic files.)

    (3) How fonts combine: OpenType or The Apple Way

    This is the most complex, and I may have got it wrong, the sources contradict each other. But what I gather is:

    The technology that allows automatic context analysis - that makes an isolate "b" turn into an initial b when you add another character to it - is linked to the font, and can be of two different types: One is Apple's own which is called AAT, for "Apple Advanced Technology". The other is called OpenType, formulated by Microsoft and Adobe, and came into use around 2001-2002 for Windows and Unix machines. Both types are of course used not just for Arabic, but also in other scripts, for example to provide greater variations in letter combinations (ligatures) than regular TrueType fonts does. A program can support one or the other or both formats, and a font is normally also either one or the other. OpenType and AAT are thus additions to the TrueType and PostScirpt formats, fonts are TrueType with OpenType, or PostScript with OpenType. OpenType with PostScript is thus possible, but not common, TrueType dominates. As far as I know, AAT is only used in Mac TrueType fonts, not Postscript.

    Apple began, as mentioned, to support OpenType font files when its current system OS X was introduced in 2001, but it continued to use its own AAT technology for Arabic context analysis. That is still the basis for Apple's Arabic fonts and the most widely supported system on the Mac.

    However, in the latest system version, 10.5, which came in late 2007, Apple added support also for Arabic OpenType fonts alongside its own AAT. Most standard programs will therefore support both type of fonts today, but some programs, such as OpenOffice, have not yet implementend this double support and still only support AAT fonts. In these last programs, OpenType fonts will appear in the font list and the Arabic characters will be displayed, but only as isolate forms: the program does not understand the OpenType indication of how to combine them.

    Mellel had already its own built-in support for OpenType-based context analysis, so OpenType fonts combined properly even on earlier Macs. It also has internal resources that select combination forms of the basic Arabic characters based on Unicode numbers, so they can provide context analysis (combine characters) of AAT fonts, like Apple's as well as the X Series.

    Some other programs follow Mellel part of the way, with their own font support. AbiWord can display both AAT (including those Mellel will not take) and OpenType fonts, the latter with the same limitations as Mellel. But, as mentioned in the program page, AbiWord does not really display Arabic properly. Another, probably no longer available program that also had early support for OpenType was Horuf of the Arabworx package. It was surprisingly unable to display the two SIL fonts, either in their OT and their AAT version.

    If you have enough money ($1,200) to splash out on the DTP layout program InDesign CS4 Middle East, the Arabic version, you get even better font choice. It does not support SIL's AAT versions, but pretty much everything else. You even get proper harakat (short vowels) in all Unicode fonts, include those that do not display these properly in other programs, such as Arial Unicode and a few others. As mentioned above, it also places the fatha properly in lam-kasra-alif combinations in all fonts, thus showing a better support for OpenType than any other program I have seen.

    AAT supports special ligatures for lam-mim, mim-mim etc. (stacking the letters horizontally). The internal font support in Mellel and others of this "OpenType friendly" group does not recognize these. So, in Mellel and others of this group of programs, you will not get these particular ligatures in the regular of AAT (Apple) fonts. (InDesign shows some, but not all these ligatures; you can however insert some such ligatures manually).

    --- Not all OpenType fonts appear correctly, however, even in 10.5 or Mellel. Some in particular have not properly set the "zero width" function of their harakat (short vowels), so that the vowels instead of being placed above the previous character, are given their actual width, causing a break in the ligatures. This concerns some UNIX Arabic fonts such as those from Arabeyes, all versions of them under OS 10.4 (Mellel, but not InDesign ME), but only old versions of them under 10.5; now only a handful of fonts have the vowel-gap problem.

    --- To be obnoxiously precise, the two formats differ in that AAT bases its context analysis (how letters combine) on commands inside each font; while OpenType fonts are actually simpler, as they largely refer to a common system resource called Uniscribe (a Microsoft product). It is this Uniscribe resource that did not, in its Mac version, contain the resources required for Arabic.

    --- One detail to be noted: In Mellel, characters may in a few fonts seem "squashed together" (e.g. SIL's Lateef [lam-alif] and the shekasteh-like X Fantasy) or be slightly sliced off at the bottom. This is due to an error in Mellel's keshida function. Turn it off (panel Character Appearance: Language: Options) and these fonts will print fine.

    --- Related to this issue is the problem that could cause Safari not to display Arabic web pages in systems earlier then 10.5. Surprisingly, this was caused by installing Microsoft Office 2004. That installer replaced the fonts Arial and Times New Roman with Microsoft versions that contains Arabic characters, but in OpenType. As Arabic Web pages routinely asks for Times New Roman, Safari displayed them in this font, where they displayed disjointed. When these Microsoft fonts Times and Arial fonts are removed, Safari will instead use a standard Mac font which works. -- Firefox, which supports OpenType ligatures, and other browsers did not have this issue, and it is gone in 10.5, as Safari now of course also supports these fonts.

    For further links to Arabic fonts, and for other sites, see the Links page.


    More on Apple's Arabic fonts under Classic

    Young readers may not even have heard of the Classic Macintosh, the computer we used until 2001. However, close reading of the above will show that the use of Arabic fonts was quite different on the Mac in that period. Thus, some comments on this now historical note may also be added to our discussion.

    There is a difference in what font types the Mac can recognize in Classic OS 9 and the current OS X system. In Classic, we could use screen fonts, Postscript Type 1 and 3 and Mac TrueType, but not Windows Truetype (and thus Unix and simililar fonts). While OS X can use the last type (and its own dfont format which neither Classic nor anyone else can read), it cannot use "bitmap" screen-only fonts, which were quite common in Classic. So, some Classic fonts of this type will not appear in the OS X Fonts menu, even if you put them in the fonts folder.

    - On the other hand, the Arabic fonts (Geeza, Bayan, Baghdad) that are included in OS X install are of the .ttf ("Windows Truetype") format, and will not work in Classic. If you have the older versions of these fonts that were distributed with OS 9, you can use those instead, putting them in the Classic Fonts folder. They will then be useable both in Classic and OS X applications.

    We said above that Classic Mac did not use Unicode character codes that the current Mac could understand. Of course, characters were also then identified by a number, a "code", that ran from ID 0 to 255, the highest possible number. But in Unicode, the Arabic character codes are in a range from about 1,575 to 1,650, numbers that had no significance for the Classic system. However, the font could still include such Unicode number for each character, the Classic system just ignored them and used its own ID numbering. So, some fonts (like Apple's own) did put them in, and OS X can then use them, others did not. They still have their Arabic characters, but not where OS X expects them, it treats them as European characters, and thus useless. Where OS X expects to find Arabic characters, these fonts are empty. This is true for most "third-party" Arabic fonts for Classic, but also some of Apple's own, such as AB Thulth (also AB Yismael / New Deedan).

    Besides Apple's other fonts, and Decotype Naskh, which Apple distributes, I have only found two Classic fonts from Winsoft (bundled with the old program WinText, I believe) that have Unicode ids and can be used by OS X - but these two perhaps only in Mellel.


    Apple's Arabic fonts: A version history

    If you use the Classic "environment" inside OS X, you will have to keep track of which fonts are available to the Classic (OS 9) system and what is availble to the host, OS X, system. Here it may be important to distinguish between different versions of Apple's standard Arabic fonts, as some of these work better in Classic and others better in OS X. It is not easy to see the difference, however this may be a list of some of the version history:
    I believe the Apple Arabic fonts were originally Postscript fonts, but the more recent versions Apple released were all of the Truetype format. They include, as far I can see:

    (a) A set of fonts apparently released 1994 with Apple's Arabic Language Kit (ALK). These have the menu name written in Arabic script ("al-Bayan", "Baghdad", etc.) in Classic font menus. This version contains some errors which turn up in OS X, so you may want to avoid them. The medial ya, for example, is missing when you see the text in Mellel, and possibly also in other applications. (In FontBook, this is called version "Altsys 3.3")

    (b) A new version came in OS 8.5, with a revision in OS 9, around 2000. The OS 9 version has the menu names in Latin script ("AB AlBayan" in Classic - in OS X all three appear as "Al Bayan"). Here the errors in (a) were corrected, so these are the Classic versions that are most useful (version 3.5).

    (c) With OS X, you get the same fonts, but now in the Windows TrueType format with the file extension .ttf. Classic cannot read these, so for Classic applications, you must have an earlier version in the Classic System's Fonts folder. In OS X 10.2 and 10.3, you can stay with those, the OS X applications will see and use the fonts in the Classic fonts folder. However, in 10.4 this will cause problems in OS X applications, so there you should keep the two sets separate (see below). (Bayan came in version 4.0 with OS 10.2. The later versions that came with OS 10.3 (vs. 4.1), and 10.4 (vs. 5.0) differ slightly, cf. below. In system 10.5 and higher the issue does not apply, of course, as you cannot use Classic under 10.5.)

    The dotless ya

    A special curio is the ya with no dots under. This appears in Unicode in two forms: the alif maqsura, and the farsi yeh. You get the maqsura by typing Shift-ya [Shift-d], and farsi yeh with Option-ya in the regular Arabic keyboard layout. They look similar and should perhaps also work identically, but they do not. Different fonts treat them differently. In theory, both should probably display initial and medial forms as ya, with two dots. But they do not always do so.

    In brief:

    - Classic does not have farsi yeh, only maqsura.
    - The Apple fonts, both in (a), (b), and (c) variants apart from Geeza Pro, also contain the maqsura only. Even the OS X version, (c), lacks farsi yeh.
    - As for maqsura, (a) does not have initial and medial forms, so it "does not connect" to the following character, but displays the final form only. The later versions, (b) and (c), both behave properly and connect with a regular ya (with two dots).
    - The exception to this among Apple fonts is Geeza Pro, the OS X font. It does have farsi yeh, and that does connect properly. But on the other hand, the maqsura does not display any initial/medial form in this font.
    - The X fonts work like Geeza Pro, while Schehrazade connects both characters to the following - but differently: Maqsura connects with a dotless tooth (a medial ya without dots under), farsi yeh connects with a regular ya.
    - In OpenType applications (Mellel), both Geeza Pro and and the X fonts adopt the latter behaviour, with initial-medial maqsura as dotless tooth.

    This is of course proof of the work-in-progress nature of the special features of Arabic. It is a point to make note of, if you change the layout from one font to the other, that such shift- or option-ya's may suddenly appear differently. (Also, if you are a linguist and need to indicate an initial or medial tooth without diacritic dots, this is the way to get one, if you have Scheherazade or Mellel.)

    The Allah ligature

    Under Classic, the fonts al-Bayan (Arabic) and Kamran (Persian) had special ligatures for [A]llah (without the alif), salla Allah 'alayhi wa-sallam and floral parentheses. These were not standardized, so only those two fonts had them.
    - To print a document with these characters in Classic, e.g. in NisusWriter 6, you must have the postscript laser file ("AlbayanPla") in the Classic Fonts folder for the characters to print correctly.
    - If you convert a Classic file to OS X, these ligatures will disappear, because they were not standardized - instead of the "llah" you will probably get $. However, the font still has the ligature, only in a different place in the font. You can get the ligature back by finding $ and replacing them with the OS X "llah" character. It is a bit tricky to find that, though, as there is no key for it on the standard Arabic keyboard. You can install a special keyboard layout, like my "Arabic(2)" which lets you type the Allah ligature as Option-g. Or you can use Character Palette to point and click (you find them in "Show: Code Tables: Unicode: Arabic Presentation Forms A" down the long list). Or you can activate the Unicode Hex Input keyboard layout, where you must type Option-fdf2.
    - In OS X, TextEdit and a few other applications will actually insert these ligatures automatically when you type lam-lam-ha (llah). But only in al-Bayan, this does not work in the other fonts that contain the same Allah ligature, and not for the other "signets"; there you must use one of the methods above (in 10.5 the ligature also appears in Geeza in the "TextEdit" type of program; there OpenType programs will do the same with the Windows font Arabic Typesetting.)

    In versions up to 4.0 of Bayan, you can turn the automated ligature feature off in the "Typography" cogwheel of the Font Panel, in versions 4.1 and higher the option of turning it off is not available (OS 10.3 and 10.4; in 10.5 it is back on). In these versions, Bayan 4.1 and higher, you must also type alif-lam-lam-ha to get the ligature - but the ligature still says only llah, without the alif! (Corrected in 10.5.) On the other hand, these newer versions of Bayan, 4.1 and up, correct another old error, where the hamza under alif carried a superfluous kasra vowel - at least in the isolate form.

    While we are on the subject of vowels, notice what is probably a bug, but is found in all fonts except the SIL ones (under 10.4): If you type a shadda followed by a fathatan (a nunated "a" for accusative, thus e.g. for hayyan, "alive"), the consonant breaks free to display incorrectly in the isolate shape. But if you type the harakat in the opposite order, the double a first and shadda afterwards, this does not occur, so do that! This occurs only with fathatan (double a), not kasratan or dammatan (i or u).


    Changes in OS X 10.4 and 10.5

    10.4: Use Classic al-Bayan only in the Classic environment

    If you are a Classic user, you will probably want to use Arabic fonts under both Classic and OS X. Since Classic cannot use the OS X fonts in .ttf format, it was logical to install the Classic Arabic fonts in the Classic fonts folder; then they were visible to both Classic and OS X programs. That worked fine, up until OS 10.3.

    However, in 10.4 the Classic version of al-Bayan font locks up most regular OS X programs (thus NisusWriter, TextEdit and many others): once that font is chosen, you cannot change to another font in that document. Also, FontBook has some problems with registering some of these fonts. So it is better for 10.4 users with Classic to keep both sets of Apple fonts; the Classic Arabic fonts in the Classic / OS 9 Fonts folder for Classic programs only, and the OS X .ttf versions in one of the OS X fonts folders (where the system has already put them) for OS X applications.

    Then, you should use FontBook to "deactivate" the Classic versions (let the mouse hover over the font's name in FontBook to see you choose the right version), otherwise the system gets confused and lets the old fonts override the new in OS X, contrary to what it should. If you do this, OS X programs will not see the Classic fonts and will not be confused, while the Classic programs ignore what FontBook does and will use the Classic fonts for their purpose.


    With system 10.4 ("Tiger"), Apple also changed its handling of OpenType vs. AAT, in that certain elements of OpenType were integrated into its own font handling. This caused some problems in the earliest versions of this system, up to 10.4.2, in that some of the Arabic fonts that support both AAT and OpenType broke down: The OpenType resources (where Arabic context analysis is still lacking) took precedence and disabled the AAT resources that actually work for Arabic (cf here and here). Happily, this bug was squashed fairly soon, in version 10.4.3, the situation appears, as far as Arabic fonts are concerned, to be quite identical to what we have reported above for 10.3: The X Series fonts work both in TextEdit and Mellel, with the same difference as far as ligatures are concerned; the OpenType-only fonts work in Mellel, not in TextEdit, and SIL and the other fonts work exactly as indicated above. Thus, if you have an early version of system 10.4 and find that some fonts do not work as indicated here, upgrade (via the Software Update menu, the Mac will do it for you automatically) to 10.4.3 or higher, a free upgrade for 10.4 users.


    A minor change is that the two old Winsoft OS 9 fonts, Winsoft Thuluth and Naskh, which in 10.3 only work in OT applications, now also function in AAT-based programs as TextEdit and Nisus, but apparently only on PowerPC computers, not on Intel computers with the same OS version.

    10.5
    In addition to the big change in 10.5, the addition of OpenType support, some minor changes:
    -- As mentioned, many Unix OpenType fonts no longer break over short vowels
    -- The "Allah" ligature now is in Geeza as well as in al-Bayan of Arabic fonts (it is also available in many third-party fonts).
    -- The Apple fonts now have a Typography option, but only with the limited choice of turning off lam-mim types of ligatures. The SIL fonts' wider choice in this menu only applies to the AAT versions of the font, not the OT versions (not surprisingly, if this Typography option is part of AAT).


    Home | Downloads | Index
    Responsible for this Web page is Knut S. Vikør.
    Last updated 15 June 2009