1 ;; ARAB-OTF-NO-GPOS.flt -- Font Layout Table for Arabic OpenType font sans GPOS
2 ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter arab-otf-no-gpos nil
6 (font (nil nil unicode-bmp :otf=arab=init,medi,fina+~mark)))
8 ;;; <li> ARAB-OTF-NO-GPOS.flt
10 ;;; For Arabic OpenType fonts that don't have GPOS table to draw the
13 ;; Step 0: Move Kazakh high hamza.
16 ;; p: high hamza carrier (p for positive)
17 ;; n: high hamza suppressor (n for negative)
19 ;; X: presentation form
25 (0x0750 0x077F ?x) ; Arabic Supplement
29 (0xFB50 0xFDFF ?X) ; Arabic Presentation Forms-A
30 (0xFE70 0xFEFC ?X) ; Arabic Presentation Forms-B
36 ;; If a presentation form is found, draw the whole sequence as is.
39 (".*p.*" ; If a high hamza is found,
41 (".*n.*" ; and a suppressor exists,
42 rmhamza *) ; then remove the high hamza.
43 (0 ; Otherwise, move the high
44 0x674 rmhamza *))) ; hamza to the beginning.
45 (0 = *))) ; If no high hamza, do nothing.
56 ;; Step 1: Initial, medial, or final. Surround diacritics by
60 ;; D: Dual-joining (beh, teh, etc. & zwj) except for LAMs
62 ;; R: Right-joining (alef, dal, thal, reh, zain) except for ALEFs
64 ;; U: Non-joining (Hamza, etc. & zwnj)
65 ;; T: Transparent (combining marks)
122 (0xE800 ?C) ; dummy dotted-circle
123 (0xFB50 0xFDFF ?X) ; Arabic Presentation Forms-A
124 (0xFE70 0xFEFC ?X) ; Arabic Presentation Forms-B
130 (".*X.*" (cond ("[DLRAUX]T*" < = * >) ("." =)) *)
132 ;; LAM-ALEF pattern. Move diacritcs on LAM after ALEF. This is to
133 ;; avoid loosing surrounding separators by OTF's liga or rlig
134 ;; features in the next step.
135 ("(L)(T*)(A)(T*)(.*)"
148 ("(.)(T*)(.*)" ; == (D)(T*)(U.*)
158 ;; Incorrect leading diacritcs.
160 (1 (cond ((font-facility 0x25CC)
161 (cond ("." 0x25CC | = |)) *)
162 ("." 0xE800 | = |)) *)
167 ;; LAM-ALEF pattern. See the above comment.
168 ("(L)(T*)(A)(T*)(.*)"
181 ("(.)(T*)(.*)" ; == (D)(T*)(U.*)
193 ;; LAM-ALEF pattern. See the above comment.
194 ("(L)(T*)(A)(T*)(.*)"
207 ("(.)(T*)(.*)" ; == (D)(T*)(U.*)
212 ("(.)(T*)(.*)" ; == ([RU])(T*)(.*)
217 ;; Step 2: Remaining GSUB features (ligature, etc.).
221 otf:arab=rlig,calt,liga,dlig,cswh,mset+))
223 ;; Step 3: Simulate missing GPOS features.
228 ("C ([^ ]) " ; dummy dotted-circle
230 ("([^ ]) ([^ ]+)? ([^ ]+)? " ; LAM-ALEF ligature
231 < (1 =) (2 ("." Br.Br =) *) (3 ("." Bl.Bl =) *) >)
233 < (1 =) (2 ("." Bc.Bc =) *) >)
234 ("([^ ])([^ ]) ([^ ]+)? ([^ ]+)? " ; failed LAM-ALEF ligature
235 (1 < =) (3 ("." Br.Br =) *) > (2 < = ) (4 ("." Bl.Bl =) *) >)
240 ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
241 ;; National Institute of Advanced Industrial Science and Technology (AIST)
242 ;; Registration Number H15PRO112
244 ;; This file is part of the m17n database; a sub-part of the m17n
247 ;; The m17n library is free software; you can redistribute it and/or
248 ;; modify it under the terms of the GNU Lesser General Public License
249 ;; as published by the Free Software Foundation; either version 2.1 of
250 ;; the License, or (at your option) any later version.
252 ;; The m17n library is distributed in the hope that it will be useful,
253 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
254 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
255 ;; Lesser General Public License for more details.
257 ;; You should have received a copy of the GNU Lesser General Public
258 ;; License along with the m17n library; if not, write to the Free
259 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
260 ;; Boston, MA 02110-1301, USA.