diff options
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4182 -> 4179 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/font-mis.lua | 2 | ||||
-rw-r--r-- | tex/context/base/font-otf.lua | 2 | ||||
-rw-r--r-- | tex/context/base/page-mak.mkvi | 2 | ||||
-rw-r--r-- | tex/context/base/s-fonts-tables.lua | 46 | ||||
-rw-r--r-- | tex/context/base/s-fonts-tables.mkiv | 11 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24520 -> 24518 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 251248 -> 251247 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-basics.tex | 70 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 4 |
12 files changed, 127 insertions, 14 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index f69746bbf..053498fe3 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2015.05.23 10:13} +\newcontextversion{2015.05.24 12:42} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 937011004..9395648bd 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index caca52426..4fe6a2ae2 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.05.23 10:13} +\edef\contextversion{2015.05.24 12:42} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/font-mis.lua b/tex/context/base/font-mis.lua index 7cdd346c2..30b0303e1 100644 --- a/tex/context/base/font-mis.lua +++ b/tex/context/base/font-mis.lua @@ -22,7 +22,7 @@ local handlers = fonts.handlers handlers.otf = handlers.otf or { } local otf = handlers.otf -otf.version = otf.version or 2.811 +otf.version = otf.version or 2.812 otf.cache = otf.cache or containers.define("fonts", "otf", otf.version, true) local fontloader = fontloader diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua index a91937039..e7a97c66d 100644 --- a/tex/context/base/font-otf.lua +++ b/tex/context/base/font-otf.lua @@ -54,7 +54,7 @@ local otf = fonts.handlers.otf otf.glists = { "gsub", "gpos" } -otf.version = 2.811 -- beware: also sync font-mis.lua +otf.version = 2.812 -- beware: also sync font-mis.lua otf.cache = containers.define("fonts", "otf", otf.version, true) local hashes = fonts.hashes diff --git a/tex/context/base/page-mak.mkvi b/tex/context/base/page-mak.mkvi index ee144f20a..3c90c2423 100644 --- a/tex/context/base/page-mak.mkvi +++ b/tex/context/base/page-mak.mkvi @@ -35,7 +35,7 @@ %D \showsetup{startmakeup} %D New is that we have a layout with the same name so one can set -%D up a special layout tthat then gets used. +%D up a special layout that then gets used. \installcorenamespace{makeup} \installcorenamespace{makeupdoublesided} diff --git a/tex/context/base/s-fonts-tables.lua b/tex/context/base/s-fonts-tables.lua index b3dac7d06..c32f4628c 100644 --- a/tex/context/base/s-fonts-tables.lua +++ b/tex/context/base/s-fonts-tables.lua @@ -15,7 +15,9 @@ local sortedkeys = table.sortedkeys local format = string.format local concat = table.concat -local tabletracers = moduledata.fonts.tables +local tabletracers = moduledata.fonts.tables + +local context = context local digits = { dflt = { @@ -184,7 +186,7 @@ function tabletracers.showparameters(nesting) end function tabletracers.showpositionings() - local tfmdata = fonts.hashes.identifiers[font.current()] + local tfmdata = fonts.hashes.resources[font.current()] local resources = tfmdata.resources if resources then local features = resources.features @@ -290,6 +292,42 @@ function tabletracers.showsubstitutions() end end +function tabletracers.showunicodevariants() + + local variants = fonts.hashes.variants[true] + + if variants then + context.starttabulate { "|c|c|c|c|c|c|c|" } + for selector, unicodes in sortedhash(variants) do + local done = false + for unicode, variant in sortedhash(unicodes) do + context.NC() + if not done then + context("%U",selector) + done = true + end + context.NC() + context("%U",unicode) + context.NC() + context("%c",unicode) + context.NC() + context("%U",variant) + context.NC() + context("%c",variant) + context.NC() + context("%c%c",unicode,selector) + context.NC() + context.startoverlay() + context("{\\color[trace:r]{%c}}{\\color[trace:ds]{%c}}",unicode,variant) + context.stopoverlay() + context.NC() + context.NR() + end + end + context.stoptabulate() + end + +end function tabletracers.showall(specification) -- not interfaced specification = interfaces.checkedspecification(specification) @@ -314,6 +352,10 @@ function tabletracers.showall(specification) -- not interfaced tabletracers.showsubstitutions() context.stopsubject() + context.startsubject { title = "Unicode variants" } + tabletracers.showunicodevariants() + context.stopsubject() + if title then context.stoptitle() end diff --git a/tex/context/base/s-fonts-tables.mkiv b/tex/context/base/s-fonts-tables.mkiv index e962f952d..64fe76f0e 100644 --- a/tex/context/base/s-fonts-tables.mkiv +++ b/tex/context/base/s-fonts-tables.mkiv @@ -17,11 +17,12 @@ \registerctxluafile{s-fonts-tables}{} -\installmodulecommandluasingle \showfonttables {moduledata.fonts.tables.showall} -\installmodulecommandluasingle \showfontproperties {moduledata.fonts.tables.showproperties} -\installmodulecommandluasingle \showfontparameters {moduledata.fonts.tables.showparameters} -\installmodulecommandluasingle \showfontpositionings {moduledata.fonts.tables.showpositionings} -\installmodulecommandluasingle \showfontsubstitutions {moduledata.fonts.tables.showsubstitutions} +\installmodulecommandluasingle \showfonttables {moduledata.fonts.tables.showall} +\installmodulecommandluasingle \showfontproperties {moduledata.fonts.tables.showproperties} +\installmodulecommandluasingle \showfontparameters {moduledata.fonts.tables.showparameters} +\installmodulecommandluasingle \showfontpositionings {moduledata.fonts.tables.showpositionings} +\installmodulecommandluasingle \showfontsubstitutions {moduledata.fonts.tables.showsubstitutions} +\installmodulecommandluasingle \showfontunicodevariants{moduledata.fonts.tables.showunicodevariants} \stopmodule diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex be1ed8785..c0f05bcaa 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 4465dd0a7..77e4c6167 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex/luatex-basics.tex b/tex/generic/context/luatex/luatex-basics.tex index abe498970..1180c68e6 100644 --- a/tex/generic/context/luatex/luatex-basics.tex +++ b/tex/generic/context/luatex/luatex-basics.tex @@ -20,4 +20,74 @@ {\global\advance\lastallocatedattribute 1 \attributedef#1\lastallocatedattribute} +% maybe we will have luatex-basics.lua some day for instance when more +% (pdf) primitives have moved to macros) + +\directlua { + + gadgets = gadgets or { } % reserved namespace + + gadgets.functions = { } + local registered = {} + + function gadgets.functions.reverve() + local numb = newtoken.scan_int() + local name = newtoken.scan_string() + local okay = string.gsub(name,"[\string\\ ]","") + registered[okay] = numb + texio.write_nl("reserving lua function '"..okay.."' with number "..numb) + end + + function gadgets.functions.register(name,f) + local okay = string.gsub(name,"[\string\\ ]","") + local numb = registered[okay] + if numb then + texio.write_nl("registering lua function '"..okay.."' with number "..numb) + lua.get_functions_table()[numb] = f + else + texio.write_nl("lua function '"..okay.."' is not reserved") + end + end + +} + +\newcount\lastallocatedluafunction + +\def\newluafunction#1% + {\ifdefined#1\else + \global\advance\lastallocatedluafunction 1 + \global\chardef#1\lastallocatedluafunction + \directlua{gadgets.functions.reserve()}#1{\detokenize{#1}}% + \fi} + +% an example of usage (if we ever support it it will go to the plain gadgets module): +% +% \directlua { +% +% local cct = nil +% local chr = nil +% +% gadgets.functions.register("UcharcatLuaOne",function() +% chr = newtoken.scan_int() +% cct = tex.getcatcode(chr) +% tex.setcatcode(chr,newtoken.scan_int()) +% tex.sprint(unicode.utf8.char(chr)) +% end) +% +% gadgets.functions.register("UcharcatLuaTwo",function() +% tex.setcatcode(chr,cct) +% end) +% +% } +% +% \def\Ucharcat +% {\expandafter\expandafter\expandafter\luafunction +% \expandafter\expandafter\expandafter\UcharcatLuaTwo +% \luafunction\UcharcatLuaOne} +% +% A:\the\catcode65:\Ucharcat 65 11:A:\the\catcode65\par +% A:\the\catcode65:\Ucharcat 65 5:A:\the\catcode65\par +% A:\the\catcode65:\Ucharcat 65 11:A:\the\catcode65\par + + \endinput diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index fe61b3dcb..d8095a285 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/23/15 10:13:59 +-- merge date : 05/24/15 12:42:55 do -- begin closure to overcome local limits and interference @@ -7176,7 +7176,7 @@ local report_otf=logs.reporter("fonts","otf loading") local fonts=fonts local otf=fonts.handlers.otf otf.glists={ "gsub","gpos" } -otf.version=2.811 +otf.version=2.812 otf.cache=containers.define("fonts","otf",otf.version,true) local hashes=fonts.hashes local definers=fonts.definers |