From 757aa0290bc1f866475e055fdf8a9c6df1124860 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 3 Aug 2020 14:53:53 +0200 Subject: 2020-08-03 14:20:00 --- tex/context/fonts/mkiv/color-latin.lfg | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tex/context/fonts/mkiv/color-latin.lfg (limited to 'tex/context/fonts/mkiv') 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, + } +} -- cgit v1.2.3