diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-08-03 14:53:53 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-08-03 14:53:53 +0200 |
commit | 757aa0290bc1f866475e055fdf8a9c6df1124860 (patch) | |
tree | 3b8bc79a80e33900f3b3f82cd1f4e5e1936f1331 /tex/context/fonts/mkiv/color-latin.lfg | |
parent | cbaeded86ee193677fe0cae364b564616557449d (diff) | |
download | context-757aa0290bc1f866475e055fdf8a9c6df1124860.tar.gz |
2020-08-03 14:20:00
Diffstat (limited to 'tex/context/fonts/mkiv/color-latin.lfg')
-rw-r--r-- | tex/context/fonts/mkiv/color-latin.lfg | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tex/context/fonts/mkiv/color-latin.lfg b/tex/context/fonts/mkiv/color-latin.lfg new file mode 100644 index 000000000..c7d24cc1d --- /dev/null +++ b/tex/context/fonts/mkiv/color-latin.lfg @@ -0,0 +1,49 @@ +-- If needed we can add names glyphs (maybe some wildcard mapping) ... not that fast +-- but for a specific font one can always make a dedicated file. + +local type = type +local imerged = table.imerged + +local shapes = { } +local default = { } +local upper = { } +local lower = { } + +for k, v in next, characters.data do + local sh = v.shcode + if sh and type(sh) == "number" then + local tsh = shapes[sh] + if tsh then + tsh[#tsh+1] = k + else + shapes[sh] = { sh, k } + end + end +end + +for i=1,26 do + local l = shapes[65 + i - 1] or { } + local u = shapes[97 + i - 1] or { } + upper[i] = u + lower[i] = l + default[i] = imerged(l, u) +end + +-- default = { +-- [1] = { codepoint, ..., glyph_name, ... }, +-- [2] = { codepoint, ..., glyph_name, ... }, +-- ... +-- } + +return { + name = "color-latin", + version = "1.00", + comment = "Side effect of mails from Marcus Vinicius Mesquita to the list.", + author = "Hans Hagen", + copyright = "ConTeXt development team", + colorschemes = { + default = default, + upper = upper, + lower = lower, + } +} |