;; TAML-OTF.flt -- Font Layout Table for Tamil OpenType fonts
;; Copyright (C) 2004
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H15PRO112
;; This file is part of the m17n database; a sub-part of the m17n
;; library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.
;; The m17n library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Lesser General Public License for more details.
;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
;; 02111-1307, USA.
;;;
TAML-OTF.flt
;;;
;;; For Tamil OpenType fonts to draw Tamil.
;;; Fonts are available from .
(category
;; C: general consonant
;; V: independent vowel
;; H: HALANT
;; m: MATRA (pre)
;; u: MATRA (above)
;; b: MATRA (below)
;; p: MATRA (post)
;; A: vowel modifier (above)
;; a: vowel modifier (post)
;; N: ZWNJ (ZERO WIDTH NON-JOINER)
;; J: ZWJ (ZERO WIDTH JOINER)
;; E: ELSE
;;
(0x200C ?N) ; ZWNJ
(0x200D ?J) ; ZWJ
(0x0964 ?E) ; DANDA
(0x0965 ?E) ; DOUBLE DANDA
(0x0B80 0x0BFF ?E) ; ELSE
(0x0B85 0x0B94 ?V) ; LETTER AA .. LETTER AU
(0x0B95 0x0BB9 ?C) ; LETTER KA .. LETTER HA
(0x0BBE ?p) ; VOWEL SIGN AA (post)
(0x0BBF ?p) ; VOWEL SIGN I (post)
(0x0BC0 ?u) ; VOWEL SIGN II (above)
(0x0BC1 ?b) ; VOWEL SIGN U (below)
(0x0BC2 ?b) ; VOWEL SIGN UU (below)
(0x0BC6 0x0BC8 ?m) ; VOWEL SIGN E, EE, AI (pre)
(0x0BCA 0x0BCC ?t) ; VOWEL SIGN O, OO, AU (two-part)
(0x0BCD ?H) ; VIRAMA
(0x0BD7 ?p) ; AU LENGTH MARK (post)
)
;; Step 1 : Syllable identification.
(generator
(0
(cond
;; A syllable ending with a two-part vowel sign.
("((CH)*C)(t)"
< | (1 otf:taml=akhn) (3 two-part) | >)
;; A syllable ending with a vowel sign.
("((CH)*C)([mubp])"
< | (1 otf:taml=akhn) (3 =) | >)
;; No vowel sign.
("(CH)*CH?"
< | otf:taml=akhn | >)
;; A variation of AU.
((0x0B92 0x0BD7)
0x0B94)
("." =))
*)
(two-part
(cond
((0x0BCA)
0x0BC6 0x0BBE)
((0x0BCB)
0x0BC7 0x0BBE)
((0x0BCC)
0x0BC6 0x0BD7))))
;; Step 2 : Matra movements.
(generator
(0
(cond
(" ([^ mubp]*)([^ mubp])(m)?([ubp])? "
| (1 = *) (3 =) (2 =) (4 =) |)
("." =))
*))
;; Step 3 : OTF substitutions and positionings.
(generator
(0
(cond
(" ([^ ]*) "
(1 otf:taml))
("."
[ otf:taml=+ ]))
*))
;; Local Variables:
;; mode: emacs-lisp
;; End: