From 1afd5b7e07764ad7217cb461c8fc3242d5c997c7 Mon Sep 17 00:00:00 2001 From: ntakahas Date: Tue, 22 Jun 2004 12:00:52 +0000 Subject: [PATCH] New file --- GUR-OTF.flt | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 GUR-OTF.flt diff --git a/GUR-OTF.flt b/GUR-OTF.flt new file mode 100644 index 0000000..a0dff3f --- /dev/null +++ b/GUR-OTF.flt @@ -0,0 +1,139 @@ +;; GUR-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., 59 Temple Place, Suite 330, Boston, MA +;; 02111-1307, USA. + +;;;
  • GUR-OTF.flt +;;; +;;; For Gurmukhi OpenType fonts to draw Punjabi. +;;; 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 + (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 (HARANT) + (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)?" + < | (0 move-base-Halant) | >) + + ;; A syllable starting with an independent vowel. + ("V[Aa]?" + < | = * | > ) + + ("." =)) + *) + + ;; Move Halant on the base consonant to the tail. + ;; 0x0A7F indicates the postion 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 + (" ([^ ]*HN) " + (1 otf:guru=nukt)) + (" ([^ ]*) " + (1 otf:guru=nukt,vatu,pstf,abvs,blws)) + ((0x0A71) + otf:guru) + ("." + [ otf:guru=+ ] )) + *)) + +;; Local Variables: +;; mode: emacs-lisp +;; End: -- 1.7.10.4