Ok I’ve received your Glyphs file. I thought it best to write here so others can benefit if they’re having similar problems.
First of all, I’d put the glyphs in a logical order so we can see what we have. Currently different glyph alternates are not adjacent, and things of different kinds are scrambled together. With the glyphs you have, I’d put them in this order:
zero-thai
one-thai
two-thai
three-thai
four-thai
five-thai
six-thai
seven-thai
eight-thai
nine-thai
koKai-thai
khoKhai-thai
khoKhuat-thai
khoKhwai-thai
khoKhon-thai
khoRakhang-thai
ngoNgu-thai
choChan-thai
choChing-thai
choChang-thai
soSo-thai
choChoe-thai
yoYing-thai
yoYing-thai.less
doChada-thai
doChada-thai.short
toPatak-thai
toPatak-thai.short
thoThan-thai
thoThan-thai.less
thoNangmontho-thai
thoPhuthao-thai
noNen-thai
doDek-thai
toTao-thai
thoThung-thai
thoThahan-thai
thoThong-thai
noNu-thai
boBaimai-thai
poPla-thai
phoPhung-thai
foFa-thai
phoPhan-thai
foFan-thai
phoSamphao-thai
moMa-thai
yoYak-thai
roRua-thai
loLing-thai
woWaen-thai
soSala-thai
soRusi-thai
soSua-thai
hoHip-thai
loChula-thai
loChula-thai.short
oAng-thai
hoNokhuk-thai
ru-thai
lu-thai
ru_lakkhangyao-thai
lu_lakkhangyao-thai
saraAa-thai
saraAm-thai
lakkhangyao-thai
saraA-thai
saraE-thai
saraAe-thai
saraO-thai
saraAiMaimuan-thai
saraAiMaimalai-thai
maiHanaKat-thai
maiHanaKat-thai.narrow
saraI-thai
saraI-thai.narrow
saraIi-thai
saraIi-thai.narrow
saraUe-thai
saraUe-thai.narrow
saraUee-thai
saraUee-thai.narrow
saraU-thai
saraU-thai.small
saraUu-thai
saraUu-thai.small
phinthu-thai
phinthu-thai.small
maitaikhu-thai
maitaikhu-thai.small
maitaikhu-thai.narrow
yamakkan-thai
maiEk-thai
maiEk-thai.small
maiEk-thai.narrow
maiTho-thai
maiTho-thai.small
maiTho-thai.narrow
maiTri-thai
maiTri-thai.small
maiTri-thai.narrow
maiChattawa-thai
maiChattawa-thai.small
maiChattawa-thai.narrow
thanthakhat-thai
thanthakhat-thai.small
thanthakhat-thai.narrow
nikhahit-thai
nikhahit-thai.narrow
nikhahit_maiEk-thai
nikhahit_maiEk-thai.narrow
nikhahit_maiTho-thai
nikhahit_maiTho-thai.narrow
nikhahit_maiTri-thai
nikhahit_maiTri-thai.narrow
nikhahit_maiChattawa-thai
nikhahit_maiChattawa-thai.narrow
baht
angkhankhu-thai
fongman-thai
khomut-thai
maiyamok-thai
paiyannoi-thai
Once that’s done, I can see three glyphs which are redundant:
ru-thai.short
lu-thai.short
loChula-thai.less
The first two of those were mistakenly introduced to Glyphs a while ago, but they’re vowel letters so will never need short versions as they don’t take any marks ever. I’ve no idea why you have the third of these, as you already have loChula-thai.short. Note also doChada-thai.short and toPatak-thai.short should be different to doChada-thai and toPatak-thai: their descenders should be shorter to accommodate below marks. Similarly, SaraU-thai and SaraUu-thai should have .small versions that are actually smaller than the default versions, otherwise there’s no reason to include alternate glyphs. Also note your upstairs tone marks should be drawn smaller than the default forms (they’re operating on the vowel marks, which are quite a lot smaller than the consonants).
Next I notice you have Thai glyphs called glyph99, glyph100, glyph101, and then uniF701, uniF702 etc that I can see no purpose for. You do not need to use the Private Use Area for Thai. Delete all these glyphs (if you need to store alternate versions of outlines, use different Layers within a glyph, not new glyphs).
Next I’d clean up the features by splitting different kinds of operations into different lookups. I’d also put glyphs into classes so it’s cleaner and easier to see what’s happening in the lookups. While looking at features, I also notice you have the script thai; tag in all the lookups; this will mean the OT features will only work when the user declares the text’s language as Thai.
I notice is you have not only default and .small versions of marks, but also .narrow versions of most marks too. I personally never use .narrow versions, but as you have them, they should be substituted in above a consonant with an ascending stem, as these have less horizontal space above. I see you have some of these written in your lookup, but three of the .narrow glyphs are missing (maiEk-thai.narrow maiChattawa-thai.narrow nikhahit-thai.narrow
), so either add them or remove the glyphs if they’re not going to be used.
With that taken care of, you now need to fix what happens when tone marks appear on these narrow marks, so we’ll need to include the .narrow versions in the lookup that calls the upstairs tone marks.
We also have quite a number of glyphs that are ligatures of marks. I’ve never found these necessary, since we use mark-to-mark positioning. So I’m not sure why you have glyphs like nikhahit_maiEk-thai.small
and nikhahit_maiEk-thai.narrow
.
Finally, I notice most of your consonants do not have anchors. Every consonant should have a top
anchor and a bottom
anchor. Put bottom anchors at the base of the right hand stem at y=0, and top anchors at a consistent height e.g. y=500, again above the right hand stem, where you want the marks to align. Then, make sure that any abovemarks have _top
anchors (at the same height you chose for the top anchors on the consonants) and top
anchors higher up, for the upstairs tone marks to attach to (e.g. at y=650). Then the upstairs tone marks just need _top
anchors at y=650. Belowmarks should just have _bottom
anchors at y=0.
I’ll send the file back with the OT stuff fixed, and anchors in good positions for koKai-thai, saraI-thai and maiEk-thai so you can see the pattern to use for all the other marks.