;; LAOO-OTF.flt -- Font Layout Table for Lao
;; Copyright (C) 2006, 2007  AIST (H15PRO112)
;; See the end for copying conditions.

(font layouter laoo-otf nil
      (font (nil nil unicode-bmp :otf=lao\ )))

;;; <li> LAOO-OTF.flt

(category
 ;; C: CONSONANT
 ;; S: LAO SEMIVOWEL SIGN LO
 ;; A: VOWEL AM
 ;; V: DEPENDENT VOWEL
 ;; T: TONE
 ;; I: OTHER INDEPENDENT
 (0x0E81 0x0EAE	?C)
 (0x0EAF 0x0EB0	?I)
 (0x0EB1	?V)
 (0x0EB2	?I)
 (0x0EB3	?A)
 (0x0EB4 0x0EBB	?V)
 (0x0EBC	?S)
 (0x0EBD 0x0EC6	?I)
 (0x0EC8 0x0ECC	?T)
 (0x0ECD	?V)
 (0x0ED0 0x0ED9 ?I)
 (0x0EDC 0x0EDD ?C)

 (0x25CC	?I))

;; The only GSUB is the decomposition of AM.  We do it by hand because
;; it requires reordering in addition to decomposition.

(generator
 (0
  (cond
   ("(CS?)(T)?A"
    < | (1 = *) 0x0ECD (2 =) 0x0EB2 | > )
   ("CS?V?T?"
    < | = * | > )
   ("[SVT]"
    < | 0x25CC = | > )
   ("."
    =))
  *))

;; Then apply all GPOS features.

(generator
 (0
  (cond
   (" ([^ ]*) "
    (1 otf:lao\ =))
   ("."
    [ otf:lao\ =+ ]))
  *))

;; Copyright (C) 2006, 2007
;;   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., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;; Local Variables:
;; mode: emacs-lisp
;; End:
