summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-10-17 15:43:08 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-10-17 15:43:08 +0200
commite5f189d9965a70c8f3043c07c7b07d41ef268e93 (patch)
treeea192c431e2762fbae01fdd44cb3a48278b06fc0 /tex/context/modules/mkiv
parent9f36318b0e571bcbc93dc2112d01bbf2178ed020 (diff)
downloadcontext-e5f189d9965a70c8f3043c07c7b07d41ef268e93.tar.gz
2018-10-17 15:14:00
Diffstat (limited to 'tex/context/modules/mkiv')
-rw-r--r--tex/context/modules/mkiv/m-format.mkiv4
-rw-r--r--tex/context/modules/mkiv/s-fonts-charts.mkiv65
-rw-r--r--tex/context/modules/mkiv/s-fonts-complete.mkiv119
-rw-r--r--tex/context/modules/mkiv/s-fonts-system.lua87
-rw-r--r--tex/context/modules/mkiv/s-fonts-system.mkiv12
-rw-r--r--tex/context/modules/mkiv/s-maps.mkiv8
6 files changed, 225 insertions, 70 deletions
diff --git a/tex/context/modules/mkiv/m-format.mkiv b/tex/context/modules/mkiv/m-format.mkiv
index f9dd348a4..3a0a5bebd 100644
--- a/tex/context/modules/mkiv/m-format.mkiv
+++ b/tex/context/modules/mkiv/m-format.mkiv
@@ -217,7 +217,7 @@
\doglobal\newcounter\formatlinesubcounter
\reshapebox
{\doglobal\increment\formatlinesubcounter}
- \global\let\formatlinemaxcounter\formatlinesubcounter
+ \glet\formatlinemaxcounter\formatlinesubcounter
\reshapebox
{\doglobal\decrement\formatlinesubcounter
\ifnum\formatlinesubcounter=\zerocount
@@ -303,7 +303,7 @@
\doglobal\newcounter\formatlinesubcounter
\reshapebox
{\doglobal\increment\formatlinesubcounter}%
- \global\let\formatlinemaxcounter\formatlinesubcounter
+ \glet\formatlinemaxcounter\formatlinesubcounter
\reshapebox
{\doglobal\decrement\formatlinesubcounter
\ifnum\formatlinesubcounter=\zerocount
diff --git a/tex/context/modules/mkiv/s-fonts-charts.mkiv b/tex/context/modules/mkiv/s-fonts-charts.mkiv
index 50cd589e4..d8d0975de 100644
--- a/tex/context/modules/mkiv/s-fonts-charts.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-charts.mkiv
@@ -169,36 +169,39 @@
\starttext
- \showfontchart[filename=LucidaBrightOT.otf,page=yes]
- \showfontchart[filename=LucidaBrightOT-Demi.otf,page=yes]
- \showfontchart[filename=LucidaBrightOT-DemiItalic.otf,page=yes]
- \showfontchart[filename=LucidaBrightOT-Italic.otf,page=yes]
-
- \showfontchart[filename=LucidaSansOT.otf,page=yes]
- \showfontchart[filename=LucidaSansOT-Demi.otf,page=yes]
- \showfontchart[filename=LucidaSansOT-DemiItalic.otf,page=yes]
- \showfontchart[filename=LucidaSansOT-Italic.otf,page=yes]
-
- \showfontchart[filename=LucidaSansTypewriterOT.otf,page=yes]
- \showfontchart[filename=LucidaSansTypewriterOT-Bold.otf,page=yes]
- \showfontchart[filename=LucidaSansTypewriterOT-BoldOblique.otf,page=yes]
- \showfontchart[filename=LucidaSansTypewriterOT-Oblique.otf,page=yes]
-
- \showfontchart[filename=LucidaConsoleDK.otf,page=yes]
- \showfontchart[filename=LucidaConsoleDK-Bold.otf,page=yes]
- \showfontchart[filename=LucidaConsoleDK-BoldItalic.otf,page=yes]
- \showfontchart[filename=LucidaConsoleDK-Italic.otf,page=yes]
-
- \showfontchart[filename=LucidaGrandeMonoDK.otf,page=yes]
- \showfontchart[filename=LucidaGrandeMonoDK-Bold.otf,page=yes]
- \showfontchart[filename=LucidaGrandeMonoDK-BoldItalic.otf,page=yes]
- \showfontchart[filename=LucidaGrandeMonoDK-Italic.otf,page=yes]
-
- \showfontchart[filename=LucidaBrightMathOT.otf,page=yes]
- \showfontchart[filename=LucidaBrightMathOT-Demi.otf,page=yes]
-
- \showfontchart[filename=LucidaBlackletterOT.otf,page=yes]
- \showfontchart[filename=LucidaCalligraphyOT.otf,page=yes]
- \showfontchart[filename=LucidaHandwritingOT.otf,page=yes]
+% \showfontchart[filename=veramono.ttf,page=yes]
+ \showfontchart[filename=CoelacanthSubhdHeavy.otf,page=yes]
+
+% \showfontchart[filename=LucidaBrightOT.otf,page=yes]
+% \showfontchart[filename=LucidaBrightOT-Demi.otf,page=yes]
+% \showfontchart[filename=LucidaBrightOT-DemiItalic.otf,page=yes]
+% \showfontchart[filename=LucidaBrightOT-Italic.otf,page=yes]
+
+% \showfontchart[filename=LucidaSansOT.otf,page=yes]
+% \showfontchart[filename=LucidaSansOT-Demi.otf,page=yes]
+% \showfontchart[filename=LucidaSansOT-DemiItalic.otf,page=yes]
+% \showfontchart[filename=LucidaSansOT-Italic.otf,page=yes]
+
+% \showfontchart[filename=LucidaSansTypewriterOT.otf,page=yes]
+% \showfontchart[filename=LucidaSansTypewriterOT-Bold.otf,page=yes]
+% \showfontchart[filename=LucidaSansTypewriterOT-BoldOblique.otf,page=yes]
+% \showfontchart[filename=LucidaSansTypewriterOT-Oblique.otf,page=yes]
+
+% \showfontchart[filename=LucidaConsoleDK.otf,page=yes]
+% \showfontchart[filename=LucidaConsoleDK-Bold.otf,page=yes]
+% \showfontchart[filename=LucidaConsoleDK-BoldItalic.otf,page=yes]
+% \showfontchart[filename=LucidaConsoleDK-Italic.otf,page=yes]
+
+% \showfontchart[filename=LucidaGrandeMonoDK.otf,page=yes]
+% \showfontchart[filename=LucidaGrandeMonoDK-Bold.otf,page=yes]
+% \showfontchart[filename=LucidaGrandeMonoDK-BoldItalic.otf,page=yes]
+% \showfontchart[filename=LucidaGrandeMonoDK-Italic.otf,page=yes]
+
+% \showfontchart[filename=LucidaBrightMathOT.otf,page=yes]
+% \showfontchart[filename=LucidaBrightMathOT-Demi.otf,page=yes]
+
+% \showfontchart[filename=LucidaBlackletterOT.otf,page=yes]
+% \showfontchart[filename=LucidaCalligraphyOT.otf,page=yes]
+% \showfontchart[filename=LucidaHandwritingOT.otf,page=yes]
\stoptext
diff --git a/tex/context/modules/mkiv/s-fonts-complete.mkiv b/tex/context/modules/mkiv/s-fonts-complete.mkiv
index afdd79b4c..83aa708df 100644
--- a/tex/context/modules/mkiv/s-fonts-complete.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-complete.mkiv
@@ -29,23 +29,36 @@
local descriptions = tfmdata.descriptions or { }
local data = characters.data
-- context.setuptabulate { header = "repeat" }
- context.starttabulatehead()
- NC() bold("unicode")
- NC() bold("visual")
- NC() bold("index")
- NC() bold("glyph")
- NC() bold("adobe")
- NC() bold("context")
- NC() NR()
- context.stoptabulatehead()
- context.starttabulate { "|l|c|l|p|p|p|" }
+ -- context.starttabulatehead()
+ -- NC() bold("unicode")
+ -- NC() bold("visual")
+ -- NC() bold("index")
+ -- NC() bold("tounicode")
+ -- NC() bold("unicodes")
+ -- NC() bold("glyph")
+ -- NC() bold("adobe")
+ -- NC() bold("context")
+ -- NC() NR()
+ -- context.stoptabulatehead()
+ context.starttabulate { "|l|c|p(8em)|l|l|p|p|p|" }
+ NC() bold("unicode")
+ NC() bold("visual")
+ NC() bold("unicodes")
+ NC() bold("tounicode")
+ NC() bold("index")
+ NC() bold("glyph")
+ NC() bold("adobe")
+ NC() bold("context")
+ NC() NR()
for unicode, chr in fonts.iterators.characters(tfmdata) do
local des, dat = descriptions[unicode], data[unicode]
- local index = chr.index or 0
- local cname = (dat and dat.contextname) or ""
- local aname = (dat and dat.adobename) or ""
- local gname = (des and des.name) or ""
- local mname = dat and dat.mathname
+ local index = chr.index or 0
+ local tounicode = chr.tounicode
+ local isunicode = chr.unicode
+ local cname = (dat and dat.contextname) or ""
+ local aname = (dat and dat.adobename) or ""
+ local gname = (des and des.name) or ""
+ local mname = dat and dat.mathname
if type(mname) ~= "string" then
mname = ""
end
@@ -70,12 +83,52 @@
cname = mname
end
end
- NC() tttf() context("U+%05X",unicode)
- NC() char(unicode)
- NC() tttf() context("%05X",index)
- NC() if gname ~= "" then tttf() escaped(gname) end
- NC() if aname ~= "" then tttf() context(aname) end
- NC() if cname ~= "" then tttf() context(cname) end
+ NC()
+ tttf()
+ context("%05X",unicode)
+ NC()
+ char(unicode)
+ NC()
+ if isunicode then
+ tttf()
+ if type(isunicode) == "table" then
+ for i=1,#isunicode do
+ if i > 1 then
+ if i % 2 ~= 0 then
+ context.crlf()
+ else
+ context.space()
+ end
+ end
+ context("%05X",isunicode[i])
+ end
+ else
+ context("%05X",isunicode)
+ end
+ end
+ NC()
+ if tounicode then
+ tttf()
+ context(tounicode)
+ end
+ NC()
+ tttf()
+ context("%05X",index)
+ NC()
+ if gname ~= "" then
+ tttf()
+ escaped(gname)
+ end
+ NC()
+ if aname ~= "" then
+ tttf()
+ context(aname)
+ end
+ NC()
+ if cname ~= "" then
+ tttf()
+ context(cname)
+ end
NC() NR()
end
context.stoptabulate()
@@ -100,14 +153,13 @@
\font\TestFont=#1 at #2
\setuplayout[style=\TestFont]
\setupheadertexts[]
- \setupfootertexts[#1 -- \pagenumber]
- \setupfootertexts[pagenumber]
+ \setupfootertexts[#1\space\endash\space\pagenumber]
\setuplayout[width=middle,height=middle,topspace=1cm,backspace=1cm]
\TestFont
\nonknuthmode
\startcolumns[n=#3]
- \TestFont
- \ctxlua { moduledata.fonts.complete.all() }
+ \TestFont
+ \ctxlua { moduledata.fonts.complete.all() }
\stopcolumns
\page
\endgroup}
@@ -125,14 +177,16 @@
\TestFontB \setupinterlinespace[line=1.2\dimexpr#2\relax] \raggedcenter
\nonknuthmode
\startcolumns[n=#3]
- \TestFontB
- \ctxlua { moduledata.fonts.complete.glyphs() }
+ \TestFontB
+ \ctxlua { moduledata.fonts.complete.glyphs() }
\stopcolumns
\page
\endgroup}
\continueifinputfile{s-fonts-complete.mkiv}
+\usemodule[art-01] \setuplayout[overview] \setupbodyfont[8pt]
+
\starttext
% \ShowCompleteFont{name:dejavusansmono}{10pt}{1}
@@ -140,7 +194,7 @@
% \ShowCompleteFont{name:officinasansbookitcregular}{10pt}{2}
% \ShowCompleteFont{name:officinaserifbookitcregular}{10pt}{2}
% \ShowCompleteFont{name:serpentineserifeflight}{10pt}{2}
-\ShowCompleteFont{name:lmroman10-regular}{10pt}{1}
+% \ShowCompleteFont{name:lmroman10-regular}{10pt}{1}
% \ShowCompleteFont{name:lmtypewriter10-regular}{10pt}{2}
% \ShowCompleteFont{lt55485}{10pt}{2}
% \ShowCompleteFont{lmr10}{10pt}{2}
@@ -157,4 +211,13 @@
% \ShowCompleteFont{name:palatinonovaregular}{11pt}{2}
% \ShowCompleteFont{pirat.ttf}{12pt}{1}
+\setuplayout[overview][footer=1cm] \setuplayout[overview]% \setupheadertexts[aegean.ttf]
+
+\ShowCompleteFont{file:aegean} {8pt}{1}
+% \ShowCompleteFont{file:tsukurimashouminchops}{8pt}{1}
+% \ShowCompleteFont{file:tsukurimashoumincho} {8pt}{1}
+% \ShowCompleteFont{file:tsukurimashoukakups} {8pt}{1}
+% \ShowCompleteFont{file:tsukurimashoukaku} {8pt}{1}
+% \ShowCompleteFont{file:akkadian} {8pt}{1}
+
\stoptext
diff --git a/tex/context/modules/mkiv/s-fonts-system.lua b/tex/context/modules/mkiv/s-fonts-system.lua
index e05eef0fa..5d2692473 100644
--- a/tex/context/modules/mkiv/s-fonts-system.lua
+++ b/tex/context/modules/mkiv/s-fonts-system.lua
@@ -39,6 +39,8 @@ local sortedhash = table.sortedhash
local formatters = string.formatters
local concat = table.concat
local lower = string.lower
+local gsub = string.gsub
+local find = string.find
local function allfiles(specification)
local pattern = lower(specification.pattern or "")
@@ -202,3 +204,88 @@ function moduledata.fonts.system.showinstalledglyphnames(specification)
end
table.save("s-fonts-system-glyph-names.lua",names)
end
+
+-- -- --
+
+-- local skip = {
+-- "adobeblank",
+-- "veramo",
+-- "unitedstates",
+-- "tirek",
+-- "svbasicmanual",
+-- "sahel",
+-- "prsprorg",
+-- "piratdia",
+-- "notoserifthai",
+-- "coelacanthsubhdheavy",
+-- }
+
+-- local function bad(name)
+-- name = lower(name)
+-- for i=1,#skip do
+-- if find(name,skip[i]) then
+-- return true
+-- end
+-- end
+-- end
+
+-- function moduledata.fonts.system.showprivateglyphnames(specification)
+-- specification = interfaces.checkedspecification(specification)
+-- local paths = caches.getreadablepaths()
+-- local files = { }
+-- local names = table.setmetatableindex("table")
+-- local f_u = formatters["%04X"]
+-- for i=1,#paths do
+-- local list = dir.glob(paths[i].."/fonts/o*/**.tmc")
+-- for i=1,#list do
+-- files[list[i]] = true
+-- end
+-- end
+-- for filename in table.sortedhash(files) do
+-- logs.report("system","fontfile: %s",file.nameonly(filename))
+-- local data = table.load(filename)
+-- if data and data.format == "truetype" or data.format == "opentype" then
+-- local basename = file.basename(data.resources.filename)
+-- local cleanname = gsub(basename," ","")
+-- if not bad(cleanname) then
+-- local descriptions = data.descriptions
+-- if descriptions then
+-- local done = 0
+-- for u, d in sortedhash(descriptions) do
+-- local dn = d.name
+-- local du = d.unicode
+-- if dn and du and (u >= 0xF0000 or (u >= 0xE000 and u <= 0xF8FF)) and not find(dn,"notdef") then
+-- if type(du) == "table" then
+-- local t = { }
+-- for i=1,#du do
+-- t[i] = f_u(du[i])
+-- end
+-- du = concat(t," ")
+-- end
+-- if done == 0 then
+-- logs.report("system","basename: %s",basename)
+-- context.starttitle { title = basename }
+-- context.start()
+-- context.definefont( { "tempfont" }, { "file:" .. cleanname })
+-- context.starttabulate { "|T||T|T|" }
+-- end
+-- NC() context("%U",u)
+-- NC() context.tempfont() context.char(u) -- could be getglyph
+-- NC() ctx_verbatim(dn)
+-- NC() context(du)
+-- NC() NR()
+-- done = done + 1
+-- end
+-- end
+-- if done > 0 then
+-- logs.report("system","privates: %i",done)
+-- context.stoptabulate()
+-- context.stop()
+-- context.stoptitle()
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+
diff --git a/tex/context/modules/mkiv/s-fonts-system.mkiv b/tex/context/modules/mkiv/s-fonts-system.mkiv
index 5613701d9..03599b0df 100644
--- a/tex/context/modules/mkiv/s-fonts-system.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-system.mkiv
@@ -27,22 +27,24 @@
\installmodulecommandluasingle \showinstalledfonts {moduledata.fonts.system.showinstalled}
\installmodulecommandluasingle \cacheinstalledfonts {moduledata.fonts.system.cacheinstalled}
\installmodulecommandluasingle \showinstalledglyphnames {moduledata.fonts.system.showinstalledglyphnames}
+%installmodulecommandluasingle \showprivateglyphnames {moduledata.fonts.system.showprivateglyphnames}
\stopmodule
\continueifinputfile{s-fonts-system.mkiv}
-\usemodule[art-01] \setuplayout[overview] \setupbodyfont[7pt]
+\usemodule[art-01] \setuplayout[overview] \setupbodyfont[6pt]
\starttext
% \showinstalledfonts
-% \enabletrackers[otf.keepnames]
+ \enabletrackers[otf.keepnames]
-% \cacheinstalledfonts[threshold=4000000,suffixes={otf,ttf,afm,pfb}]
-% \cacheinstalledfonts[threshold=2000000,suffixes={otf,ttf,afm,pfb}]
+ \cacheinstalledfonts[suffixes={otf,ttf,afm}]
+% \cacheinstalledfonts[threshold=4000000,suffixes={otf,ttf,afm}]
+% \cacheinstalledfonts[threshold=2000000,suffixes={otf,ttf,afm}]
- \showinstalledglyphnames
+% \showinstalledglyphnames
\stoptext
diff --git a/tex/context/modules/mkiv/s-maps.mkiv b/tex/context/modules/mkiv/s-maps.mkiv
index c7541babc..28e88af98 100644
--- a/tex/context/modules/mkiv/s-maps.mkiv
+++ b/tex/context/modules/mkiv/s-maps.mkiv
@@ -135,11 +135,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 3 versions of layout with matching headers
-\definepapersize
+\definepapersize
[maps]
[width=21cm,height=26.5cm]
-\setuppapersize
+\setuppapersize
[maps][maps]
\setuplayout[
@@ -360,9 +360,9 @@
\xdef\MapsNumber{\the\numexpr (\the\year-1990)*2+1\relax}%
\fi }%
\doifnothing\MapsRunningAuthor
- {\global\let\MapsRunningAuthor\MapsAuthor}%
+ {\glet\MapsRunningAuthor\MapsAuthor}%
\doifnothing\MapsRunningTitle
- {\global\let\MapsRunningTitle\MapsTitle}}%
+ {\glet\MapsRunningTitle\MapsTitle}}%
\def\dostartArticle[#1]{%
\MapsBibData[#1]