diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
commit | f210bce174e1f2f05305ab03e88e120a1cbfc4da (patch) | |
tree | 5c4e2ad096b5c745e859516ac3196fa0864292d5 /Master/texmf-dist/scripts/context/lua/mtx-unicode.lua | |
parent | 35fd641a3546acc0c62e0aa7f134888e36da30d4 (diff) |
context (from cont-tmf.zip of Feb 17 16:00, size 116339406)
git-svn-id: svn://tug.org/texlive/trunk@54086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/context/lua/mtx-unicode.lua')
-rw-r--r-- | Master/texmf-dist/scripts/context/lua/mtx-unicode.lua | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua b/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua index fd65766462d..297807889e4 100644 --- a/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua +++ b/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua @@ -57,11 +57,11 @@ if not modules then modules = { } end modules ['mtx-unicode'] = { -- curl -o unicodedata.txt http://www.unicode.org/Public/UNIDATA/UnicodeData.txt -- curl -o unihan.zip http://www.unicode.org/Public/UNIDATA/Unihan.zip -- --- curl -o emoji-data.txt http://unicode.org/Public/emoji/11.0/emoji-data.txt --- curl -o emoji-sequences.txt http://unicode.org/Public/emoji/11.0/emoji-sequences.txt --- curl -o emoji-variation-sequences.txt http://unicode.org/Public/emoji/11.0/emoji-variation-sequences.txt --- curl -o emoji-zwj-sequences.txt http://unicode.org/Public/emoji/11.0/emoji-zwj-sequences.txt --- curl -o emoji-test.txt http://unicode.org/Public/emoji/11.0/emoji-test.txt +-- curl -o emoji-data.txt http://unicode.org/Public/emoji/12.0/emoji-data.txt +-- curl -o emoji-sequences.txt http://unicode.org/Public/emoji/12.0/emoji-sequences.txt +-- curl -o emoji-variation-sequences.txt http://unicode.org/Public/emoji/12.0/emoji-variation-sequences.txt +-- curl -o emoji-zwj-sequences.txt http://unicode.org/Public/emoji/12.0/emoji-zwj-sequences.txt +-- curl -o emoji-test.txt http://unicode.org/Public/emoji/12.0/emoji-test.txt -- -- todo: -- @@ -526,10 +526,21 @@ function scripts.unicode.load() end end +-- local variants_emoji={ +-- [0xFE0E]="text style", +-- [0xFE0F]="emoji style", +-- } +-- +-- local variants_forms={ +-- [0xFE00]="corner-justified form", +-- [0xFE01]="centered form", +-- } + function scripts.unicode.save(filename) if preamble then local data = table.serialize(characters.data,"characters.data", { hexify = true, noquotes = true }) data = gsub(data,"%{%s+%[0xFE0E%]=\"text style\",%s+%[0xFE0F%]=\"emoji style\",%s+%}","variants_emoji") + data = gsub(data,"%{%s+%[0xFE00%]=\"corner%-justified form\",%s+%[0xFE01%]=\"centered form\",%s+%}","variants_forms") io.savedata(filename,preamble .. data) end end @@ -688,9 +699,12 @@ do local hash = { } + local crap = lpeg.P("e") * lpeg.R("09","..","09")^1 * lpeg.P(" ")^1 + local replace = lpeg.replacer { - ["#"] = "hash", - ["*"] = "asterisk" + [crap] = "", + ["#"] = "hash", + ["*"] = "asterisk", } for i=1,#t do @@ -722,8 +736,10 @@ else scripts.unicode.extras() scripts.unicode.save("char-def-new.lua") scripts.unicode.emoji("char-emj-new.lua") + report("saved file %a","char-def-new.lua") + report("saved file %a (current 12.0, check for updates, see above!)","char-emj-new.lua") else report("nothing to do") end - report("stop working on %a, output char-def-new.lua\n",lfs.currentdir()) + report("stop working on %a\n",lfs.currentdir()) end |