/usr/share/m17n/KHMR-OTF.flt is in m17n-db 1.6.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | ;; KHMR-OTF.flt -- Font Layout Table for Khmer OpenType fonts
;; Copyright (C) 2005, 2007 AIST (H15PRO112)
;; See the end for copying conditions.
(font layouter khmr-otf nil
(font (nil nil unicode-bmp :otf=khmr=pres)))
;;; <li> KHMR-OTF.flt
;;;
;;; For Khmer OpenType fonts to draw Khmer.
;;; A Font is available from
;;; <http://www.khmeros.info/drupal/?q=en/download/fonts>.
(category
(0x1780 0x17FF ?E) ; E: else
(0x19E0 0x19FF ?E)
(0x1780 0x17B3 ?C) ; C: consonant & independent vowel
(0x179A ?R) ; R: RO
(0x17B6 ?p) ; p: vowel sign (post)
(0x17B7 0x17BA ?a) ; a: vowel sign (above)
(0x17BB 0x17BD ?b) ; b: vowel sign (below)
(0x17BE ?A) ; A: vowel sign (two-part, above)
(0x17BF 0x17C0 ?P) ; P: vowel sign (two-part, post)
(0x17C1 0x17C3 ?m) ; m: vowel sign (pre)
(0x17C4 0x17C5 ?P)
(0x17C6 ?s) ; s: sign (above)
(0x17C7 0x17C8 ?S) ; S: sign (post)
(0x17C9 0x17CA ?c) ; c: consonant shifter
(0x17CB 0x17D1 ?s)
(0x17CC ?r) ; r: ROBAT
(0x17D2 ?H) ; H: COENG
(0x17D3 ?s)
(0x17DD ?s)
(0x200C ?N) ; N: ZERO WIDTH NON-JOINER
(0x200D ?J) ; J: ZERO WIDTH JOINER
)
;; Generic syllable pattern is as follows.
;; [CR](r|N?c)?(HCr?)*(HR)?(HCr?)*[NJ]?(m|b|a|A|p|P)?s*S?(H[CR])?
;; Step 0.
;; Move m to the beginning.
;; Split A and P.
;; Exchange the order of pP and s.
;; Move HR before the base.
(generator
(0
(cond
;; pre vowel sign
;;1 2 3 4 5 67 8 9 10
("([CR](r|N?c)?(HCr?)*)(HR(r)?)?((HCr?)*[NJ]?)(m)(s*S?(H[CR])?)"
< | (8 =) (4 = =) (1 = *) (5 =) (6 = *) (9 = *) | > )
;; two-part above vowel sign
;;1 2 3 4 5 67 8
("([CR](r|N?c)?(HCr?)*)(HR(r)?)?((HCr?)*[NJ]?As*S?(H[CR])?)"
< | 0x17C1 (4 = =) (1 = *) (5 =) (6 = *) | > )
;; post vowel sign
;;1 2 3 4 5 67 8 9 10 11
("([CR](r|N?c)?(HCr?)*)(HR(r)?)?((HCr?)*[NJ]?)(p)(s*)(S?(H[CR])?)"
< | (4 = =) (1 = *) (5 =) (6 = *) (9 = *) (8 =) (10 = *) | > )
;; two-part post vowel sign
;;1 2 3 4 5 67 8 9 10 11
("([CR](r|N?c)?(HCr?)*)(HR(r)?)?((HCr?)*[NJ]?)(P)(s*)(S?(H[CR])?)"
< | 0x17C1 (4 = =) (1 = *) (5 =) (6 = *) (9 = *) (8 =) (10 = *) | > )
;; other vowel signs or no vowel sign
;;1 2 3 4 5 67 8
("([CR](r|N?c)?(HCr?)*)(HR(r)?)?((HCr?)*[NJ]?[b|a]?s*S?(H[CR])?)"
< | (4 = =) (1 = *) (5 =) (6 = *) | > )
("." =))
*))
;; Now a syllable looks like below.
;; m?(HR)?[CR](r|N?c)?(HCr?)*[NJ]?(b|a|A)?s*(p|P)?S?(H[CR])?
;; Step 1.
;; Set the form of consonant shifter.
(generator
(0
(cond
;; shifter + above vowel sign without ZWNJ
;; Shifter take blwf. HR takes pref. HC's take blwf or pstf.
;; 1 2 3 4 5 6 7 8
(" (m)?(HR)?([CR]c(HCr?)*(N|J)?(a|A))(s*S?)(H[CR])? "
|
(1 =)
(2 otf:khmr=pref+)
(3 otf:khmr=blwf,abvf,pstf+)
(7 = *)
(8 otf:khmr=blwf,pstf+)
| )
;; shifter + ZWNJ + above vowel sign, or, shifter without above vowel sign
;; Shifter stays above. HR takes pref. HC's take blwf or pstf.
;; 1 2 3 45 6 7 8 9 10 11
(" (m)?(HR)?([CR]N?c)((HCr?)*)([NJ]?[ba]?)(A)?(s*p?)(P)?(S)?(H[CR])? "
|
(1 =)
(2 otf:khmr=pref+)
(3 = *)
(4 otf:khmr=blwf,pstf+)
(6 = *)
(7 otf:khmr=abvf+)
(8 = *)
(9 otf:khmr=pstf+)
(10 =)
(11 otf:khmr=blwf,pstf+)
| )
;; no shifter
;; 1 2 3 45 6 7 8 9 10 11
(" (m)?(HR)?([CR]r?)((HCr?)*)([NJ]?[ba]?)(A)?(s*p?)(P)?(S)?(H[CR])? "
|
(1 =)
(2 otf:khmr=pref+)
(3 = *)
(4 otf:khmr=blwf,pstf+)
(6 = *)
(7 otf:khmr=abvf+)
(8 = *)
(9 otf:khmr=pstf+)
(10 =)
(11 otf:khmr=blwf,pstf+)
| )
("." =))
*))
;; Now a syllable looks like below. ~ characters are OTF feature applied.
;; m?(HR)?[CR](r|c)?(HCr?)*[NJ]?(b|a|A)?s*(p|P)?S?(H[CR])?
;; ~~ ~~ ~ ~~~~ ~ ~ ~~~~~
;; Step 2.
;; Concatenate adjacent Khmer syllables.
;; Remove J. Retain N to prevent ligature.
(generator
(0
(cond
(" ")
("J")
("." =))
*))
;; Step 3.
;; Apply other OTF features.
(generator
(0
(cond
(" ([^ ]*) "
(1 otf:khmr=pres,blws,abvs,psts,clig))
("."
[ = ]))
*))
;; Step 4.
;; Remove N to clean up.
(generator
(0
(cond
("N")
("." =))
*))
;; Copyright (C) 2005, 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:
|