From a3f20cf12dbd0984875168f8bfaf704c9810bad9 Mon Sep 17 00:00:00 2001 From: ntakahas Date: Mon, 25 Jan 2010 07:09:10 +0000 Subject: [PATCH] New file. --- FLT/BNG2-OTF.flt | 268 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ FLT/DEV2-OTF.flt | 252 ++++++++++++++++++++++++++++++++++++++++++++++++++ FLT/GJR2-OTF.flt | 200 ++++++++++++++++++++++++++++++++++++++++ FLT/GUR2-OTF.flt | 169 ++++++++++++++++++++++++++++++++++ FLT/KND2-OTF.flt | 207 +++++++++++++++++++++++++++++++++++++++++ FLT/MLM2-OTF.flt | 207 +++++++++++++++++++++++++++++++++++++++++ FLT/ORY2-OTF.flt | 234 +++++++++++++++++++++++++++++++++++++++++++++++ FLT/TEL2-OTF.flt | 147 ++++++++++++++++++++++++++++++ FLT/TML2-OTF.flt | 157 ++++++++++++++++++++++++++++++++ 9 files changed, 1841 insertions(+) create mode 100644 FLT/BNG2-OTF.flt create mode 100644 FLT/DEV2-OTF.flt create mode 100644 FLT/GJR2-OTF.flt create mode 100644 FLT/GUR2-OTF.flt create mode 100644 FLT/KND2-OTF.flt create mode 100644 FLT/MLM2-OTF.flt create mode 100644 FLT/ORY2-OTF.flt create mode 100644 FLT/TEL2-OTF.flt create mode 100644 FLT/TML2-OTF.flt diff --git a/FLT/BNG2-OTF.flt b/FLT/BNG2-OTF.flt new file mode 100644 index 0000000..62e1361 --- /dev/null +++ b/FLT/BNG2-OTF.flt @@ -0,0 +1,268 @@ +;; BNG2-OTF.flt -- Font Layout Table for bng2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter bng2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=bng2))) + +;;;
  • BNG2-OTF.flt +;;; +;;; For bng2 OpenType fonts to draw the Bengali script. + +;; It seems that "Shornar Bangla.ttf" is designed to render the bng2 +;; script with the following glyph sequence. +;; 1. pre matra +;; 2. half forms and below forms +;; 3. base glyph +;; 4. below forms +;; 5. below matra (09C1..09C4) +;; 6. reph +;; 7. post forms +;; 8. post matra (09C0, 09D7) +;; 9. candrabindu (0981) +;; 10. anusvara (0982) or visarga (0983) + +(category + ;; X: generic + ;; V: independent vowel + ;; C: consonant + ;; R: RA + ;; T: KHANDA TA + ;; n: NUKTA + ;; H: HALANT + ;; m: vowel sign (pre) + ;; b: vowel sign (below) + ;; p: vowel sign (post) + ;; a: vowel modifier (above) + ;; A: vowel modifier (post) + ;; N: ZWNJ + ;; J: ZWJ + (0x0980 0x09FF ?X) ; generic + (0x0981 ?a) ; SIGN CANDRABINDU + (0x0982 0x0983 ?A) ; SIGN ANUSVARA .. VISARGA + (0x0985 0x0994 ?V) ; LETTER A .. AU + (0x0995 0x09B9 ?C) ; LETTER KA .. HA + (0x09B0 ?R) ; LETTER RA + (0x09BC ?n) ; SIGN NUKTA + (0x09BE ?p) ; VOWEL SIGN AA + (0x09BF ?m) ; VOWEL SIGN I + (0x09C0 ?p) ; VOWEL SIGN II + (0x09C1 0x09C4 ?b) ; VOWEL SIGN U .. RR + (0x09C7 0x09C8 ?m) ; VOWEL SIGN E .. AI + (0x09CD ?H) ; SIGN VIRAMA + (0x09CE ?T) ; LETTER KHANDA TA + (0x09D7 ?p) ; AU LENGTH MARK + (0x09DC 0x09DF ?C) ; LETTER RRA .. YYA + (0x09E0 0x09E1 ?V) ; LETTER VOCALIC RR, LL + (0x09E2 0x09E3 ?b) ; VOWEL SIGN L .. LL + (0x09F0 ?R) ; LETTER RA WITH MIDDLE DIAGONAL + (0x09F1 ?C) ; LETTER RA WITH LOWER DIAGONAL + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (rphf ?r) + (pstf ?P) + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ;; Decompose two-part vowel signs. + ((0x09CB) + 0x09C7 0x09BE) + ((0x09CC) + 0x09C7 0x09D7) + + ;; TA + HALANT + ZWJ -> KHANDA-TA + ((0x09A4 0x09CD 0x200D) + 0x09CE) + + ;; consonant + NUKTA + ((0x09A1 0x09BC) + 0x09DC) + ((0x09A2 0x09BC) + 0x09DD) + ((0x09AF 0x09BC) + 0x09DF) + + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification +(generator + (0 + (cond + ;; Syllables with an independent vowel + ("(RH)?Vn?(J?H[CR])?m?b?p?n?a?A?" + < | (0 = *) | >) + + ;; KHANDA-TA combines only with reph. + ("(RH)?(T)" + < (2 =) (1 :otf=bng2=rphf+) >) + + ;; Consonant-based syllables + ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|m?([NJ]?b)?p?n?)a?A?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("n|H|b|p|a|A|JH[CR]" + < 0x25CC (0 :otf=bng2=blwf,pstf+) >) + + ;; Pre-base matra + ("(m)(p)?" + < (1 =) 0x25CC (2 =) >) + + ("." =)) + *)) + +;; Stage 2 +;; Basic shaping forms and matra reordering +(generator + (0 + (cond + ;; Explicit halant form starting with RA + H + ZWJ + (" (RHJ[CRnHJ]+)(HN?a?A?) " + (1 :otf?bng2=locl,nukt,akhn,blwf,pstf+) + | (1 b4post) (1 post) (2 = *) |) + + ;; Explicit halant form starting with a reph + (" (RH)([CRnHJ]+)(HN?a?A?) " + (2 :otf?bng2=locl,nukt,akhn,blwf,pstf+) + | (1 :otf=bng2=rphf+) (2 b4post) (2 post) (3 = *) |) + + ;; Other explicit halant forms + (" ([CRnHJ]+)(HN?a?A?) " + (1 :otf?bng2=locl,nukt,akhn,blwf,pstf+) + | (1 b4post) (1 post) (2 = *) |) + + ;; Ordinary syllables starting with RA + H + ZWJ + ;; 1 2 3 45 + (" (RHJ[CRnHJN]*)(mn?)?(bn?)?((pn?)?a?A?) " + ;; | + ;; This is an asterisk. (See DEV2-OTF.flt) + (1 :otf?bng2=locl,nukt,akhn,blwf,pstf+) + | (2 = *) (1 b4post) (3 = *) (1 post) (4 = *) |) + + ;; Ordinary syllables starting with a reph + ;; 1 2 3 4 56 + (" (RH)([CRnHJVN]+)(mn?)?(bn?)?((pn?)?a?A?) " + (2 :otf?bng2=locl,nukt,akhn,blwf,pstf+) + | (3 = *) (1 :otf=bng2=rphf+) (2 b4post) (4 = *) (2 post) (5 = *) |) + + ;; Other ordinary syllables + ;; 1 2 3 45 + (" ([CRnHJVN]+)(mn?)?(bn?)?((pn?)?a?A?) " + (1 :otf?bng2=locl,nukt,akhn,blwf,pstf+) + | (2 = *) (1 b4post) (3 = *) (1 post) (4 = *) |) + + ("." =)) + *) + + (b4post + (cond + ;;1 23 4 + ("([CRnHJP]*[CRV]n?)((J?PP)+)([NJ])?$" + (1 :otf=bng2=locl,nukt,akhn,blwf,half,vatu,cjct+) (4 =)) + (".+" + (0 :otf=bng2=locl,nukt,akhn,blwf,half,vatu,cjct+) (4 =)))) + + (post + (cond + ("[CRnHJP]*[CRV]n?((J?PP)+)([NJ])?$" + (1 :otf=bng2=pstf+)))) + ) + +;; Stage 3 +;; Final reordering #1 (Move pre-base matra after the last halant) +(generator + (0 + (cond + ;; 1 2 3 + (" (mn?)([^ ]+HJ?)([^H ]+) " + | (2 = *) (1 = *) (3 = *) |) + + ("." =)) + *)) + +;; Stage 4 +;; Final reordering #2 (Move reph after the first halant) +(generator + (0 + (cond + ;; Syllables with a reph and an explicit halant + ;; 1 2 3 4 + (" (mn?)?(r)([^HP ]+HJ?)([^ ]*) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ;; A reph without explicit halant + ;; 1 2 3 4 + (" (mn?)?(r)([^PpaA ]+)(P*H?p?n?a?A?) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ("." =)) + *)) + +;; Stage 5 +;; Nukta for matra and Presentation forms +(generator + (0 + (cond + (" (mn?)?([^ ]+) " + | (1 :otf=bng2=nukt,init+) + (2 :otf=bng2=nukt,pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 6 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 7 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=bng2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/DEV2-OTF.flt b/FLT/DEV2-OTF.flt new file mode 100644 index 0000000..bb9b18b --- /dev/null +++ b/FLT/DEV2-OTF.flt @@ -0,0 +1,252 @@ +;; DEV2-OTF.flt -- Font Layout Table for dev2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter dev2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=dev2))) + +;;;
  • DEV2-OTF.flt +;;; +;;; For dev2 OpenType fonts to draw the Devanagari script. + +;; No matter what the Microsoft Typography web page says, modifier +;; character sequences accepted by Uniscribe are the following. + +;; 1. matra (pre, below, above, post) +;; 2. one of candrabindu (0901), anusvara (0902), grave (0953), acute (0954) +;; 3. udatta (0951) and/or anudatta (0952) + +;; For rendering, on the other hand, the combination of Uniscribe and +;; mangal.ttf (dev2) requires the following orders. + +;; for above marks: +;; 1. above- or post matra +;; 2. reph +;; 3. one of candrabindu (0901), anusvara (0902), grave (0953), acute (0954) +;; 4. udatta (0951) + +;; for below marks: +;; 1. below matra +;; 2. anudatta (0952) + +(category + ;; X: generic + ;; V: independent vowel + ;; C: consonant + ;; R: RA + ;; n: NUKTA + ;; H: HALANT + ;; m: vowel sign (pre) + ;; u: vowel sign (above) + ;; b: vowel sign (below) + ;; p: vowel sign (post) + ;; a: vowel modifier / accent (above) + ;; A: vowel modifier (post) + ;; s: stress sign (above) + ;; S: stress sign (below) + ;; N: ZWNJ + ;; J: ZWJ + (0x0900 0x097F ?X) ; generic + (0x0900 0x0902 ?a) ; SIGN INVERTED CANDRABINDU .. ANUSVARA + (0x0903 ?A) ; SIGN VISARGA + (0x0904 0x0914 ?V) ; LETTER SHORT A .. AU + (0x0915 0x0939 ?C) ; LETTER KA .. HA + (0x0930 ?R) ; LETTER RA + (0x093C ?n) ; SIGN NUKTA + (0x093E ?p) ; VOWEL SIGN AA + (0x093F ?m) ; VOWEL SIGN I + (0x0940 ?p) ; VOWEL SIGN II + (0x0941 0x0944 ?b) ; VOWEL SIGN UU .. VOCALIC RR + (0x0945 0x0948 ?u) ; VOWEL SIGN CANDRA E .. AI + (0x0949 0x094C ?p) ; VOWEL SIGN CANDRA O .. AU + (0x094D ?H) ; SIGN VIRAMA + (0x094E ?m) ; VOWEL SIGN PRISHTHAMATRA E + (0x0951 ?s) ; STRESS SIGN UDATTA + (0x0952 ?S) ; STRESS SIGN ANUDATTA + (0x0953 0x0954 ?a) ; GRAVE ACCENT .. ACUTE ACCENT + (0x0955 ?u) ; VOWEL SIGN CHANDRA LONG E + (0x0958 0x095F ?C) ; LETTER QA .. YYA + (0x0960 0x0961 ?V) ; LETTER VOCALIC RR .. VOCALIC LL + (0x0962 0x0963 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL + (0x0972 ?V) ; LETTER CANDRA A + (0x0979 0x097F ?C) ; LETTER ZHA .. BBA + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (rphf ?r) + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ;; Decompose two-part vowel signs. + ((0x0928 0x093C) 0x0929) + ((0x0930 0x093C) 0x0931) + ((0x0933 0x093C) 0x0934) + ((0x0915 0x093C) 0x0958) + ((0x0916 0x093C) 0x0959) + ((0x0917 0x093C) 0x095A) + ((0x091C 0x093C) 0x095B) + ((0x0921 0x093C) 0x095C) + ((0x0922 0x093C) 0x095D) + ((0x092B 0x093C) 0x095E) + ((0x092F 0x093C) 0x095F) + + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification +(generator + (0 + (cond + ;; Syllables with an independent vowel + ("(RH)?Vn?(J?HR)?m?u?b?p?n?a?(Ss?|sS?)?A?" + < | (0 = *) | >) + + ;; Consonant-based syllables + ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|m?u?b?p?n?)a?(Ss?|sS?)?A?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("(m)|(n|H|u|b|p|a|S|s|A|JHR)" + < (1 =) 0x25CC (2 :otf=dev2=blwf+) >) + + ("." =)) + *)) + +;; Stage 2 +;; Basic shaping forms and matra reordering +(generator + (0 + (cond + ;; Explicit halant form starting with RA + H + ZWJ + (" (RHJ[CRnHJ]+)(HN?a?(Ss?|sS?)?A?) " + | (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |) + + ;; Explicit halant form starting with a reph + (" (RH)([CRnHJ]+)(HN?a?(Ss?|sS?)?A?) " + | (1 :otf=dev2=rphf+) (2 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (3 = *) |) + + ;; Other explicit halant forms + (" ([CRnHJ]+)(HN?a?(Ss?|sS?)?A?) " + | (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |) + + ;; Ordinary syllables starting with RA + H + ZWJ + ;; 1 2 3 + (" (RHJ[CRnHJ]*)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) " + ;; | + ;; This is an asterisk. If it were a plus sign, a standalone RHJ + ;; would match with the next pattern, not with this one. + | (2 = *) (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (3 = *) |) + + ;; Ordinary syllables starting with a reph + ;; 1 2 3 4 + (" (RH)([CRnHJV]+)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) " + | (3 = *) (1 :otf=dev2=rphf+) + (2 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (4 = *) |) + + ;; Other ordinary syllables + ;; 1 2 3 + (" ([CRnHJV]+)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) " + | (2 = *) (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (3 = *) |) + + ("." =)) + *)) + +;; Stage 3 +;; Final reordering #1 (Move pre-base matra after the last halant) +(generator + (0 + (cond + ;; 1 2 3 + (" (mn?)([^ ]+HJ?)([^H ]+) " + | (2 = *) (1 = *) (3 = *) |) + + ("." =)) + *)) + +;; Stage 4 +;; Final reordering #2 (Move reph after the first halant) +(generator + (0 + (cond + ;; Syllables with a reph and an explicit halant + ;; 1 2 3 4 + (" (mn?)?(r)([^H ]+HJ?)([^ ]*) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ;; A reph without explicit halant + ;; 1 2 3 4 5 + (" (mn?)?(r)([^aSsA ]+)(a?(Ss?|sS?)?A?) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ("." =)) + *)) + +;; Stage 5 +;; Nukta for matra and presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=dev2=nukt,pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 6 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 7 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=dev2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/GJR2-OTF.flt b/FLT/GJR2-OTF.flt new file mode 100644 index 0000000..422837a --- /dev/null +++ b/FLT/GJR2-OTF.flt @@ -0,0 +1,200 @@ +;; GJR2-OTF.flt -- Font Layout Table for gjr2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter gjr2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=gjr2))) + +;;;
  • GJR2-OTF.flt +;;; +;;; For gjr2 OpenType fonts to draw the Gujarati script. + +(category + ;; X: generic + ;; V: independent vowel + ;; C: consonant + ;; R: RA + ;; n: NUKTA + ;; H: HALANT + ;; m: vowel sign (pre) + ;; u: vowel sign (above) + ;; b: vowel sign (below) + ;; p: vowel sign (post) + ;; a: vowel modifier (above) + ;; A: vowel modifier (post) + ;; N: ZWNJ + ;; J: ZWJ + (0x0A80 0x0AFF ?X) ; generic + (0x0A81 0x0A82 ?a) ; SIGN CANDRABINDU .. ANUSVARA + (0x0A83 ?A) ; SIGN VISARGA + (0x0A85 0x0A94 ?V) ; LETTER A .. AU + (0x0A95 0x0AB9 ?C) ; LETTER KA .. HA + (0x0AB0 ?R) ; LETTER RA + (0x0ABC ?n) ; SIGN NUKTA + (0x0ABE ?p) ; VOWEL SIGN AA + (0x0ABF ?m) ; VOWEL SIGN I + (0x0AC0 ?p) ; VOWEL SIGN II + (0x0AC1 0x0AC4 ?b) ; VOWEL SIGN UU .. VOCALIC RR + (0x0AC5 0x0AC8 ?u) ; VOWEL SIGN CANDRA E .. AI + (0x0AC9 0x0ACC ?p) ; VOWEL SIGN CANDRA O .. AU + (0x0ACD ?H) ; SIGN VIRAMA + (0x0AE0 0x0AE1 ?V) ; LETTER VOCALIC RR .. VOCALIC LL + (0x0AE2 0x0AE3 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (rphf ?r) + ) + +;; Stage 0 +;; Syllable identification +(generator + (0 + (cond + ;; Syllables with an independent vowel + ("(RH)?Vn?(J?HR)?m?u?b?p?n?a?A?" + < | (0 = *) | >) + + ;; Consonant-based syllables + ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|m?u?b?p?n?)a?A?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("(m)|(n|H|u|b|p|a|A|JHR)" + < | (1 =) 0x25CC (2 :otf=gjr2=blwf+) | >) + + ("." =)) + *)) + +;; Stage 1 +;; Basic shaping forms and matra reordering +(generator + (0 + (cond + ;; Explicit halant form starting with RA + H + ZWJ + (" (RHJ[CRnHJ]+)(HN?a?A?) " + | (1 :otf=gjr2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |) + + ;; Explicit halant form starting with a reph + (" (RH)([CRnHJ]+)(HN?a?A?) " + | (1 :otf=gjr2=rphf+) (2 :otf=gjr2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (3 = *) |) + + ;; Other explicit halant forms + (" ([CRnHJ]+)(HN?a?A?) " + | (1 :otf=gjr2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |) + + ;; Ordinary syllables starting with RA + H + ZWJ + ;; 1 2 3 + (" (RHJ[CRnHJ]*)(mn?)?(u?b?p?n?a?A?) " + ;; | + ;; This is an asterisk. (See DEV2-OTF.flt) + | (2 = *) (1 :otf=gjr2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (3 = *) |) + + ;; Ordinary syllables starting with a reph + ;; 1 2 3 4 + (" (RH)([CRnHJV]+)(mn?)?(u?b?p?n?a?A?) " + | (3 = *) (1 :otf=gjr2=rphf+) + (2 :otf=gjr2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (4 = *) |) + + ;; Other ordinary syllables + ;; 1 2 3 + (" ([CRnHJV]+)(mn?)?(u?b?p?n?a?A?) " + | (2 = *) (1 :otf=gjr2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) + (3 = *) |) + + ("." =)) + *)) + +;; Stage 2 +;; Final reordering #1 (Move pre-base matra after the last halant) +(generator + (0 + (cond + ;; 1 2 3 + (" (mn?)([^ ]+HJ?)([^H ]+) " + | (2 = *) (1 = *) (3 = *) |) + + ("." =)) + *)) + +;; Stage 3 +;; Final reordering #2 (Move reph after the first halant) +(generator + (0 + (cond + ;; Syllables with a reph and an explicit halant + ;; 1 2 3 4 + (" (mn?)?(r)([^H ]+HJ?)([^ ]*) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ;; A reph without explicit halant + ;; 1 2 3 4 + (" (mn?)?(r)([^aA ]+)(a?A?) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ("." =)) + *)) + +;; Stage 4 +;; Nukta for matra and presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=gjr2=nukt,pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 5 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 6 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=gjr2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/GUR2-OTF.flt b/FLT/GUR2-OTF.flt new file mode 100644 index 0000000..45eb9b3 --- /dev/null +++ b/FLT/GUR2-OTF.flt @@ -0,0 +1,169 @@ +;; GUR2-OTF.flt -- Font Layout Table for gur2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter gur2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=gur2))) + +;;;
  • GUR2-OTF.flt +;;; +;;; For gur2 OpenType fonts to draw the Gurmukhi script. + +(category + (0x0A00 0x0A7F ?X) ; generic + (0x0A00 ?Z) ; internal use + (0x0A01 0x0A02 ?a) ; SIGN ADAK BINDI .. BINDI + (0x0A03 ?A) ; SIGN VISARGA + (0x0A05 0x0A14 ?V) ; LETTER A .. AU + (0x0A15 0x0A38 ?C) ; LETTER KA .. SA + (0x0A3C ?n) ; SIGN NUKTA + (0x0A3E ?p) ; VOWEL SIGN AA + (0x0A3F ?m) ; VOWEL SIGN I + (0x0A40 ?p) ; VOWEL SIGN II + (0x0A41 0x0A42 ?b) ; VOWEL SIGN U .. UU + (0x0A47 0x0A4C ?u) ; VOWEL SIGN EE .. AU + (0x0A4D ?H) ; SIGN VIRAMA +;; (0x0A51 ?) ; SIGN UDAAT + (0x0A59 0x0A5E ?C) ; LETTER KHHA .. FA + (0x0A70 ?a) ; TIPPI + (0x0A71 ?d) ; ADDAK +;; (0x0A75 ?) ; SIGN YAKASH + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (pstf ?P) + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ((0x0A32 0x0A3C) 0x0A33) + ((0x0A38 0x0A3C) 0x0A36) + ((0x0A16 0x0A3C) 0x0A59) + ((0x0A17 0x0A3C) 0x0A5A) + ((0x0A1C 0x0A3C) 0x0A5B) + ((0x0A2B 0x0A3C) 0x0A5E) + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification +(generator + (0 + (cond + ;; Consonant-based syllables + ("(Cn?J?HJ?)*Cn?(H[NJ]?|m?u?b?p?n?)a?A?" + < | (0 = *) | >) + + ;; Syllables with an independent vowel + ("Vn?(J?HC)?m?u?b?p?n?a?A?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("(m)|(n|H|u|b|p|a|A|JHC)" + < (1 =) 0x25CC (2 :otf=gur2=blwf,pstf+) >) + + ("." =)) + *)) + +;; Stage 2 +;; Basic shaping forms and matra reordering +(generator + (0 + (cond + ;; Explicit halant forms + (" ([CnHJ]+)(HN?a?A?) " + (1 :otf?gur2=locl,nukt,akhn,blwf,pstf+) + | (1 shaping) (2 = *) |) + + ;; Ordinary syllables + ;; 1 2 3 4 5 6 + (" ([CnHJV]+)(mn?)?(un?)?(bn?)?(pn?)?(a?A?) " + (1 :otf?gur2=locl,nukt,akhn,blwf,pstf+) + | (2 = *) (1 shaping) (4 = *) (3 = *) (5 = *) (6 = *) |) + + ("." =)) + *) + + (shaping + (cond + ("([CnHJP]*[CV]n?)((J?PP)+)$" + (1 :otf=gur2=locl,nukt,akhn,blwf,cjct+) (2 :otf=gur2=pstf+)) + (".+" + (0 :otf=gur2=locl,nukt,akhn,blwf,cjct+)))) + ) + +;; Stage 3 +;; Final reordering (Move pre-base matra after the last halant) +(generator + (0 + (cond + ;; 1 2 3 + (" (mn?)([^ ]+HJ?)([^H ]+) " + | (2 = *) (1 = *) (3 = *) |) + + ("." =)) + *)) + +;; Stage 4 +;; Nukta for matra and presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=gur2=nukt,pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 5 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 6 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=gur2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/KND2-OTF.flt b/FLT/KND2-OTF.flt new file mode 100644 index 0000000..9ca19d9 --- /dev/null +++ b/FLT/KND2-OTF.flt @@ -0,0 +1,207 @@ +;; KND2-OTF.flt -- Font Layout Table for knd2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter knd2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=knd2))) + +;;;
  • KND2-OTF.flt +;;; +;;; For knd2 OpenType fonts to draw the Kannada script. + +;; It seems that tunga.ttf has problems w.r.t. reph and ZWJ. For +;; example, Uniscribe does not render RA + HAL + ZWJ + KA (0CB0 + 0CCD +;; + 200D + 0C95) as described in the page +;; . +;; Perhaps the font still uses the old specification that was defined +;; in Unicode 4.0. + +;; Glyphs are reordered in the following way to layout the Kannada script. +;; 1. base consonant +;; 2. matra set #1 (0CBE, 0CBF, 0CC1, 0CC6, 0CCC) +;; 3. vowel sign UU (0CC2) +;; 4. blwf consonants +;; 5. matra set #2 (0CC3, 0CC4, 0CD5, 0CD6) +;; 6. reph +;; 7. anusvara (0C82) and visarga (0C83) + +;; 0CE2 and 0CE3, which should be included in "matra set #1" above, +;; are not yet implemented. + +(category + ;; b: before subscript matras + ;; a: after subscript matras + (0x0C80 0x0CFF ?X) ; generic + (0x0C82 0x0C83 ?A) ; SIGN ANUSVARA .. VISARGA + (0x0C85 0x0C94 ?V) ; LETTER A .. LETTER AU + (0x0C95 0x0CB9 ?C) ; LETTER KA .. LETTER HA + (0x0CB0 ?R) ; LETTER RA + (0x0CBC ?n) ; SIGN NUKTA + (0x0CBE 0x0CBF ?b) ; VOWEL SIGN AA .. I + (0x0CC1 0x0CC2 ?b) ; VOWEL SIGN U .. UU + (0x0CC3 0x0CC4 ?a) ; VOWEL SIGN VOCALIC R .. VOCALIC RR + (0x0CC6 ?b) ; VOWEL SIGN E + (0x0CCC ?b) ; VOWEL SIGN AU + (0x0CCD ?H) ; SIGN VIRAMA + (0x0CD5 0x0CD6 ?a) ; LENGTH MARK .. AI LENGTH MARK + (0x0CDE ?C) ; LETTER FA (LLLA) + (0x0CE0 0x0CE1 ?V) ; LETTER VOCALIC RR .. VOCALIC LL + (0x0CE2 0x0CE3 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (blwf ?B) + (rphf ?r) + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ;; Decompose two-part and three-part vowel signs. + ((0x0CC0) + 0x0CBF 0x0CD5) + ((0x0CC7) + 0x0CC6 0x0CD5) + ((0x0CC8) + 0x0CC6 0x0CD6) + ((0x0CCA) + 0x0CC6 0x0CC2) + ((0x0CCB) + 0x0CC6 0x0CC2 0x0CD5) + + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification +(generator + (0 + (cond + ;; Syllables with an independent vowel + ("(RH)?Vn?(J?H[CR])?b?b?a?A?" + < | (0 = *) | >) + + ;; Consonant-based syllables + ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|b?b?a?n?)A?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("n|H|bb?a?|a|A|JH[CR]" + < 0x25CC (0 :otf=knd2=blwf+) >) + + ("." =)) + *)) + +;; Stage 2 +;; Basic shaping forms +(generator + (0 + (cond + ;; Syllables starting with RA + H + ZWJ + (" (RHJ[CRnHJ]*)((H[NJ]?|b?b?a?n?)A?) " + ;; | + ;; This is an asterisk. (See DEV2-OTF.flt) + | (1 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (2 = *) |) + + ;; Syllables starting with a reph + (" (RH)([CRnHJV]+)((H[NJ]?|b?b?n?a?n?)A?) " + | (1 :otf=knd2=rphf+) (2 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (3 = *) |) + + ;; Other syllables + (" ([CRnHJV]+)((H[NJ]?|b?b?n?a?n?)A?) " + | (1 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (2 = *) |) + + ("." =)) + *)) + +;; Stage 3 +;; Final reordering #1 (Move before-subscript matras) +(generator + (0 + (cond + (" ([^B ]*[^BJ])J?(B*)(bb?n?)([^ ]*) " + | (1 = *) (3 = *) (2 = *) (4 = *) |) + + ("." =)) + *)) + +;; Stage 4 +;; Final reordering #2 (Move reph after the first halant) +(generator + (0 + (cond + ;; Syllables with a reph and an explicit halant + ;; 1 2 3 + (" (r)([^H ]+HJ?)([^ ]*) " + | (2 = *) (1 =) (3 = *) |) + + ;; A reph without explicit halant + ;; 1 2 3 + (" (r)([^A ]+)(A)? " + | (2 = *) (1 =) (3 =) |) + + ("." =)) + *)) + +;; Stage 5 +;; Nukta for matra and presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=knd2=nukt,pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 6 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 7 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=knd2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/MLM2-OTF.flt b/FLT/MLM2-OTF.flt new file mode 100644 index 0000000..7743880 --- /dev/null +++ b/FLT/MLM2-OTF.flt @@ -0,0 +1,207 @@ +;; MLM2-OTF.flt -- Font Layout Table for mlm2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter mlm2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=mlm2))) + +;;;
  • MLM2-OTF.flt +;;; +;;; For mlm2 OpenType fonts to draw the Malayalam script. + +;; Observed behaviour of Uniscribe in combination with kartika.ttf: + +;; 1. Only the last RA can take the pref form. This last RA can come +;; a) just before blwf consonants +;; b) between blwf consonants and pstf consonants, or +;; c) after pstf consonants. + +;; 2. Multiple blwf forms are allowed anywhere in a syllable as long +;; as the context (the combination of the preceding consonant and the +;; blwf consonant) permits. + +;; 3. Multiple pstf forms are allowed as long as they are the last +;; consonants, optionally followed by a RA. + +;; About chillu letters: + +;; The sequence "consonant + VIRAMA + ZWJ" represents a chillu letter, +;; which makes an independent syllable. The only exception is "CHILLU +;; N + RRA" (0D7B 0D31) and its equivalent "NA + VIRAMA + ZWJ + RRA" +;; (0D28 0D4D 200D 0D31), which make a ligature. + +(category + (0x0D00 0x0D7F ?X) ; generic + (0x0D02 0x0D03 ?A) ; SIGN ANUSVARA .. VISARGA + (0x0D05 0x0D14 ?V) ; LETTER A .. AU + (0x0D15 0x0D39 ?C) ; LETTER KA .. HA + (0x0D3E 0x0D44 ?p) ; VOWEL SIGN AA .. VOCALIC RR + (0x0D46 0x0D48 ?m) ; VOWEL SIGN E .. AI + (0x0D4D ?H) ; SIGN VIRAMA + (0x0D57 ?p) ; AU LENGTH MARK + (0x0D60 0x0D61 ?V) ; LETTER VOCALIC RR .. VOCALIC LL + (0x0D62 0x0D63 ?b) ; VOWEL SIGN VOCALIC L .. LL + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (akhn ?C) + (blwf ?B) + (pstf ?P) + (pref ?R) + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ;; Decompose two-part vowel signs + ((0x0D4A) 0x0D46 0x0D3E) + ((0x0D4B) 0x0D47 0x0D3E) + ((0x0D4C) 0x0D46 0x0D57) + + ;; Replace CHILLU N + RRA with a pseudo-consonant + ((0x0D7B 0x0D31) :otf=mlm2=akhn+) + ((0x0D28 0x0D4D 0x200D 0x0D31) :otf=mlm2=akhn+) + + ;; Other chillu letters + ((0x0D23 0x0D4D 0x200D) 0x0D7A) + ((0x0D28 0x0D4D 0x200D) 0x0D7B) + ((0x0D30 0x0D4D 0x200D) 0x0D7C) + ((0x0D32 0x0D4D 0x200D) 0x0D7D) + ((0x0D33 0x0D4D 0x200D) 0x0D7E) + ((0x0D15 0x0D4D 0x200D) 0x0D7F) + + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification +(generator + (0 + (cond + ;; Consonant-based syllables + ("(CJ?HJ?)*C(H[NJ]?|m?b?p?)A?" + < | (0 = *) | >) + + ;; Syllables with an independent vowel + ("V(J?HC)?m?b?p?A?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("H|b|p|A|JHC" + < 0x25CC (0 :otf=mlm2=pref,blwf,pstf+) >) + + ;; Pre-base matra + ("(m)(p)?" + < (1 =) 0x25CC (2 =) >) + + ("." =)) + *)) + +;; Stage 2 +;; Basic shaping forms and matra reordering +(generator + (0 + :otf?mlm2=locl,akhn,pref,blwf,pstf+ + + (cond + ;; pref after pstf + ;; 1 23 4 5 6 7 + (" ([CRBPHJ]*[CRBV])((J?PP)*)J?(RR)(H[NJ]?)?(m)?(b?p?A?) " + | (6 =) (4 :otf=mlm2=pref+) (1 :otf=mlm2=locl,akhn,blwf,half,cjct+) + (2 :otf=mlm2=pstf+) (5 = *) (7 = *) |) + + ;; pref between blwf and pstf + ;; 1 2 34 5 6 7 + (" ([CRBPHJV]+)(RR)((J?PP)+)(H[NJ]?)?(m)?(b?p?A?) " + | (6 =) (2 :otf=mlm2=pref+) (1 :otf=mlm2=locl,akhn,blwf,half,cjct+) + (3 :otf=mlm2=pstf+) (5 = *) (7 = *) |) + + ;; pref before blwf + ;; 1 2 34 56 7 8 9 + (" ([CRBPHJV]+)(RR)((J?BB)+)((J?PP)*)(H[NJ]?)?(m)?(b?p?A?) " + | (8 =) (2 :otf=mlm2=pref+) (1 :otf=mlm2=locl,akhn,blwf,half,cjct+) + (3 :otf=mlm2=blwf+) (5 :otf=mlm2=pstf+) (7 = *) (9 = *) |) + + ;; no pref + ;; 1 23 4 5 6 + (" ([CRBPHJ]*[CRBV])((J?PP)*)(H[NJ]?)?(m)?(b?p?A?) " + | (5 =) (1 :otf=mlm2=locl,akhn,blwf,half,cjct+) (2 :otf=mlm2=pstf+) + (4 = *) (6 = *) |) + + ("." =)) + *)) + +;; Stage 3 +;; Final reordering (Move pre-base matra and pre-base RA after the last halant) +(generator + (0 + (cond + ;; 1 2 3 + (" (m?R?)([^ ]+H)([^H ]+) " + | (2 = *) (1 = *) (3 = *) |) + + ("." =)) + *)) + +;; Stage 4 +;; Presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=mlm2=pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 5 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 6 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=mlm2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/ORY2-OTF.flt b/FLT/ORY2-OTF.flt new file mode 100644 index 0000000..30cf52f --- /dev/null +++ b/FLT/ORY2-OTF.flt @@ -0,0 +1,234 @@ +;; ORY2-OTF.flt -- Font Layout Table for ory2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter ory2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=ory2))) + +;;;
  • ORY2-OTF.flt +;;; +;;; For ory2 OpenType fonts to draw the Oriya script. + +;; base blwf b u rphf a pstf p A + +(category + (0x0B00 0x0B7F ?X) ; generic + (0x0B01 ?a) ; SIGN CANDRABINDU + (0x0B02 0x0B03 ?A) ; SIGN ANUSVARA .. VISARGA + (0x0B05 0x0B14 ?V) ; LETTER A .. VOCALIC AU + (0x0B15 0x0B39 ?C) ; LETTER KA .. HA + (0x0B30 ?R) ; LETTER RA + (0x0B3C ?n) ; SIGN NUKTA + (0x0B3E ?p) ; VOWEL SIGN AA + (0x0B3F ?u) ; VOWEL SIGN I + (0x0B40 ?p) ; VOWEL SIGN II + (0x0B41 0x0B44 ?b) ; VOWEL SIGN U .. VOCALIC RR + (0x0B47 ?m) ; VOWEL SIGN E + (0x0B4D ?H) ; SIGN VIRAMA + (0x0B56 ?u) ; AI LENGTH MARK + (0x0B57 ?p) ; AU LENGTH MARK + (0x0B5C 0x0B5F ?C) ; LETTER RRA .. YYA + (0x0B60 0x0B61 ?V) ; LETTER VOCALIC RR .. LL + (0x0B62 0x0B63 ?b) ; VOWEL SIGN VOCALIC L .. LL + (0x0B71 ?C) ; LETTER WA + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (rphf ?r) + (pstf ?P) + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ;; Decompose two-part vowel signs. + ((0x0B48) + 0x0B47 0x0B56) + ((0x0B4B) + 0x0B47 0x0B3E) + ((0x0B4C) + 0x0B47 0x0B57) + + ;; Compose consonant and nukta. + ((0x0B21 0x0B3C) + 0x0B5C) + ((0x0B22 0x0B3C) + 0x0B5D) + + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification +(generator + (0 + (cond + ;; Syllables with an independent vowel + ("(RH)?Vn?(J?H[CR])?m?u?b?p?n?a?A?" + < | (0 = *) | >) + + ;; Consonant-based syllables + ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|m?u?b?p?n?)a?A?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("n|H|u|b|p|a|A|JH[CR]" + < 0x25CC (0 :otf=bng2=blwf,pstf+) >) + + ;; Pre-base matra + ("(m)([up])?" + < (1 =) 0x25CC (2 =) >) + + ("." =)) + *)) + +;; Stage 2 +;; Basic shaping forms and matra reordering +(generator + (0 + (cond + ;; Explicit halant form starting with RA + H + ZWJ + ;; 1 2 3 4 + (" (RHJ[CRnHJ]+)(H)N?(a)?(A)? " + (1 :otf?ory2=locl,nukt,akhn,blwf,pstf+) + | (1 b4post) (3 =) (1 post) (2 =) (4 =) |) + + ;; Explicit halant form starting with a reph + ;; 1 2 3 4 5 + (" (RH)([CRnHJ]+)(H)N?(a)?(A)? " + (2 :otf?ory2=locl,nukt,akhn,blwf,pstf+) + | (1 :otf=ory2=rphf+) (2 b4post) (4 =) (2 post) (3 =) (5 =) |) + + ;; Other explicit halant forms + ;; 1 2 3 4 + (" ([CRnHJ]+)(H)N?(a)?(A)? " + (1 :otf?ory2=locl,nukt,akhn,blwf,pstf+) + | (1 b4post) (3 =) (1 post) (2 =) (4 =) |) + + ;; Ordinary syllables starting with RA + H + ZWJ + ;; 1 2 3 4 5 6 + (" (RHJ[CRnHJ]*)(mn?)?(u?b?n?)(pn?)?(a)?(A)? " + (1 :otf?ory2=locl,nukt,akhn,blwf,pstf+) + | (2 = *) (1 b4post) (3 = *) (5 =) (1 post) (4 = *) (6 =) |) + + ;; Ordinary syllables starting with a reph + ;; 1 2 3 4 5 6 7 + (" (RH)([CRnHJV]+)(mn?)?(u?b?n?)(pn?)?(a)?(A)? " + (2 :otf?ory2=locl,nukt,akhn,blwf,pstf+) + | (3 = *) (1 :otf=ory2=rphf+) (2 b4post) (4 = *) (6 =) (2 post) + (5 = *) (7 =) |) + + ;; Other ordinary syllables + ;; 1 2 3 4 5 6 + (" ([CRnHJV]+)(mn?)?(u?b?n?)(pn?)?(a)?(A)? " + (1 :otf?ory2=locl,nukt,akhn,blwf,pstf+) + | (2 = *) (1 b4post) (3 = *) (5 =) (1 post) (4 = *) (6 =) |) + + ("." =)) + *) + + (b4post + (cond + ("([CRnHJP]*[CRV]n?)((J?PP)+)$" + (1 :otf=ory2=locl,nukt,akhn,blwf,cjct+)) + (".+" + (0 :otf=ory2=locl,nukt,akhn,blwf,cjct+)))) + + (post + (cond + ("[CRnHJP]*[CRV]n?((J?PP)+)$" + (1 :otf=ory2=pstf+)))) + ) + +;; Stage 3 +;; Final reordering #1 (Move pre-base matra after the last halant) +(generator + (0 + (cond + ;; 1 2 3 + (" (mn?)([^ ]+HJ?)([^H ]+) " + | (2 = *) (1 = *) (3 = *) |) + + ("." =)) + *)) + +;; Stage 4 +;; Final reordering #2 (Move reph after the first halant) +(generator + (0 + (cond + ;; Syllables with a reph and an explicit halant + ;; 1 2 3 4 + (" (mn?)?(r)([^HP ]+HJ?)([^ ]*) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ;; A reph without explicit halant + ;; 1 2 3 4 + (" (mn?)?(r)([^aPpA ]+)(a?P*H?p?n?A?) " + | (1 = *) (3 = *) (2 =) (4 = *) |) + + ("." =)) + *)) + +;; Stage 5 +;; Nukta for matra and presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=ory2=nukt,pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 6 +;; Remove ZWJ +(generator + (0 + (cond + ("J") + + ("." =)) + *)) + +;; Stage 7 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=ory2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/TEL2-OTF.flt b/FLT/TEL2-OTF.flt new file mode 100644 index 0000000..20b10b8 --- /dev/null +++ b/FLT/TEL2-OTF.flt @@ -0,0 +1,147 @@ +;; TEL2-OTF.flt -- Font Layout Table for tel2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter tel2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=tel2))) + +;;;
  • TEL2-OTF.flt +;;; +;;; For tel2 OpenType fonts to draw the Telugu script. + +;; gautami.ttf requires the following glyph order to layout the Telugu script. +;; 1. base consonant +;; 2. above matra (0C3E..0C42, 0C46, 0C47, 0C4A, 0C4C) +;; 3. below matra (0C56) +;; 4. blwf consonants +;; 5. post matra (0C43, 0C44) +;; 6. candrabindu (0C01), anusvara (0C02), visarga(0C03) + +;; 0C62 and 0C63, which should be below matras, are not yet implemented. + +(category + (0x0C00 0x0C7F ?X) ; generic + (0x0C01 0x0C03 ?A) ; SIGN CANDRABINDU .. VISARGA + (0x0C05 0x0C14 ?V) ; LETTER A .. AU + (0x0C15 0x0C39 ?C) ; LETTER KA .. HA + (0x0C3E 0x0C42 ?u) ; VOWEL SIGN AA .. II + (0x0C43 0x0C44 ?p) ; VOWEL SIGN U .. VOCALIC RR + (0x0C46 0x0C47 ?u) ; VOWEL SIGN E .. EE + (0x0C4A 0x0C4C ?u) ; VOWEL SIGN O .. AU + (0x0C4D ?H) ; SIGN VIRAMA + (0x0C55 ?u) ; LENGTH MARK + (0x0C56 ?b) ; AI LENGTH MARK + (0x0C58 0x0C59 ?C) ; LETTER TSA .. DZA + (0x0C60 0x0C61 ?V) ; LETTER VOCALIC RR .. VOCALIC LL + (0x0C62 0x0C63 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + + (blwf ?B) + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ;; Decompose two-part vowels. + ((0x0C48) + 0x0C46 0x0C56) + + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification and basic shaping forms +(generator + (0 + (cond + ;; Consonant-based syllables + ;;12 3 4 + ("((CJ?HJ?)*C)(H[NJ]?|u?b?p?)(A)?" + < | (1 :otf=tel2=locl,akhn,blwf,cjct+) (3 = *) (4 =) | >) + + ;; Syllables with an independent vowel + ;;1 2 3 + ("(V)(J?HC)?(u?b?p?A?)" + < | (1 =) (2 :otf=tel2=locl,blwf+) (3 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("H|ub?|b|p|A|JHC" + < 0x25CC (0 :otf=tel2=blwf+) >) + + ("." =)) + *)) + +;; Stage 2 +;; Move subscript glyphs +(generator + (0 + (cond + (" ([^B ]*[^BJ])J?(B*)(ub?|b)([^ ]*) " + | (1 = *) (3 = *) (2 = *) (4 = *) |) + + ("." =)) + *)) + +;; Stage 3 +;; Presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=tel2=pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 4 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 5 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=tel2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: diff --git a/FLT/TML2-OTF.flt b/FLT/TML2-OTF.flt new file mode 100644 index 0000000..e1c5e77 --- /dev/null +++ b/FLT/TML2-OTF.flt @@ -0,0 +1,157 @@ +;; TML2-OTF.flt -- Font Layout Table for tml2 OpenType fonts +;; Copyright (C) 2010 AIST (H15PRO112) +;; See the end for copying conditions. + +(font layouter tml2-otf nil + (version "1.6.0") + (font (nil nil unicode-bmp :otf=tml2))) + +;;;
  • TML2-OTF.flt +;;; +;;; For tml2 OpenType fonts to draw the Tamil script. + +(category + ;; X: generic + ;; a: ANUSVARA + ;; V: independent vowel + ;; C: consonant + ;; H: HALANT + ;; m: vowel sign (pre) + ;; p: vowel sign (others) + (0x0B80 0x0BFF ?X) ; generic + (0x0B82 ?a) ; SIGN ANUSVARA + (0x0B85 0x0B94 ?V) ; LETTER A .. AU + (0x0B95 0x0BB9 ?C) ; LETTER KA .. HA + (0x0BBE 0x0BC2 ?p) ; VOWEL SIGN AA .. I + (0x0BC6 0x0BC8 ?m) ; VOWEL SIGN E .. AI + (0x0BCD ?H) ; SIGN VIRAMA + (0x0BD7 ?p) ; AU LENGTH MARK + + (0x200C ?N) ; ZWNJ + (0x200D ?J) ; ZWJ + (0x25CC ?X) ; DOTTED CIRCLE + ) + +;; Stage 0 +;; Preprocessing +(generator + (0 + (cond + ;; Decompose two-part vowel signs. + ((0x0BCA) + 0x0BC6 0x0BBE) + ((0x0BCB) + 0x0BC7 0x0BBE) + ((0x0BCC) + 0x0BC6 0x0BD7) + + ;; A variation of AU. + ((0x0B92 0x0BD7) + 0x0B94) + + ;; The SHRII ligature and its old definition + ((0x0BB6 0x0BCD 0x0BB0 0x0BC0) + (0 :otf=tml2=locl,akhn,half,cjct,pres,abvs,blws,psts,haln,calt+)) + ((0x0BB8 0x0BCD 0x0BB0 0x0BC0) + (0 :otf=tml2=locl,akhn,half,cjct,pres,abvs,blws,psts,haln,calt+)) + + ("." =)) + *)) + +;; Stage 1 +;; Syllable identification and basic shaping froms +(generator + (0 + (cond + ;; Consonant-based syllables + ("(CJ?HJ?)*C(H[NJ]?|m?p?)a?" + < | (0 :otf=tml2=locl,akhn,half,cjct+) | >) + + ;; Syllables with an independent vowel + ("Vm?p?a?" + < | (0 = *) | >) + + ;; Combining marks are displayed with a DOTTED CIRCLE. + ("H|p|a" + < 0x25CC (0 =) >) + + ;; Pre-base matra + ("(m)(p)?" + < (1 =) 0x25CC (2 =) >) + + ("." =)) + *)) + +;; Stage 2 +;; Move pre-base matra after the last halant, or to the beginning +(generator + (0 + (cond + ;; 1 2 3 4 + (" ([^ ]+HJ?)([^H ]+)(m)([^ ]*) " + | (1 = *) (3 =) (2 = *) (4 = *) |) + + ;; 1 2 3 + (" ([^ ]+)(m)([^ ]*) " + | (2 =) (1 = *) (3 = *) |) + + ("." =)) + *)) + +;; Stage 3 +;; Presentation forms +(generator + (0 + (cond + (" ([^ ]+) " + | (1 :otf=tml2=pres,abvs,blws,psts,haln,calt+) |) + + ("." =)) + *)) + +;; Stage 4 +;; Remove ZWNJ/ZWJ +(generator + (0 + (cond + ("[NJ]") + + ("." =)) + *)) + +;; Stage 5 +;; GPOS processing +(generator + (0 + (cond + (" ([^ ]+) " + (1 :otf=tml2=+kern,dist,abvm,blwm)) + + ("." =)) + *)) + +;; Copyright (C) 2010 +;; 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: -- 1.7.10.4