From 890719a7e59643b61d0867ec6c1e0e40b13cde25 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 29 Aug 2014 22:36:46 +0000 Subject: almfixed (29aug14) git-svn-id: svn://tug.org/texlive/trunk@35065 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/fonts/almfixed/README | 38 ++ .../texmf-dist/doc/fonts/almfixed/Unibook_0600.pdf | Bin 0 -> 51235 bytes .../texmf-dist/doc/fonts/almfixed/Unibook_0750.pdf | Bin 0 -> 22651 bytes .../texmf-dist/doc/fonts/almfixed/Unibook_08A0.pdf | Bin 0 -> 37518 bytes .../doc/fonts/almfixed/Unibook_FB50-1.pdf | Bin 0 -> 35607 bytes .../doc/fonts/almfixed/Unibook_FB50-2.pdf | Bin 0 -> 29547 bytes .../doc/fonts/almfixed/Unibook_FB50-3.pdf | Bin 0 -> 40971 bytes .../texmf-dist/doc/fonts/almfixed/Unibook_FE70.pdf | Bin 0 -> 37456 bytes .../texmf-dist/doc/fonts/almfixed/almfixed-dtk.pdf | Bin 0 -> 1463523 bytes .../texmf-dist/doc/fonts/almfixed/almfixed-dtk.tex | 690 +++++++++++++++++++++ .../doc/fonts/almfixed/almmono10-sample-crop.pdf | Bin 0 -> 21936 bytes .../texmf-dist/doc/fonts/almfixed/aristoteles.pdf | Bin 0 -> 44160 bytes .../doc/fonts/almfixed/fawaid-427-crop.pdf | Bin 0 -> 31640 bytes .../texmf-dist/doc/fonts/almfixed/ilahiyyat-1.pdf | Bin 0 -> 32111 bytes Master/texmf-dist/doc/fonts/almfixed/sc-unipad.pdf | Bin 0 -> 58996 bytes Master/texmf-dist/doc/fonts/almfixed/wa.pdf | Bin 0 -> 6074 bytes .../fonts/opentype/public/almfixed/almfixed.otf | Bin 0 -> 304376 bytes .../fonts/truetype/public/almfixed/almfixed.ttf | Bin 0 -> 599924 bytes 18 files changed, 728 insertions(+) create mode 100644 Master/texmf-dist/doc/fonts/almfixed/README create mode 100644 Master/texmf-dist/doc/fonts/almfixed/Unibook_0600.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/Unibook_0750.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/Unibook_08A0.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-1.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-2.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-3.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/Unibook_FE70.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.tex create mode 100644 Master/texmf-dist/doc/fonts/almfixed/almmono10-sample-crop.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/aristoteles.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/fawaid-427-crop.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/ilahiyyat-1.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/sc-unipad.pdf create mode 100644 Master/texmf-dist/doc/fonts/almfixed/wa.pdf create mode 100644 Master/texmf-dist/fonts/opentype/public/almfixed/almfixed.otf create mode 100644 Master/texmf-dist/fonts/truetype/public/almfixed/almfixed.ttf (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/fonts/almfixed/README b/Master/texmf-dist/doc/fonts/almfixed/README new file mode 100644 index 00000000000..b5265b0ff00 --- /dev/null +++ b/Master/texmf-dist/doc/fonts/almfixed/README @@ -0,0 +1,38 @@ +Typeface Family: Arabic-Latin Modern +Font: Arabic-Latin Modern Fixed +Style: Regular +Version: 0.92 +Author: Idris Samawi Hamid +Date: August 15, 2014 + +License: + +Arabic-Latin Modern Fixed is licensed under the GUST Font License with one important adjustment: It is requested, as well as legally *required*, that derived works be distributed only after changing the names of the fonts comprising this work. + +http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-LICENSE.txt/view + +Contains: + +/alm/doc/almfixed-dtk.pdf +/alm/otf/almfixed.otf +/alm/ttf/almfixed.ttf + +Some notes, in no particular order: + +1. For more extensive documentation, examples, and background; see almfixed-dtk.pdf. + +2. The final version number (per any future fixes, maintenance etc.) is intended to be Version 1.10. + +3. Arabic-Latin Modern Fixed is an extension of TeX-Gyre Latin Modern Mono 10 Regular. Every glyph and opentype feature of the Latin Modern Mono has been retained, with minor improvements. On the other hand, we have changed the vertical metrics of the font. Although the Arabic script is designed to use the same x-size as Latin Modern Mono, the former script needs greater ascender and descender space. And there are cases (such as certain kinds of academic assignment and definitely mixed Latin and Arabic text) where Latin can use the extra vertical space as well. Otherwise, only the vertical metrics prevents this from being a drop-in replacement for Latin Modern Mono. Of course one can always set the vertical metrics in TeX to match LM Mono. + +4. Every Arabic glyph in each Arabic-script Unicode-code block is supported (up to Unicode 7.0): Arabic, Arabic Supplement, Arabic Extended, Arabic Presentation-Forms A, and Arabic Presentation-Forms B. + +5. This is a totally original design, using the Knuthian letters as inspiration. Indeed, virtually all Arabic characters were developed on the foundation of a study of the Latin Modern Mono letters 'l', 'r', and 'c'. In other words, this is a genuine extension of the original Knuthian design to an authentic and culturally authentic Arabic typing font. + +6. There are two versions of the font: otf and ttf. The otf version (cff-flavored with PostScript curves) is for print applications (and usually the default for TeX). The ttf version is for on-screen applications such as text editors. Hinting in the ttf version is much better for on-screen, at least on Microsoft Windows. + +7. The most distinctive feature of Arabic-Latin Modern lies in its treatment of vowels and diacritics. Each vowel and diacritic (ALM Fixed contains a total of 68 such glyphs) can now be edited horizontally within any text editor or processor. I believe this is the very first opentype Arabic font ever to have this capability. Editing complex Arabic texts will now be much easier to input and to proofread. + +8. At least 12 additional format characters are included; see almfixed-dtk.pdf for details. Also designed a glyph representation for U+00A0 (no-break space), as well as U+25CC (dotted circle). + +9. Arabic-Latin Modern Mono will be a boon to scholars, academics, code editors, and anyone who wants to manage the entry of the wide array of Unicode Arabic text for editing, verbatim, or other purposes. \ No newline at end of file diff --git a/Master/texmf-dist/doc/fonts/almfixed/Unibook_0600.pdf b/Master/texmf-dist/doc/fonts/almfixed/Unibook_0600.pdf new file mode 100644 index 00000000000..57a95c5ddab Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/Unibook_0600.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/Unibook_0750.pdf b/Master/texmf-dist/doc/fonts/almfixed/Unibook_0750.pdf new file mode 100644 index 00000000000..4dc43c96962 Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/Unibook_0750.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/Unibook_08A0.pdf b/Master/texmf-dist/doc/fonts/almfixed/Unibook_08A0.pdf new file mode 100644 index 00000000000..bb7aebca7b1 Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/Unibook_08A0.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-1.pdf b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-1.pdf new file mode 100644 index 00000000000..a71f9e72910 Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-1.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-2.pdf b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-2.pdf new file mode 100644 index 00000000000..2f96308dc73 Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-2.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-3.pdf b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-3.pdf new file mode 100644 index 00000000000..80f8074babb Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FB50-3.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/Unibook_FE70.pdf b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FE70.pdf new file mode 100644 index 00000000000..cab7a7a601d Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/Unibook_FE70.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.pdf b/Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.pdf new file mode 100644 index 00000000000..7ccf0ce7c16 Binary files /dev/null and b/Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.pdf differ diff --git a/Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.tex b/Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.tex new file mode 100644 index 00000000000..fecfa7f3b94 --- /dev/null +++ b/Master/texmf-dist/doc/fonts/almfixed/almfixed-dtk.tex @@ -0,0 +1,690 @@ +\definepapersize[DTK][width=148mm,height=210mm] +\setuppapersize [DTK][DTK] +\setuplayout[width=11.7cm,height=20cm] +\setbreakpoints[compound] + +\definefontfeature[default][default][protrusion=quality,expansion=quality]%,script=latn] +\setupbodyfont[libertine,10pt] +%\setupbodyfont[pagella,10pt] + +\setupdelimitedtext[quotation:1][left=»,right=«] +\setupdelimitedtext[quotation:2][left=›,right=‹] +\setupdelimitedtext[quote:1][left=›,right=‹] + +\def\sloppy{% + \tolerance 9999% + \emergencystretch 3em% + \hfuzz .5pt + \vfuzz\hfuzz} + + +\starttypescript [mono] [computer-modern] [size] +% Newer, more-bold version of the bold typewriter fonts. + \definebodyfont [12pt] [tt] [bf=cmbtt10 at 12pt] + \definebodyfont [11pt] [tt] [bf=cmbtt10 at 11pt] + \definebodyfont [10pt] [tt] [bf=cmbtt10] + \definebodyfont [9pt] [tt] [bf=cmbtt9] + \definebodyfont [8pt] [tt] [bf=cmbtt8] +%% Older, less-bold version of the bold typewriter fonts. +% \definebodyfont [12pt] [tt] [bf=cmttb10 at 12pt] +% \definebodyfont [11pt] [tt] [bf=cmttb10 at 11pt] +% \definebodyfont [10pt] [tt] [bf=cmttb10] +% \definebodyfont [9pt] [tt] [bf=cmttb10 at 9pt] +% \definebodyfont [8pt] [tt] [bf=cmttb10 at 8pt] +\stoptypescript + +%\setupbodyfont[pagella,10pt] +\setuppagenumbering[location={}] +\setupcaptions[width=\hsize,minwidth=5mm,align=middle] +\setupnote + [footnote] + [paragraph=no] + +\setupnotation + [footnote] + [alternative=serried, + width=broad, + distance=.5em, + display=no] +\language[en] + +\setupbodyfontenvironment[default][em=italic] + +\setuphead[subsection][ + style=\bf\ss, + before={},after={}, %\blank + %alternative=inmargin +] +\setuphead[section][ + style=\bf\ssa, + %alternative=inmargin +] +%\setupitemize[inmargin] +%\setupitemize[2,3][intext] + +\definefontfeature + [alm-default] + [mode=node,script=arab,language=dflt, + ccmp=yes,init=yes,medi=yes,fina=yes %,isol=yes, % no isol necessary in alm + rlig=yes,dlig=yes,mark=yes,tlig=yes] + +\definefont[ALM][file:almmono10-regular*arabic at 12pt] +% \definefont[Husayni][file:husayni*arabic at 14pt] +\definefont[SIL][file:Scheherazade-R*arabic at 24pt] +\definefont[Deja][file:DejaVuSansMono at 10pt] + +\definefont[ALML][file:almmono10-regular*arabic at 27pt] +\definefont[LML][file:lmmono10-regular at 27pt] + +\definefont[ALMLL][file:almmono10-regular*arabic at 27pt] +\definefont[LMLL][file:lmmono10-regular at 27pt] + +\definefont[ALMLLL][file:almmono10-regular*arabic at 80pt] +\definefont[LMLLL][file:lmmono10-regular at 80pt] + +\nonknuthmode +\noheaderandfooterlines + +\def\OTEX{Oriental \TeX} +\def\AM{Arabic-Latin Modern} +\def\ALMF{Arabic-Latin Modern Fixed} +\def\LM{Latin Modern} +\def\LMM{Latin Modern Mono} + +\def\Tatwil{{\em taṭwīl}} + +\setupwhitespace[medium] +\setupdirections[bidi=global] +% \setcharactermirroring[1] +\starttext + +\title{{\bf DANTE Summary Report:} \\ Introducing Arabic-Latin Modern Fixed \\ %\blank[small] \tfx \currentdate +\null %\blank[small] %\\ {\bf Researcher:} \\ Professor +\\Idris Samawi Hamid}%, Colorado State University} + +% {\ALM test امتحان} + +\startsection[title=Background: The \OTEX\ Project] + +The \OTEX\ project was initiated in 2006 to facilitate the development of high quality typography and typesetting of academic and scholarly texts that require the Arabic script, such as critical editions and monographs. Although support for the Arabic script in modern typesetting software has been slowly improving over the past decade or so, the situation is still very far behind the Latin script in terms of features, available high-quality typefaces, and layout-processing software. For academic and scholarly work, it's still very much a wilderness out there. A full solution to the +problems of advanced Arabic-script typography and typesetting, particularly one based on OpenType and Unicode standards, is still some ways off. + +So far the \OTEX\ project has worked closely with the \LUATEX\ project, also initiated in 2006; an initial large-sum +grant from Colorado State University in particular was an important boost to \LUATEX\ development. +In the last round of supplemental funding from DANTE (2009) we focused on the development, implementation, +and testing of the OpenType layout engine in \Context's \LUATEX-based MkIV (in close collaboration with Hans Hagen). + \startfootnote + See \quotation{OpenType Engineering in \TeX}, {\em Die \TeX{}nische Komödie}, 4/2009. + \stopfootnote + \ +In this current round of funding through DANTE, we are focusing on a different aspect of the mission of \OTEX, to be described in the next section. +\stopsection + +\startsection[title=The Problem] + +\startsubsection[title=Editing Marks in an Abjad Writing System] +Unlike Latin script, which is an {\em alphabetic} writing system, Arabic script is an {\em abjad} +writing system. The key difference between the two is as follows: + + +An {\em alphabetic} writing system consists of {\em letters} that represent consonant sounds, as well as characters that +represent vowel sounds. Thus in an alphabetic script each fundamental sound in a given language,% + \startfootnote + The technical term for such a fundamental sound is \quote{phoneme}. + \stopfootnote + \ +whether a consonant (e.\,g. \quote{b}, \quote{ch}) or a vowel sound (e.\,g., \quote{i}, \quote{ai}), is represented by one or more letters of the alphabet of that language. + +On the other hand an {\em abjad}\kern1pt\startfootnote + The term \quote{abjad} comes from the first four letters of most Semitic languages, \quote{A}, \quote{B}, \quote{J}, and \quote{D}. + \stopfootnote + \ + writing system is one where each letter represents a consonant sound, and most vowels are not represented by letters. Sometimes a consonant may function as a vowel in certain contexts in addition to its consonantal function (in Arabic the equivalent of the letters \quote{a}, \quote{w}, and \quote{y} do this), but most vowels remain implicit rather than explicit. + +Thus a single letter string can be quite ambiguous and represent a number of different words. Furthermore, in the case of Arabic in particular the grammatical role of words in a sentence are determined by {\em inflection}, where the last letter of a word takes on a different sound depending on its context. In order to disambiguate words and inflection endings, early scholars of Arabic developed a system of diacritics and vowel markings to mark each pure consonant within a word. This was especially motivated by the case of the Qurʾān; within a generation of the passing of the Prophet of Islam the non-Arabic-speaking peoples who were converting to Islam in large numbers would frequently get especially the inflections incorrect, inadvertently affecting the meaning of Qurʾānic expressions in disastrous ways. For the purpose of precisely presenting a Classical Arabic text in a modern edition, getting the vowel markings correct is also crucial. However, +entering the markings correctly for the purposes of typesetting has always been an arduous task. It is instructive to compare this with the situation in scholarly Greek. + +Although its script constitutes an alphabetic system (as opposed to an abjad one), the precise representation of many aspirations (or \quotation{breathings}) and accents in Ancient and Hellenistic +Greek came to +be be represented by a sophisticated system of diacritical markings. The entire Greek alphabetic script inclusive of the full system of diacritics is called {\em polytonic Greek}. In Unicode this system is represented by characters +located within the Greek-Extended Block (U+1F00..U+1FFF). Most of these polytonic letters can be composed in Unicode from a combination of basic Greek consonants +(located within the U+0370..U+03FF block) and other diacritics (mostly common to both Greek and Latin typography). For example, \quote{\Deja Ἀ} +(U+1F08) can be decomposed into \quote{\Deja Α} and \quote{\Deja ̓}. This makes the digital entry of polytonic Greek text quite straightforward and easy to edit: One can easily proofread and edit a manuscript either + +\startitemize[a,packed] +\item by selecting and modifying each diacritic independent of the letter that it modifies (using decomposition); or +\item by replacing one Unicode code point (e.\,g. \quote{\Deja Ἀ}) with another (e.\,g. \quote{\Deja Ἁ}). +\stopitemize + +\placefigure +[here][fig:polytonic] +{Polytonic Greek in action (image provided by Thomas Schmitz).} +{\externalfigure[aristoteles.pdf][width=.84\textwidth]} + +Classical editions take the effort to properly represent polytonic Greek in all its glory (see \in{Figure}[fig:polytonic]). Monotonic Greek (i.\,e., Greek script mostly stripped of the diacritics) is thus hardly a credible option in Classical scholarship, philology, or textual studies (except perhaps for certain narrow, specialized cases). + +Unfortunately, in the Arabic script and language the situation is much more complicated. Not only is there an array of intra-word vowels plus inflections that have to represented on most letters (by {\em marks}), but each letter can take on a multiple of shapes, with almost limitless possibilities. Representing each and every one of these possible letter-mark combinations by a single Unicode code point is unwieldy and impractical. A quick look at the (in my strong opinion) very ill-conceived Arabic Presentation Forms~A +(U+FB50..U+FDFF block) will let one view a non-exhaustive list of some possible letter-shape possibilities that is virtually unworkable for digital typesetting purposes. Now if one were to add all of the possible letter-mark combinations for each +character of the two Presentation-Forms blocks (A and B, for a total of 891 characters) the number of resultant code points would expand exponentially. + +Even if we consider only the basic four Arabic-script shapes-per-letter needed for normal text entry into an editor (isolated, initial, medial, and final), managing separate code points for each possibility still becomes quite impractical. Hence the OpenType solution of entering marks separate from base letters, then combining them using OpenType rules which are then displayed by the layout engine. That layout engine may be within a text editor or a text processor such as \TeX. + +But this is where the problem begins. OpenType rules specify {\em general positioning} (GPOS) rules for the {\em vertical} placement of marks over base letters. This is entirely correct and indispensable (see \in{Figure}[fig:wa]). On the other hand, in a text editor this makes it very impractical and tiresome to proofread and correct vowels in an Arabic text of any substantial length. This is because in an editor one selects text, not vertically, but {\em horizontally}. Anyone who has tried to select and edit Arabic-script marks in an editor separately from the consonants knows what a pain it is. It is a two-dimensional task boxed into a one-dimensional standard of digital input with a cursor. No text editor or processor of which I am aware has ever been designed to handle two-dimensional input. + +\placefigure +[here][fig:wa] +{Mark on consonant in Arabic.} +{\externalfigure[wa.pdf][scale=3000]} + +The above problem is not unique to digital typography. Lead-press typography as well had a hard time dealing with marked Arabic script. Ironically, the best examples of Arabic-script typesetting with marks over multiple shapes is found in early 20\high{th} century Arabic typography. But over the following decades the use of marks decreases, along with less and less shape variations of the letters themselves. This is due, no doubt, to the overall unwieldiness and growing expense of the process. So Arabic critical editions are rarely, if ever, done to the same degree of orthographical precision +as a Classical-Greek edition (see \in{Figure}[fig:avicenna] for a standard example of an Arabic critical edition). + +\start +\setupcaptions[location=low,width=0.4\textwidth,align=right] +\setupfloats[location=outer] +\placefigure +[][fig:avicenna] +{From George Anawati's critical edition of Ibn Sīnā's {\em Metaphysics} (1950's).} +{\externalfigure[ilahiyyat-1.pdf][width=.56\textwidth]} +\stop + +As a part of my doctoral dissertation I did a critical edition of the Arabic text of {\em Wisdom Observations} by Shaykh Aḥmad al-Aḥsāʾī (d.~1826). In this +case full marks were applied +(see \in{Figure}[fig:fawaid]), a task made immensely easier by the use of Klaus Lagally's Arab\TeX\ transcription method. This method involves an entirely romanized Latin transcription of the Arabic script, using combinations of one or more Latin vowel letters to represent Arabic marks. If this had to be done in a text editor with a digital Arabic font the task of managing the marks would have been much more difficult. + +With the growing popularity of Unicode and its implementation within \TeX\ (particularly \XETEX\ and \Context) Lagally's method has become mostly obsolete. Thankfully, today no one should have to enter text via Lagally's transcription method (as complete and as reliable as it was), particularly for extensive texts. Yet the problem of entering and editing marks within digital Arabic text remains a thorn in the side of scholars who have to work with the Arabic script on a continual basis. + +\start +\setupcaptions[location=low,width=0.33\textwidth,align=right] +\setupfloats[location=outer] +\placefigure +[always][fig:fawaid] +{From Idris Samawi Hamid's draft critical edition of Shaykh Aḥmad's {\em Wisdom Observations} (doctoral dissertation; note the extensive use of marks).} +{\externalfigure[fawaid-427-crop.pdf][width=0.74\textwidth]} +\stopsubsection +\stop + +%\pagebreak +\startsubsection[title=Enter SC~Unipad] +For some time this author +struggled over the choice between the use of Unicode-based Arabic script and that of +Lagally's romanized transcription. Finally, I discovered a Unicode editor called SC Unipad, a \$200.00 utility developed by some Persian-American developers. In addition to having perhaps the best implementation of the Unicode Bidirectional Algorithm in any text editor, the developers implemented a simple yet ingenious solution to the problem of entering text with marks. If the mark belongs to a given letter that is initial or medial, extend the letter via {\em taṭwīl} and place the mark {\em horizontally} to the left of that letter. Consider the following Unicode Arabic text rendered with a simple and basic +OpenType font such as SIL's Scheherazade: + +\startalignment[middle] +{\SIL بِسۡمِ ٱللّٰهِ ٱلرَّحۡمٰنِ ٱلرَّحِيۡمِ ۝١} +\stopalignment + +\blank\blank +Note the vertical marks above and below the base letters. Now let's compare the above to precisely the same string rendered by Unipad (see \in{Figure}[fig:unipad]). Note the positioning of the marks now makes them easily editable in one dimension (horizontal). + +As exciting as this development was (and Unipad has lots of useful features for editing Unicode text) it soon became clear that this was a solution with many limitations. For example: + +\startitemize[packed] +\item The interline spacing is too tight, so marks come very close to clashing. +\item The Unicode font is bitmap and hardcoded into the application. This means it cannot be used in any other editor. +\item Although designed for its size (making it crystal clear at that size) it cannot be enlarged or shrunk. +\item A \TeX-code editor needs lots of important features if one is to have an efficient workflow; Unipad is hardly any good at all as a \TeX-code editor. +\item Perhaps worst of all, Unipad hasn't been updated since 2006 and is only up to Unicode version 4.1.0 in compatibility (Unicode is currently at 7.0). Numerous characters (including from Arabic script) are thus missing. +\stopitemize + +Despite its severe limitations, SC~Unipad had indeed found a simple and ingenious solution to the problem of entering and editing Arabic-script marked text. The more general solution to the problem, then, would be to develop an OpenType font with capabilities similar to (and beyond) those of Unipad's bitmap font. + +\start +\setupcaptions[location=low,width=0.265\textwidth,align=right] +\setupfloats[location=outer] +\placefigure +[here][fig:unipad] +{SC Unipad and Arabic-script marks.} +{\externalfigure[sc-unipad.pdf][width=0.7\textwidth,framed]} +\stop + + + +\stopsubsection + +\startsubsection[title=Verbatim] +In the process of consulting with Hans Hagen in the ongoing development of \Context's bidirectional capabilities, lots of verbatim issues arise. Verbatim is important because it helps to illustrate how a string of text is supposed to behave at different levels of the bi-directional analysis. So a common procedure would be to place a string of text into a +buffer, then process that buffer to show both verbatim as well as fully processed output in the resultant pdf. No current font really meets the needs for verbatim Arabic text. So far we have been using DejaVu Sans Mono, whose limitations and lacunae as far as Arabic script are concerned are considerable. + +A verbatim font is usually a fixed-width text font, the same kind of font generally used in a text editor. Thus a properly designed OpenType fixed-width font would address both issues: that of text editing as well as of verbatim representation in \TeX\ processing. +\stopsubsection + +\startsubsection[title=Completeness] +Finally, there is no generally available fixed-width (or even variable-width) font that is {\em complete} with respect to Arabic script. Nearly every available text-editing font is missing important characters. Any solution to the above problem would need to be as complete as possible as well as support the Arabic-script ranges of Unicode~7.0, the +latest version as of this writing. +\stopsubsection +\stopsection + +\startsection[title=From \LMM\ to \ALMF] +\startsubsection[title=\TeX\ Gyre \LMM] +For our project we decided to extend Latin Modern Mono Regular 10 to Arabic. We chose this particular font for a number of reasons, including + +\startitemize[packed] +\item Most \TeX\ verbatim work is done in \LMM\ Regular. +\item The \TeX\ Gyre fonts are OpenType, and currently support everything in Latin needed +for the {\em transliteration} of Arabic script into Latin. This is crucial for the editing of academic texts that work with transliteration. +\stopitemize + +\TeX\ Gyre Cursor (close in design style to Courier New, a very nice editing fixed-width font) was also considered as a starting point. On the other hand, the metric width of Cursor is 600 font units, whereas that of Latin Modern Mono is 525 font units. Since the horizontal moving of marks is already going to stretch out the length of word strings, and the vertical metrics are going to have to be increased as well, using a smaller metric width allows a more economical use of space for marked Arabic-script expressions. + +Another reason for going with Latin Modern is in honor of Donald Knuth's original verbatim design (Computer Modern Mono). My own motivations for getting into digital typography in the first place are much the same as those of Knuth, so an extension of Knuth in this instance seemed to be in the spirit of things. +\stopsubsection + +\startsubsection[title=Design] +\startsubsubsection[title=Knuthian Inspiration] +The Arabic-script portion of \ALMF\ is a completely original font design, not based on any other Arabic-script font or typeface. It is inspired in part by the SC~Unipad bitmap font. Its developers did an excellent job of designing it for readability at its intended resolution (which is where bitmaps are supposed to excel). But the actual letters of our font were developed from a careful study of Knuth's letters in \LMM, such as the characters \quote{l}, \quote{r}, \quote{c}, and \quote{7}. The aim was to use elements in the original Knuthian design to develop a culturally authentic and aesthetically pleasing Arabic-script fixed-width font. In other words, \ALMF\ is a natural extension of and complement to the Knuthian design and inspiration. + +In the following example, the Arabic-script letters are on the right: + +\blank +{\LMLL l} \quad \quad\quad \quad {\ALMLL ا} + +{\LMLL c} \quad \quad\quad \quad {\ALMLL ع ۴} + +{\LMLL r} \quad \quad\quad \quad {\ALMLL ب ج} + +{\LMLL m} \quad \quad\quad \quad {\ALMLL س} + +{\LMLL 7} \quad \quad\quad \quad {\ALMLL ٧} + +\blank + +Thus one notices that the \quotation{ear} of the \quote{r} (top-right \quotation{terminal} or extremity) harmonizes well with many of the extremities of the Arabic letters. Now traditional Arabic-script does not contain these \quotation{ears}: We integrated the ears into the Arabic design in a way that we hope expands the possibilities of culturally authentic Arabic in a natural way. For example: In traditional Arabic terminal endings in characters are usually tapered from thick to thin. In some of the characters above one will notice we did exactly the opposite: Tapering goes from thin to thick (at the \quotation{ears}). Yet I believe we have managed to maintain a powerful, authentic Arabic feel, that is in harmony with the Knuthian design. +\stopsubsubsection + +\startsubsubsection[title=Vertical Metrics and Latin] + +Note that the width and length of the stem of the Arabic letter Alif (‎{\ALM ا}‎, first letter of the Arabic alphabet) is exactly the same as that of the Latin lower +case Ell ({\tt l}). Using this as a benchmark, it becomes easy to see why Arabic script nearly always needs more vertical-metric space than Latin in mixed script contexts. The maximum ascenders and descenders for \ALMF\ are considerably greater than those of \LMM. This is to be expected: As we design the rest of the Arabic letters with respect to Alif, the ascender-descender space naturally has to expand to accommodate things. Note also that the baseline for Arabic letters is higher than it is for Latin: This is also natural and to be expected. + +Virtually every aspect of the base \LMM\ design has been incorporated into \ALMF. I did notice defects in a number of glyphs but except in a few minor +cases have not changed anything in \LM. The OpenType tables have been ported over. The only thing that prevents \ALMF\ from serving as a drop-in replacement for its \LMM\ base is that the vertical metrics are different. Indeed, this is one reason for choosing to name the font \quote{\ALMF}\ instead of \quote{Latin-Arabic Modern}. Of course, in \TeX\ one can set the interline spacing of \ALMF\ to precisely match that of its \LM\ counterpart. + +\startsubsubsection[title=On-screen Applications] +Due to its intended use for editors, a considerable effort has been made to make \ALMF\ comfortable for on-screen viewing. A number of Arabic-script characters have gone through numerous iterations in pursuit of this goal. Each shape iteration often involves having to then adjust dozens of other characters that depend on that shape, making this a very time-consuming process (the letter {\ALM س} has been a real challenge, with its very close teeth). I did not change the \LM\ counterparts (except in some very minor places as mentioned above). On the other hand, the hinting of \ALMF\ is, I hold, much better than that of \LMM. + +One reason I did not previously use \LMM\ for on-screen applications such as text editing is because of its very limited hinting. For example: An on-screen string of, e.\,g., all capital letters at normal typing sizes (9-14 points) shows sometimes wild inconsistencies in the letter heights. Now, in \ALMF, the Latin component of \ALMF\ looks much better on-screen than in the former; it is to my eye virtually as comfortable as, say, Courier New on Windows. + +Arabic-script fonts generally require greater point sizes for readability than Latin. \ALMF\ is just readable on-screen with marks even as low as seven points. Comfortable point sizes for editing purposes range from 9 to 14 points (I particularly like the hinting effects in sizes 11 and 13; your own mileage may vary of course). +\stopsubsubsection + +\startsubsubsection[title=Some Notes:] + +\startitemize[packed] +\item In a future maintenance release I may fix some of the minor errors in a few of the \LMM\ glyphs. +\item Although it has plenty of room for improvement (as almost any font does) the shapes have been more successful than I expected. I can envision Arabic-script applications where this could be used apart from editing or verbatim (such as +web-page design). +\item Related to this, I may eventually add a proportional version of this design to complement \TeX\ Gyre \LM\ Proportional~10. Much of the current design elements can be reused. Although not as useful for verbatim and editing purposes, the aesthetics appear to me as robust enough to make a future proportional version a worthwhile pursuit. +\stopitemize +\stopsubsection + +\startsubsection[title=Character Coverage] +\startsubsubsection[title=Arabic Blocks] +The original Latin Modern Mono contains 785 glyphs, including about 617 standard Unicode characters. Oriental-\TeX\ Arabic-Latin +Modern Mono contains 2630 glyphs, for an increase of 1845 glyphs. Of these, 1113 are Unicode code points. \ALMF\ covers every single character in all Unicode-Arabic blocks: Arabic, Arabic Supplement, Arabic Extended, Arabic Presentation-Forms~A, and Arabic Presentation-Forms~B. + +One of the main features of \ALMF\ is its unique treatment of Arabic-script marks. Our font contains a total of +66 Unicode marks, more than any other publicly available font of which I am aware. It is almost certainly the +most complete fixed-width font as far as the Arabic-script blocks are concerned. + \startfootnote + Nor have I seen any commercial font that covers these ranges so completely. On the other hand, this + is not to deny that others may exist or be under development. + \stopfootnote +\stopsubsubsection +\startsubsubsection[title=Presentation Forms] +The Arabic Presentation Forms~A includes what are commonly called \quotation{ligatures}, although the ligature +concept doesn't really make sense for the Arabic script (for reasons discussed elsewhere). These characters have +been decomposed into their base components: For two-component forms the metric width has been doubled; for +three-component forms the metric width has been tripled. In part for this reason we call this font \quotation{fixed-width} +rather than \quotation{mono}. That is, in a fixed-width font, occasional or special characters may have a width that is a +natural-number multiple of the fixed width; in a monospaced font every glyph must have precisely the same width. +The expressions \quote{fixed-width} and \quote{monospaced} are normally used synonymously; we have introduced a +subtle distinction in our adaptation of this nomenclature. Some examples: + +%\blank +\start +% \ALMLL ﯬ ﰦ ﲰ ﵐ ﶜ ﵥ +\ALMLL ﯬ ﰦ ﲰ ﵐ ﶜ +\stop +%\blank + +Column U+FDFX of Arabic Presentation-Forms~A has been maintained without decomposition: A special character has been +designed for each, within the standard fixed-width: + +\start +\ALMLL ﷰ ﷱ ﷲ ﷳ ﷴ ﷵ ﷶ + +ﷷ ﷸ ﷹ ﷺ ﷻ ﷼ ﷽ +\stop + +The famous Lām-Alif \quotation{ligature} ({\ALM ﻻ ﻼ}) has been maintained {\em only} for U+FEFB and U+FEFC. +In every other case (U+FEF5..U+FEFA) they have been decomposed. In addition, +U+0644 plus U+0621 do {\em not} automatically combine into the Lām-Alif combination. This is because \ALMF's purpose is primarily to serve as an input, editing, and verbatim font. Ligatures and the like get in the way of that task. Once input is done the text can processed via a layout processor such as \TeX\ to another font (or one can make a simple font switch in a word processor). +U+FEFB and U+FEFC (initial and final forms) have been kept +because these two have an ancient pedigree in the Arabic script and deserve an independent representation.% + \startfootnote + Indeed, in some ancient texts ({\ALM ﻻ} or U+FEFB) is considered a distinct letter of the Arabic alphabet. On the other hand, + U+FEFB proper should only be used in special cases, otherwise U+0644 plus U+0621 should always be input explicitly. + \stopfootnote + +With a few exceptions (such as U+FD3E--U+FD3F {\ALM ﴾ ﴿} ornate parenthesis), the bulk of Presentation-Forms~A are useless for digital text entry and their use should be severely discouraged. They are there purely for +esoteric legacy purposes, and in my view even those legacy purposes are suspect. Very few applications ever used the bulk of these characters; +it is better to convert what few (if any) texts encoded using them into what even the Unicode Consortium calls the \quotation{preferred} Arabic Block (0600-06FF). On the other hand, it is the aim of \ALMF\ to be complete, so we have included the entire range of presentation characters. + +Note that \ALMF\ does {\em not} support initial, medial, or final processing of Presentation Forms; this is intentional. The most these forms should be used for is visual presentation for purposes of conversion to the main Unicode Arabic block.% + \startfootnote + Indeed, I strongly considered a purely {\em implicit} representation of the Presentation Forms in terms of OpenType lookups and the {\tt ccmp} feature. Uniscribe, Microsoft's ubiquitous OpenType and language-layout processor, would not apply the feature, although the lookups were technically correct (we will discuss some of Uniscribe's other peculiarities as well later in this report). After many experiments and careful analysis it was decided to go ahead with an {\em explicit} representation of each and every Presentation-Forms character. + \stopfootnote + +\stopsubsubsection + +\startsubsubsection[title=Format and Spacing Glyph Representations] +We added twelve additional Unicode format and spacing characters (with explicit glyph representations) and also +designed a glyph representation for +\LM\ U+00A0 (no-break space), as well as U+25CC (dotted circle): + +\start +\ALML ؜ ‌ ‎ ‍ ‎ ‏ ‪ ‫ ‬ ‭ ‮  ◌ +\stop + +The glyph representations of these characters are important for at least a couple of reasons: +\startitemize[n,packed] +\item For verbatim representation of multi-directional and multilingual text. +\item For visual control and confirmation in text editors. + \startfootnote + Oddly enough, Microsoft Notepad is one of the only text editors that actually let's you see the glyph representations of format (or \quotation{control}) and spacing characters. The glyph representation of format characters can also be turned on and off, while those of spacing characters seem to remain on permanently if the font has them. + \stopfootnote +\stopitemize + + +The Arabic Language Mark --- \start\ALML؜\stop\ or U+061C --- is a new format character, placed in the main Arabic block. We will discuss its role in bi-directional typesetting in future research. Given the decision by the Unicode Consortium to place it in the Arabic Block, I decided to give it an Arabic-script representation. The abbreviation is short for {\ALM علامة الحرف العربي}‎, which means \quotation{Arabic Language Mark}. + +The dotted circle is needed for Uniscribe to implement its \quotation{invalid marks} algorithm as well as the individual representation of marks in running text. We will say more about Uniscribe later. +\stopsubsubsection +\stopsubsection +\stopsection + +\startsection[title=OpenType Features] +\startsubsection[title=\TeX\ Gyre \LMM\ and OpenType] +As mentioned earlier, \ALMF\ has imported all \TeX\ Gyre \LMM\ OpenType features. A few redundancies have been removed, and one important bug that caused Uniscribe-based applications to switch to another fallback font +under some conditions has been fixed. +\stopsubsection +\startsubsection[title=Scripts and Language-Specific Discretionaries] +There are now two supported scripts: Arabic (OpenType tag {\tt}) and Latin (tag {\tt}). In \Context\ one activates them using the {\tt