1 ;; ARAB-OTF.flt -- Font Layout Table for Arabic OpenType font
2 ;; Copyright (C) 2004, 2006, 2007
3 ;; National Institute of Advanced Industrial Science and Technology (AIST)
4 ;; Registration Number H15PRO112
6 ;; This file is part of the m17n database; a sub-part of the m17n
9 ;; The m17n library is free software; you can redistribute it and/or
10 ;; modify it under the terms of the GNU Lesser General Public License
11 ;; as published by the Free Software Foundation; either version 2.1 of
12 ;; the License, or (at your option) any later version.
14 ;; The m17n library is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ;; Lesser General Public License for more details.
19 ;; You should have received a copy of the GNU Lesser General Public
20 ;; License along with the m17n library; if not, write to the Free
21 ;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26 ;;; For Arabic OpenType fonts to draw the Arabic script.
28 (font layouter arab-otf nil
29 (font (nil nil unicode-bmp :otf=arab=init,medi,fina,liga+mark)))
31 ;; Step 0: Move Kazakh high hamza.
34 ;; p: high hamza carrier (p for positive)
35 ;; n: high hamza suppressor (n for negative)
38 (0x0750 0x077F ?x) ; Arabic Supplement
46 (0xFB50 0xFDFF ?X) ; Arabic Presentation Forms-A
47 (0xFE70 0xFEFC ?X) ; Arabic Presentation Forms-B
53 ;; If a presentation form is found, draw the whole sequence as is.
56 (".*p.*" ; If a high hamza is found,
58 (".*n.*" ; and a suppressor exists,
59 rmhamza *) ; then remove the high hamza.
60 (0 ; Otherwise, move the high
61 0x674 rmhamza *))) ; hamza to the beginning.
62 (0 = *))) ; If no high hamza, do nothing.
76 ;; D: Dual-joining (beh, teh, etc. & zwj)
77 ;; R: Right-joining (alef, dal, thal, reh, zain)
78 ;; U: Non-joining (Hamza, etc. & zwnj)
79 ;; T: Transparent (combining marks)
130 (0xFB50 0xFDFF ?X) ; Arabic Presentation Forms-A
131 (0xFE70 0xFEFC ?X) ; Arabic Presentation Forms-B
138 ;; Step 2: Initial, medial, or final.
143 (".*X.*" (cond ("[DRUX]T*" < = * >) ("." =)) *)
153 ("(.)(T*)(.*)" ; == (D)(T*)(U.*)
181 ("(.)(T*)(.*)" ; == (D)(T*)(U.*)
205 ("(.)(T*)(.*)" ; == (D)(T*)(U.*)
212 ("(.)(T*)(.*)" ; == ([RU])(T*)(.*)
219 ;; Step 3: Other GSUB features (ligatures, etc.)
223 otf:arab=rlig,calt,liga,dlig,cswh,mset))
225 ;; Step 4: GPOS features.