;; GURU-OTF.flt -- Font Layout Table for Gurmukhi 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., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;;
  • GURU-OTF.flt ;;; ;;; For Gurmukhi OpenType fonts to draw the Punjabi script. ;;; Designed for saab.otf (version 0.91). ;;; (category ;; C: general consonant ;; Y: post-base consonat (YA) ;; R: below-base consonat (RA, VA, HA) ;; n: NUKTA ;; H: HALANT ;; m: MATRA (pre) ;; u: MATRA (above) ;; b: MATRA (below) ;; p: MATRA (post) ;; A: vowel modifier (above) ;; a: vowel modifier (post) ;; V: independent vowel ;; 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 (0x0A00 0x0A7F ?E) ; ELSE (0x0A01 ?A) ; SIGN ADAK BINDI (above) (0x0A02 ?A) ; SIGN BINDI (above) (0x0A03 ?a) ; SIGN VISARGA (post) (0x0A05 0x0A14 ?V) ; LETTER A .. LETTER AU (0x0A15 0x0A38 ?C) ; LETTER KA .. LETTER SA (0x0A2F ?Y) ; LETTER YA (0x0A30 ?R) ; LETTER RA (0x0A35 ?R) ; LETTER VA (0x0A39 ?R) ; LETTER HA (0x0A3C ?n) ; SIGN NUKTA (0x0A3E ?p) ; VOWEL SIGN AA (post) (0x0A3F ?m) ; VOWEL SIGN I (pre) (0x0A40 ?p) ; VOWEL SIGN II (post) (0x0A41 ?b) ; VOWEL SIGN U (below) (0x0A42 ?b) ; VOWEL SIGN UU (below) (0x0A47 ?u) ; VOWEL SIGN EE (above) (0x0A48 ?u) ; VOWEL SIGN AI (above) (0x0A4B ?u) ; VOWEL SIGN OO (above) (0x0A4C ?u) ; VOWEL SIGN AU (above) (0x0A4D ?H) ; SIGN VIRAMA (HALANT) (0x0A59 0x0A5E ?C) ; LETTER KHHA .. LETTER FA (0x0A70 ?A) ; TIPPI (above) (0x0A7F ?X) ; internal use ) ;; Step 1 : Syllable identification and Halant movement. (generator (0 (cond ;; A syllable ending with a vowel sign and/or a vowel modifier. ("(([CRY]n?H)*[CRY]n?)([mubp][Aa]?|[Aa])" < | (1 move-base-Halant) (3 =) | >) ;; A syllable without a vowel sign nor a vowel modifier. ("(([CRY]n?H)*[CRY]n?)(H)?" < | move-base-Halant | >) ;; A syllable starting with an independent vowel. ("V[Aa]?" < | = * | > ) ("." =)) *) ;; Move Halant on the base consonant to the tail. ;; 0x0A7F indicates the position for above- or below Matra. (move-base-Halant (cond ("(([CRY]n?H)*[CRY]n?)(H)(Y)$" (1 = *) 0x0A7F (4 =) (3 =)) ("(([CRY]n?H)*[CRY]n?)(H)(R)$" (1 = *) (4 =) (3 =) 0x0A7F) ("([CRY]n?H)*[CRY]n?H$" = * 0x200C) (".*" = * 0x0A7F)))) ;; Step 2 : Move Matra. (generator (0 (cond ;; 1 2 3 4 5 6 (" ([CRYnH]*)X(YH)?(m)?([ub])?(p)?([Aa])? " | (3 =) (1 = *) (4 =) (2 = =) (5 =) (6 =) |) ("." =)) *)) ;; Step 3 : Drive OTF tables. (generator (0 (cond (" ([^ ]*H)N " (1 otf:guru=nukt)) (" ([^ ]*) " (1 otf:guru=nukt,blwf,pstf,vatu,pres,abvs,blws,psts)) ((0x0A71) otf:guru) ("." [ otf:guru=+ ] )) *)) ;; Local Variables: ;; mode: emacs-lisp ;; End: