summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-font-ota.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-08-29 08:24:21 +0200
committerGitHub <noreply@github.com>2016-08-29 08:24:21 +0200
commit692704c12ac6f952080aad16df123400a0c82c0e (patch)
tree96fe4de504dcc6f2472adab2abf8a259aa844b4b /src/fontloader/misc/fontloader-font-ota.lua
parenta25067d7f3095cc3a3a28994e48ba1e02bdd3045 (diff)
parent50476780411fb84f1f4d0dcb7cd865c1eba4141b (diff)
downloadluaotfload-692704c12ac6f952080aad16df123400a0c82c0e.tar.gz
Merge pull request #378 from phi-gamma/master
[fontloader] sync with Context as of 2016-08-29
Diffstat (limited to 'src/fontloader/misc/fontloader-font-ota.lua')
-rw-r--r--src/fontloader/misc/fontloader-font-ota.lua54
1 files changed, 31 insertions, 23 deletions
diff --git a/src/fontloader/misc/fontloader-font-ota.lua b/src/fontloader/misc/fontloader-font-ota.lua
index 4ddb831..b8944e0 100644
--- a/src/fontloader/misc/fontloader-font-ota.lua
+++ b/src/fontloader/misc/fontloader-font-ota.lua
@@ -262,36 +262,44 @@ local classifiers = characters.classifiers
if not classifiers then
- local first_arabic, last_arabic = characters.blockrange("arabic")
- local first_syriac, last_syriac = characters.blockrange("syriac")
- local first_mandiac, last_mandiac = characters.blockrange("mandiac")
- local first_nko, last_nko = characters.blockrange("nko")
+ local f_arabic, l_arabic = characters.blockrange("arabic")
+ local f_syriac, l_syriac = characters.blockrange("syriac")
+ local f_mandiac, l_mandiac = characters.blockrange("mandiac")
+ local f_nko, l_nko = characters.blockrange("nko")
+ local f_ext_a, l_ext_a = characters.blockrange("arabicextendeda")
classifiers = table.setmetatableindex(function(t,k)
- local c = chardata[k]
- local v = false
- if c then
- local arabic = c.arabic
- if arabic then
- v = mappers[arabic]
- if not v then
- log.report("analyze","error in mapping arabic %C",k)
- -- error
- v = false
- end
- elseif k >= first_arabic and k <= last_arabic or k >= first_syriac and k <= last_syriac or
- k >= first_mandiac and k <= last_mandiac or k >= first_nko and k <= last_nko then
- if categories[k] == "mn" then
- v = s_mark
- else
- v = s_rest
+ if type(k) == "number" then
+ local c = chardata[k]
+ local v = false
+ if c then
+ local arabic = c.arabic
+ if arabic then
+ v = mappers[arabic]
+ if not v then
+ log.report("analyze","error in mapping arabic %C",k)
+ -- error
+ v = false
+ end
+ elseif (k >= f_arabic and k <= l_arabic) or
+ (k >= f_syriac and k <= l_syriac) or
+ (k >= f_mandiac and k <= l_mandiac) or
+ (k >= f_nko and k <= l_nko) or
+ (k >= f_ext_a and k <= l_ext_a) then
+ if categories[k] == "mn" then
+ v = s_mark
+ else
+ v = s_rest
+ end
end
end
+ t[k] = v
+ return v
end
- t[k] = v
- return v
end)
+ characters.classifiers = classifiers
+
end
function methods.arab(head,font,attr)