diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/back-u3d.mkiv | 156 | ||||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/font-cid.lua | 3 | ||||
-rw-r--r-- | tex/context/base/l-os.lua | 1 | ||||
-rw-r--r-- | tex/context/base/l-pdfview.lua | 9 | ||||
-rw-r--r-- | tex/context/base/meta-ini.mkiv | 7 | ||||
-rw-r--r-- | tex/context/base/mult-cld.lua | 4 | ||||
-rw-r--r-- | tex/context/base/mult-sys.tex | 8 | ||||
-rw-r--r-- | tex/context/base/page-mul.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/strc-not.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/trac-log.lua | 8 | ||||
-rw-r--r-- | tex/context/base/type-def.mkii | 92 | ||||
-rw-r--r-- | tex/context/base/type-def.mkiv | 52 | ||||
-rw-r--r-- | tex/context/base/type-ini.mkii | 13 | ||||
-rw-r--r-- | tex/context/base/type-ini.mkiv | 14 | ||||
-rw-r--r-- | tex/context/base/type-lua.tex | 88 | ||||
-rw-r--r-- | tex/context/base/type-set.mkii | 81 | ||||
-rw-r--r-- | tex/context/base/type-set.mkiv | 73 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 5 |
21 files changed, 466 insertions, 160 deletions
diff --git a/tex/context/base/back-u3d.mkiv b/tex/context/base/back-u3d.mkiv new file mode 100644 index 000000000..398159feb --- /dev/null +++ b/tex/context/base/back-u3d.mkiv @@ -0,0 +1,156 @@ +%D \module +%D [ file=back-u3d, +%D version=2009.04.15, +%D title=\CONTEXT\ Backend Macros, +%D subtitle=U3D Experiment, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=\PRAGMA] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% This is only a placeholder that demonstrates the usage of u3d +% resources. The user interface is rather messy an might be +% improved. The files and setup is derived from an example by +% Michael Vidiassov. + +\endinput + +\starttext + +\startluaparameterset [u3d:myset:controls:1] + view = { + name = 'default', + bg = {1,1,1}, + mag = 100, + coo = {0,0,0}, + c2c = {0,0,1}, + rot = {40,0,60}, + roo = 6, + lights = 'CAD' + }, + js = 'cloudq.js' +\stopluaparameterset + +\startluaparameterset [u3d:myset:controls:2] + views = { + { + name = 'AnglePositioning', + bg = {1,1,1}, + azimuth = 45, + altitude = 45, + roo = 50, + aac = 2.5, + lights = 'Artwork' + }, + { + name = 'RotationPositioning', + bg = {1,1,1}, + rot = {0,45,45}, + roo = 50, + aac = 2.5, + lights = 'Artwork' + }, + { + name = 'VectorPositioning', + bg = {1,0,0}, + c2c = {1,1,math.sqrt(2)}, + roo = 50, + aac = 2.5, + lights = 'CAD' + }, + { + name = 'PositionPositioning', + bg = {1,0,0}, + pos = {1+25,1+25,1+50/math.sqrt(2)}, + aac = 2.5, + lights = 'CAD' + }, + { + name = 'ortho', + bg = {1,1,1}, + mag = 300, + lights = 'CAD', + crossection = {} + } + }, + view = { + name = 'default', + bg = {1,1,1}, + c2c = {-1,-1,0}, + roo = 50, + aac = 2.5, + roll = 45, + lights = 'CAD', + crossection = { + normal = {-1,-1,-1}, + transparent = true + }, + nodes = { + { + name = 'xlabel', + visible = false + }, + { + name = 'ylabel', + opacity = 0.5 + }, + { + name = 'zlabel', + rendermode = 'Wireframe' + } + } + } +\stopluaparameterset + +\useexternalfigure + [cloudq] + [cloudq.u3d] + [width=0.7\textwidth, + height=.7\textwidth, + display=u3d:myset:display:1, + controls=u3d:myset:controls:1] + +\useexternalfigure + [axes] + [axes.u3d] + [width=0.7\textwidth, + height=.7\textwidth, + controls=u3d:myset:controls:1] + +\startluaparameterset[u3d:myset:display:2] + toolbar = true, + preview = 'cloudq.png' +\stopluaparameterset +\startluaparameterset[u3d:myset:display:3] + toolbar = true, + tree = false, + preview = 'area.png' +\stopluaparameterset +\startluaparameterset[u3d:myset:display:4] + toolbar = true, + tree = false, + view = { + name = 'view', + bg = {0.1,0.1,0.1}, + c2c = {-1,-1,0}, + roo = 50, + aac = 2.5, + roll = 45, + lights = 'Red' + } +\stopluaparameterset +\startluaparameterset[u3d:myset:display:5] + toolbar = true, + tree = false, + view = 'ortho' +\stopluaparameterset + +\placefigure[here]{none}{\externalfigure[cloudq][display=u3d:myset:display:2]} +\placefigure[here]{none}{\externalfigure[axes] [display=u3d:myset:display:3]} +\placefigure[here]{none}{\externalfigure[axes] [display=u3d:myset:display:4]} +\placefigure[here]{none}{\externalfigure[axes] [display=u3d:myset:display:5,width=0.5\textwidth,height=.5\textwidth]} + +\stoptext diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 4373e668c..2f65224e0 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -277,7 +277,7 @@ \loadmarkfile{enco-pfr} \loadmarkfile{type-ini} -\loadmarkfile{type-def} +\loadmarkfile{type-set} %D Properties. Don't ask. diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 10f85ba59..23d578469 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -250,7 +250,7 @@ \loadmarkfile{typo-cap} \loadmarkfile{type-ini} -\loadmarkfile{type-def} +\loadmarkfile{type-set} \loadmarkfile{scrp-ini} diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index addd49fc0..d2c49e60c 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2009.11.26 16:28} +\edef\contextversion{2009.11.27 21:24} %D For those who want to use this: diff --git a/tex/context/base/font-cid.lua b/tex/context/base/font-cid.lua index 7165288cf..57bfcd378 100644 --- a/tex/context/base/font-cid.lua +++ b/tex/context/base/font-cid.lua @@ -78,10 +78,11 @@ end local template = "%s-%s-%s.cidmap" + local function locate(registry,ordering,supplement) local filename = format(template,registry,ordering,supplement) local hashname = lower(filename) - local cidmap = fonts.cid.map[hasnname] + local cidmap = fonts.cid.map[hashname] if not cidmap then if trace_loading then logs.report("load otf","checking cidmap, registry: %s, ordering: %s, supplement: %s, filename: %s",registry,ordering,supplement,filename) diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua index 63c5f214d..db8795253 100644 --- a/tex/context/base/l-os.lua +++ b/tex/context/base/l-os.lua @@ -102,6 +102,7 @@ function os.currentplatform(name,default) platform = "linux" end elseif name == "macosx" then + local architecture = os.resultof("echo $HOSTTYPE") if find(architecture,"i386") then platform = "osx-intel" elseif find(architecture,"x86_64") then diff --git a/tex/context/base/l-pdfview.lua b/tex/context/base/l-pdfview.lua index f74a7f04e..78dfb230b 100644 --- a/tex/context/base/l-pdfview.lua +++ b/tex/context/base/l-pdfview.lua @@ -12,22 +12,25 @@ pdfview = pdfview or { } local opencalls = { ['default'] = "pdfopen --file", -- "pdfopen --back --file" - ['okular'] = 'start "test" "c:/program files/kde/bin/okular.exe" --unique', -- todo: get focus ['xpdf'] = "xpdfopen", } local closecalls= { ['default'] = "pdfclose --file", - ['okular'] = nil, ['xpdf'] = nil, } local allcalls = { ['default'] = "pdfclose --all", - ['okular'] = nil, ['xpdf'] = nil, } +if os.platform == "windows" then + opencalls['okular'] = 'start "test" "c:/program files/kde/bin/okular.exe" --unique' -- todo: get focus +else + opencalls['okular'] = 'okular --unique' +end + pdfview.METHOD = "MTX_PDFVIEW_METHOD" pdfview.method = getenv(pdfview.METHOD) or 'default' pdfview.method = (opencalls[pdfview.method] and pdfview.method) or 'default' diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv index 53c88e907..14d7af1c3 100644 --- a/tex/context/base/meta-ini.mkiv +++ b/tex/context/base/meta-ini.mkiv @@ -111,7 +111,12 @@ \else \edef\currentMPgraphicinstance{#1}% \fi - \edef\currentMPgraphicformat{\csname\@@MPF\currentMPgraphicinstance\s!format\endcsname}} + \edef\currentMPgraphicformat + {\ifcsname\@@MPF\currentMPgraphicinstance\s!format\endcsname + \csname\@@MPF\currentMPgraphicinstance\s!format\endcsname + \else + \defaultMPgraphicinstance + \fi}} \def\currentMPgraphicinstance{\defaultMPgraphicinstance} \def\currentMPgraphicformat {\currentMPgraphicinstance} diff --git a/tex/context/base/mult-cld.lua b/tex/context/base/mult-cld.lua index 02c57fe5f..406f3cb6e 100644 --- a/tex/context/base/mult-cld.lua +++ b/tex/context/base/mult-cld.lua @@ -159,11 +159,11 @@ function context.runfile(filename) local ok = dofile(filename) if type(ok) == "function" then if trace_cld then - commands.writestatus("cld","begin of file '%s' (funciton call)",filename) + commands.writestatus("cld","begin of file '%s' (function call)",filename) end ok() if trace_cld then - commands.writestatus("cld","end of file '%s' (funciton call)",filename) + commands.writestatus("cld","end of file '%s' (function call)",filename) end elseif ok then commands.writestatus("cld","file '%s' is processed and returns true",filename) diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex index 9105ce00a..7e1bf2d97 100644 --- a/tex/context/base/mult-sys.tex +++ b/tex/context/base/mult-sys.tex @@ -164,6 +164,14 @@ \definesystemconstant {mkii} \definesystemconstant {entities} +\definesystemconstant {normal} +\definesystemconstant {bold} +\definesystemconstant {italic} +\definesystemconstant {slanted} + +\definesystemconstant {default} +\definesystemconstant {smallcaps} + %D A more experienced \TEX\ user will recognize the next four %D constants. We need these because font-definitions are %D partially english. diff --git a/tex/context/base/page-mul.mkiv b/tex/context/base/page-mul.mkiv index 789cfbe43..3ec0537a7 100644 --- a/tex/context/base/page-mul.mkiv +++ b/tex/context/base/page-mul.mkiv @@ -941,7 +941,7 @@ \global\setbox\lastcolumnbox\vbox to \scratchdimen {\box\lastcolumnbox \vskip-\scratchdimen - box0}% + \box0}% \fi \egroup \fi diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv index 0246767b9..560001c6e 100644 --- a/tex/context/base/strc-not.mkiv +++ b/tex/context/base/strc-not.mkiv @@ -325,8 +325,8 @@ \setvalue{\??vn @\v!page }{\setnotelocation\plusone} \setvalue{\??vn @\v!columns }{\setnotelocation\plustwo} -\setvalue{\??vn @\v!firstcolumn}{\setnotelocation\plusthree} -\setvalue{\??vn @\v!lastcolumn }{\setnotelocation\plusfour} +\setvalue{\??vn @\v!lastcolumn }{\setnotelocation\plusthree} +\setvalue{\??vn @\v!firstcolumn}{\setnotelocation\plusfour} \setvalue{\??vn @\v!none }{\setnotelocation\plusfive} \setvalue{\??vn @\v!text }{\setnotelocation\plusfive \setnoteformatting\plusone} % test \setvalue{\??vn @\v!high }{\setnoteposition\plusone} diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua index 324b11cf0..d50dadf6e 100644 --- a/tex/context/base/trac-log.lua +++ b/tex/context/base/trac-log.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['luat-log'] = { +if not modules then modules = { } end modules ['trac-log'] = { version = 1.001, comment = "companion to trac-log.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -275,8 +275,12 @@ end logs.simpleline = logs.reportline -function logs.help(message,option) +function logs.reportbanner() -- for scripts too logs.report(banner) +end + +function logs.help(message,option) + logs.reportbanner() logs.reportline() logs.reportlines(message) local moreinfo = logs.moreinfo or "" diff --git a/tex/context/base/type-def.mkii b/tex/context/base/type-def.mkii index 6469a5925..f31c93e50 100644 --- a/tex/context/base/type-def.mkii +++ b/tex/context/base/type-def.mkii @@ -11,55 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\definetypescriptprefix [serif] [Serif] -\definetypescriptprefix [sans] [Sans] -\definetypescriptprefix [mono] [Mono] - -\definefontsynonym [DefaultFont] [cmvtt10] - -\startsetups [font:fallback:serif] - \definefontsynonym [Serif] [DefaultFont] - \definefontsynonym [SerifBold] [Serif] - \definefontsynonym [SerifItalic] [Serif] - \definefontsynonym [SerifSlanted] [SerifItalic] - \definefontsynonym [SerifBoldItalic] [Serif] - \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] - \definefontsynonym [SerifCaps] [Serif] -\stopsetups - -\startsetups [font:fallback:sans] - \definefontsynonym [Sans] [DefaultFont] - \definefontsynonym [SansBold] [Sans] - \definefontsynonym [SansItalic] [Sans] - \definefontsynonym [SansSlanted] [SansItalic] - \definefontsynonym [SansBoldItalic] [Sans] - \definefontsynonym [SansBoldSlanted] [SansBoldItalic] - \definefontsynonym [SansCaps] [Sans] -\stopsetups - -\startsetups [font:fallback:mono] - \definefontsynonym [Mono] [DefaultFont] - \definefontsynonym [MonoBold] [Mono] - \definefontsynonym [MonoItalic] [Mono] - \definefontsynonym [MonoSlanted] [MonoItalic] - \definefontsynonym [MonoBoldItalic] [Mono] - \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic] - \definefontsynonym [MonoCaps] [Mono] -\stopsetups - -\startsetups [font:allbold:serif] - \definefontsynonym [Serif] [SerifBold] - \definefontsynonym [SerifItalic] [SerifBoldItalic] - \definefontsynonym [SerifSlanted] [SerifBoldSlanted] - %definefontsynonym [SerifCaps] [SerifBold] -\stopsetups - -\startsetups [font:allbold:sans] - \definefontsynonym [Sans] [SansBold] - \definefontsynonym [SansItalic] [SansBoldItalic] - \definefontsynonym [SansSlanted] [SansBoldSlanted] - %definefontsynonym [SansCaps] [SansBold] -\stopsetups +\starttypescriptcollection[simplification] \starttypescript [serif] [simple] [name] \definefontsynonym [Serif] [Simple] @@ -91,6 +43,8 @@ \definefontsynonym [MonoCaps] [Mono] \stoptypescript +\stoptypescriptcollection + % handy % \starttypescript [serif] [simple] [name] @@ -98,31 +52,35 @@ % \setupfontsynonym [Simple] [handling=pure] % \stoptypescript +\starttypescriptcollection[handling-and-hz] + \starttypescript [serif,sans,mono] [handling,hanging] [pure,normal] - \setupfontsynonym [\typescriptprefix\typescriptone ] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone Bold] [handling=\typescriptthree bold] - \setupfontsynonym [\typescriptprefix\typescriptone Slanted] [handling=\typescriptthree slanted] - \setupfontsynonym [\typescriptprefix\typescriptone Italic] [handling=\typescriptthree italic] - \setupfontsynonym [\typescriptprefix\typescriptone BoldSlanted] [handling=\typescriptthree boldslanted] - \setupfontsynonym [\typescriptprefix\typescriptone BoldItalic] [handling=\typescriptthree bolditalic] + \setupfontsynonym [\typescriptprefix\typescriptone ] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone Bold] [handling=\typescriptthree bold] + \setupfontsynonym [\typescriptprefix\typescriptone Slanted] [handling=\typescriptthree slanted] + \setupfontsynonym [\typescriptprefix\typescriptone Italic] [handling=\typescriptthree italic] + \setupfontsynonym [\typescriptprefix\typescriptone BoldSlanted] [handling=\typescriptthree boldslanted] + \setupfontsynonym [\typescriptprefix\typescriptone BoldItalic] [handling=\typescriptthree bolditalic] \stoptypescript \starttypescript [serif,sans,mono] [handling,hz] [hz,quality,highquality] - \setupfontsynonym [\typescriptprefix\typescriptone ] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone Bold] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone Slanted] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone Italic] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone BoldSlanted] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone BoldItalic] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone ] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone Bold] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone Slanted] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone Italic] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone BoldSlanted] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone BoldItalic] [handling=\typescriptthree] \stoptypescript \starttypescript [serif,sans,mono] [handling] [noligs,prespacing,flexspacing] - \setupfontsynonym [\typescriptprefix\typescriptone ] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone Bold] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone Slanted] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone Italic] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone BoldSlanted] [handling=\typescriptthree] - \setupfontsynonym [\typescriptprefix\typescriptone BoldItalic] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone ] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone Bold] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone Slanted] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone Italic] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone BoldSlanted] [handling=\typescriptthree] + \setupfontsynonym [\typescriptprefix\typescriptone BoldItalic] [handling=\typescriptthree] \stoptypescript +\stoptypescriptcollection + \endinput diff --git a/tex/context/base/type-def.mkiv b/tex/context/base/type-def.mkiv index 748e3d66f..c980a4ee5 100644 --- a/tex/context/base/type-def.mkiv +++ b/tex/context/base/type-def.mkiv @@ -11,55 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\definetypescriptprefix [serif] [Serif] -\definetypescriptprefix [sans] [Sans] -\definetypescriptprefix [mono] [Mono] - -\definefontsynonym [DefaultFont] [cmvtt10] - -\startsetups [font:fallback:serif] - \definefontsynonym [Serif] [DefaultFont] - \definefontsynonym [SerifBold] [Serif] - \definefontsynonym [SerifItalic] [Serif] - \definefontsynonym [SerifSlanted] [SerifItalic] - \definefontsynonym [SerifBoldItalic] [Serif] - \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] - \definefontsynonym [SerifCaps] [Serif] -\stopsetups - -\startsetups [font:fallback:sans] - \definefontsynonym [Sans] [DefaultFont] - \definefontsynonym [SansBold] [Sans] - \definefontsynonym [SansItalic] [Sans] - \definefontsynonym [SansSlanted] [SansItalic] - \definefontsynonym [SansBoldItalic] [Sans] - \definefontsynonym [SansBoldSlanted] [SansBoldItalic] - \definefontsynonym [SansCaps] [Sans] -\stopsetups - -\startsetups [font:fallback:mono] - \definefontsynonym [Mono] [DefaultFont] - \definefontsynonym [MonoBold] [Mono] - \definefontsynonym [MonoItalic] [Mono] - \definefontsynonym [MonoSlanted] [MonoItalic] - \definefontsynonym [MonoBoldItalic] [Mono] - \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic] - \definefontsynonym [MonoCaps] [Mono] -\stopsetups - -\startsetups [font:allbold:serif] - \definefontsynonym [Serif] [SerifBold] - \definefontsynonym [SerifItalic] [SerifBoldItalic] - \definefontsynonym [SerifSlanted] [SerifBoldSlanted] - %definefontsynonym [SerifCaps] [SerifBold] -\stopsetups - -\startsetups [font:allbold:sans] - \definefontsynonym [Sans] [SansBold] - \definefontsynonym [SansItalic] [SansBoldItalic] - \definefontsynonym [SansSlanted] [SansBoldSlanted] - %definefontsynonym [SansCaps] [SansBold] -\stopsetups +\starttypescriptcollection[simplification] \starttypescript [serif] [simple] [name] \definefontsynonym [Serif] [Simple] @@ -91,4 +43,6 @@ \definefontsynonym [MonoCaps] [Mono] \stoptypescript +\stoptypescriptcollection + \endinput diff --git a/tex/context/base/type-ini.mkii b/tex/context/base/type-ini.mkii index 9372f8dc3..e1a2d40a0 100644 --- a/tex/context/base/type-ini.mkii +++ b/tex/context/base/type-ini.mkii @@ -76,19 +76,6 @@ {\splitfiletype{#1}% \addtocommalist\splitoffname\typescriptfiles}} -\usetypescriptfile[\f!typeprefix tmf] -\usetypescriptfile[\f!typeprefix siz] - -\ifnum\texengine=\xetexengine - \usetypescriptfile[\f!typeprefix otf] - \usetypescriptfile[\f!typeprefix xtx] -\else - \usetypescriptfile[\f!typeprefix one] - %usetypescriptfile[\f!typeprefix akb] % we have gyre now -\fi - -\usetypescriptfile[\f!typeprefix loc] - % SO FAR \let\currenttypescripts\empty diff --git a/tex/context/base/type-ini.mkiv b/tex/context/base/type-ini.mkiv index 4076cf7b8..527a2771d 100644 --- a/tex/context/base/type-ini.mkiv +++ b/tex/context/base/type-ini.mkiv @@ -76,20 +76,6 @@ {\splitfiletype{#1}% \addtocommalist\splitoffname\typescriptfiles}} -% \usetypescriptfile[\f!typeprefix exa] % some examples -% \usetypescriptfile[\f!typeprefix syn] % font file synonyms -% \usetypescriptfile[\f!typeprefix enc] % files and encodings -% %usetypescriptfile[\f!typeprefix dis] % funny name remappings, obsolete -% \usetypescriptfile[\f!typeprefix siz] % specific font sizes -% \usetypescriptfile[\f!typeprefix map] % pdftex mapping -% \usetypescriptfile[\f!typeprefix spe] % special macros -% \usetypescriptfile[\f!typeprefix akb] % adobe karl berry names - -\usetypescriptfile[\f!typeprefix tmf] -\usetypescriptfile[\f!typeprefix siz] -\usetypescriptfile[\f!typeprefix otf] -\usetypescriptfile[\f!typeprefix loc] - % SO FAR \let\currenttypescripts\empty diff --git a/tex/context/base/type-lua.tex b/tex/context/base/type-lua.tex new file mode 100644 index 000000000..a6799671e --- /dev/null +++ b/tex/context/base/type-lua.tex @@ -0,0 +1,88 @@ +%D \module +%D [ file=type-lua, +%D version=2009.11.27, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=\MKIV\ goodies, +%D author=Hans Hagen \& Wolfgang Schuster, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\starttypescriptcollection [luatex] + +\starttypescript [specserif] [all] [name] + \definefontsynonym [Serif] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] + \definefontsynonym [SerifItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [SerifSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [SerifBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] + \definefontsynonym [SerifBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [SerifBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [SerifCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] +\stoptypescript + +\starttypescript [specsans] [all] [name] + \definefontsynonym [Sans] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] + \definefontsynonym [SansItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [SansSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [SansBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] + \definefontsynonym [SansBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [SansBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [SansCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] +\stoptypescript + +\starttypescript [specmono] [all] [name] + \definefontsynonym [Mono] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] + \definefontsynonym [MonoItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [MonoSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [MonoBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] + \definefontsynonym [MonoBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [MonoBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [MonoCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] +\stoptypescript + +% we could combine these in the normal serif settings + +\starttypescript [specserif] [default] [size] + \definebodyfont + [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] [rm] + [\s!default] +\stoptypescript + +\starttypescript [specsans] [default] [size] + \definebodyfont + [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] + [ss] [\s!default] +\stoptypescript + +\starttypescript [specmono] [default] [size] + \definebodyfont + [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] + [tt] [\s!default] +\stoptypescript + +\starttypescript [specserif] [dtp] [size] + \definebodyfont + [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] + [rm] [\s!default] +\stoptypescript + +\starttypescript [specsans] [dtp] [size] + \definebodyfont + [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] + [ss] [\s!default] +\stoptypescript + +\starttypescript [specmono] [dtp] [size] + \definebodyfont + [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] + [tt] [\s!default] +\stoptypescript + +\stoptypescriptcollection + +\protect \endinput diff --git a/tex/context/base/type-set.mkii b/tex/context/base/type-set.mkii new file mode 100644 index 000000000..eac9eb4c2 --- /dev/null +++ b/tex/context/base/type-set.mkii @@ -0,0 +1,81 @@ +%D \module +%D [ file=type-set, +%D version=2005.02.04, % moved from ini/def +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Default Settings, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\definetypescriptprefix [serif] [Serif] +\definetypescriptprefix [sans] [Sans] +\definetypescriptprefix [mono] [Mono] + +\definefontsynonym [DefaultFont] [cmvtt10] + +\startsetups [font:fallback:serif] + \definefontsynonym [Serif] [DefaultFont] + \definefontsynonym [SerifBold] [Serif] + \definefontsynonym [SerifItalic] [Serif] + \definefontsynonym [SerifSlanted] [SerifItalic] + \definefontsynonym [SerifBoldItalic] [Serif] + \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] + \definefontsynonym [SerifCaps] [Serif] +\stopsetups + +\startsetups [font:fallback:sans] + \definefontsynonym [Sans] [DefaultFont] + \definefontsynonym [SansBold] [Sans] + \definefontsynonym [SansItalic] [Sans] + \definefontsynonym [SansSlanted] [SansItalic] + \definefontsynonym [SansBoldItalic] [Sans] + \definefontsynonym [SansBoldSlanted] [SansBoldItalic] + \definefontsynonym [SansCaps] [Sans] +\stopsetups + +\startsetups [font:fallback:mono] + \definefontsynonym [Mono] [DefaultFont] + \definefontsynonym [MonoBold] [Mono] + \definefontsynonym [MonoItalic] [Mono] + \definefontsynonym [MonoSlanted] [MonoItalic] + \definefontsynonym [MonoBoldItalic] [Mono] + \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic] + \definefontsynonym [MonoCaps] [Mono] +\stopsetups + +\startsetups [font:allbold:serif] + \definefontsynonym [Serif] [SerifBold] + \definefontsynonym [SerifItalic] [SerifBoldItalic] + \definefontsynonym [SerifSlanted] [SerifBoldSlanted] + %definefontsynonym [SerifCaps] [SerifBold] +\stopsetups + +\startsetups [font:allbold:sans] + \definefontsynonym [Sans] [SansBold] + \definefontsynonym [SansItalic] [SansBoldItalic] + \definefontsynonym [SansSlanted] [SansBoldSlanted] + %definefontsynonym [SansCaps] [SansBold] +\stopsetups + +\ifnum\texengine=\xetexengine + \usetypescriptfile[\f!typeprefix def] + \usetypescriptfile[\f!typeprefix tmf] + \usetypescriptfile[\f!typeprefix siz] + \usetypescriptfile[\f!typeprefix otf] + \usetypescriptfile[\f!typeprefix xtx] + \usetypescriptfile[\f!typeprefix loc] +\else + \usetypescriptfile[\f!typeprefix def] + \usetypescriptfile[\f!typeprefix tmf] + \usetypescriptfile[\f!typeprefix siz] + \usetypescriptfile[\f!typeprefix one] + \usetypescriptfile[\f!typeprefix loc] +\fi + +\protect \endinput diff --git a/tex/context/base/type-set.mkiv b/tex/context/base/type-set.mkiv new file mode 100644 index 000000000..aa595db2f --- /dev/null +++ b/tex/context/base/type-set.mkiv @@ -0,0 +1,73 @@ +%D \module +%D [ file=type-set, +%D version=2005.02.04, % moved from ini/def +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Default Settings, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\definetypescriptprefix [serif] [Serif] +\definetypescriptprefix [sans] [Sans] +\definetypescriptprefix [mono] [Mono] + +\definefontsynonym [DefaultFont] [cmvtt10] + +\startsetups [font:fallback:serif] + \definefontsynonym [Serif] [DefaultFont] + \definefontsynonym [SerifBold] [Serif] + \definefontsynonym [SerifItalic] [Serif] + \definefontsynonym [SerifSlanted] [SerifItalic] + \definefontsynonym [SerifBoldItalic] [Serif] + \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] + \definefontsynonym [SerifCaps] [Serif] +\stopsetups + +\startsetups [font:fallback:sans] + \definefontsynonym [Sans] [DefaultFont] + \definefontsynonym [SansBold] [Sans] + \definefontsynonym [SansItalic] [Sans] + \definefontsynonym [SansSlanted] [SansItalic] + \definefontsynonym [SansBoldItalic] [Sans] + \definefontsynonym [SansBoldSlanted] [SansBoldItalic] + \definefontsynonym [SansCaps] [Sans] +\stopsetups + +\startsetups [font:fallback:mono] + \definefontsynonym [Mono] [DefaultFont] + \definefontsynonym [MonoBold] [Mono] + \definefontsynonym [MonoItalic] [Mono] + \definefontsynonym [MonoSlanted] [MonoItalic] + \definefontsynonym [MonoBoldItalic] [Mono] + \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic] + \definefontsynonym [MonoCaps] [Mono] +\stopsetups + +\startsetups [font:allbold:serif] + \definefontsynonym [Serif] [SerifBold] + \definefontsynonym [SerifItalic] [SerifBoldItalic] + \definefontsynonym [SerifSlanted] [SerifBoldSlanted] + %definefontsynonym [SerifCaps] [SerifBold] +\stopsetups + +\startsetups [font:allbold:sans] + \definefontsynonym [Sans] [SansBold] + \definefontsynonym [SansItalic] [SansBoldItalic] + \definefontsynonym [SansSlanted] [SansBoldSlanted] + %definefontsynonym [SansCaps] [SansBold] +\stopsetups + +\usetypescriptfile[\f!typeprefix def] +\usetypescriptfile[\f!typeprefix lua] +\usetypescriptfile[\f!typeprefix tmf] +\usetypescriptfile[\f!typeprefix siz] +\usetypescriptfile[\f!typeprefix otf] +\usetypescriptfile[\f!typeprefix loc] + +\protect \endinput diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 99f007a92..8fc59bc1f 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 11/26/09 16:35:22 +-- merge date : 11/27/09 21:28:10 do -- begin closure to overcome local limits and interference @@ -4226,10 +4226,11 @@ end local template = "%s-%s-%s.cidmap" + local function locate(registry,ordering,supplement) local filename = format(template,registry,ordering,supplement) local hashname = lower(filename) - local cidmap = fonts.cid.map[hasnname] + local cidmap = fonts.cid.map[hashname] if not cidmap then if trace_loading then logs.report("load otf","checking cidmap, registry: %s, ordering: %s, supplement: %s, filename: %s",registry,ordering,supplement,filename) |