From c8af1ed872c4bfaf97e229a8faf3b0a4b603d32c Mon Sep 17 00:00:00 2001
From: Hans Hagen <pragma@wxs.nl>
Date: Wed, 8 Aug 2007 14:35:00 +0200
Subject: stable 2007.08.08 14:35

---
 tex/context/base/cont-new.mkiv    |   6 +-
 tex/context/base/cont-new.tex     |   6 +-
 tex/context/base/context.tex      |   2 +-
 tex/context/base/core-obj.mkii    |   2 +-
 tex/context/base/core-obj.tex     |   4 +
 tex/context/base/font-afm.lua     |   3 +-
 tex/context/base/font-def.lua     |  37 ++++++---
 tex/context/base/font-otf.lua     |   2 +-
 tex/context/base/font-tfm.lua     |  26 +++++-
 tex/context/base/l-file.lua       |  33 ++++++--
 tex/context/base/l-utils.lua      |   9 ++-
 tex/context/base/luat-inp.lua     |  50 +++++++++---
 tex/context/base/luat-tmp.lua     |   9 ++-
 tex/context/base/type-otf.tex     | 166 ++++++++++++++++++++------------------
 tex/context/interface/keys-cz.xml |   2 +-
 tex/context/interface/keys-de.xml |   2 +-
 tex/context/interface/keys-en.xml |   2 +-
 tex/context/interface/keys-fr.xml |   2 +-
 tex/context/interface/keys-it.xml |   2 +-
 tex/context/interface/keys-nl.xml |   2 +-
 tex/context/interface/keys-ro.xml |   2 +-
 tex/context/sample/ward.tex       |   2 +-
 22 files changed, 239 insertions(+), 132 deletions(-)

(limited to 'tex')

diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index b7b069b45..0a4803c4a 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,11 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-\ctxlua { fonts.define.method = 2 }
+\appendtoks
+    \writestatus\m!lua{tfm over afm, wide fonts not yet supported}
+\to \everystoptext
+
+\ctxlua { fonts.define.method = 2 }  % normally 3
 
 \unprotect
 
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 941fc6a31..d2154bec8 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,9 +11,7 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-% it's about time to clean up this file ...
-
-\newcontextversion{2007.07.25 12:35}
+\newcontextversion{2007.08.08 14:35}
 
 %D This file is loaded at runtime, thereby providing an
 %D excellent place for hacks, patches, extensions and new
@@ -21,6 +19,8 @@
 
 \unprotect
 
+% it's about time to clean up this file ...
+
 \writestatus{\m!systems}{beware: some patches loaded from cont-new.tex}
 
 % \ifx\pdfmapfile \undefined \else \pdfmapfile{ } \fi
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 8a412745b..fd7fe52ec 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -42,7 +42,7 @@
 %D your styles an modules.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2007.08.07 01:37}
+\edef\contextversion{2007.08.08 14:35}
 
 %D For those who want to use this:
 
diff --git a/tex/context/base/core-obj.mkii b/tex/context/base/core-obj.mkii
index efc166555..361c1a979 100644
--- a/tex/context/base/core-obj.mkii
+++ b/tex/context/base/core-obj.mkii
@@ -13,7 +13,7 @@
 
 \unprotect
 
-\def\checkobjectreferences
+\def\mkcheckobjectreferences
   {\startnointerference
    \protectlabels
    \doutilities{objectreferences}\jobname\empty\relax\relax
diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex
index 8741c3968..d8de15133 100644
--- a/tex/context/base/core-obj.tex
+++ b/tex/context/base/core-obj.tex
@@ -91,6 +91,10 @@
 
 \newif\ifinobject
 
+\ifx\mkcheckobjectreferences\undefined \let\mkcheckobjectreferences\relax \fi
+
+\def\checkobjectreferences{\mkcheckobjectreferences}
+
 \def\objectplaceholder{NOT YET FLUSHED}%
 
 \def\presetobject#1#2% \global added
diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua
index 7f4107386..8afeb84e0 100644
--- a/tex/context/base/font-afm.lua
+++ b/tex/context/base/font-afm.lua
@@ -406,7 +406,7 @@ function fonts.afm.set_features(tfmdata)
 end
 
 function fonts.afm.afm_to_tfm(specification)
-    local afmfile  = specification.filename
+    local afmfile  = specification.filename or specification.name
     local features = specification.features.normal
     local cache_id = specification.hash
     local tfmdata  = containers.read(fonts.tfm.cache, cache_id) -- cache with features applied
@@ -455,7 +455,6 @@ function fonts.tfm.read_from_afm(specification)
         filename = name
     end
     if filename ~= "" then
-        specification.filename = filename .. ".afm"
         tfmtable = fonts.afm.afm_to_tfm(specification)
         if tfmtable then
             tfmtable.name = name
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index cb8e6f75b..aba0728d0 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -40,7 +40,7 @@ interface.</p>
 fonts.define.method        = 3 -- 1: tfm  2: tfm and if not then afm  3: afm and if not then tfm
 fonts.define.auto_afm      = true
 fonts.define.auto_otf      = true
-fonts.define.specify       = { }
+fonts.define.specify       = fonts.define.specify or { }
 fonts.define.splitsymbols  = ""
 fonts.define.methods       = fonts.define.methods or { }
 
@@ -190,9 +190,15 @@ function fonts.tfm.read(specification)
     if not tfmtable then
         if specification.forced and specification.forced ~= "" then
             tfmtable = fonts.tfm.readers[specification.forced](specification)
+            if not tfmtable then
+                logs.error("define font",string.format("forced type %s of %s not found",specification.forced,specification.name))
+            end
         else
             for _, reader in ipairs(fonts.tfm.readers.sequence) do
                 if fonts.tfm.readers[reader] then -- not really needed
+                    if fonts.trace then
+                        logs.report("define font",string.format("trying type %s for %s with file %s",reader,specification.name,specification.filename or "unknown"))
+                    end
                     tfmtable = fonts.tfm.readers[reader](specification)
                     if tfmtable then break end
                 end
@@ -209,6 +215,9 @@ function fonts.tfm.read(specification)
     end
     input.stop_timing(fonts)
     garbagecollector.pop()
+    if not tfmtable then
+        logs.error("define font",string.format("font with name %s is not found",specification.name))
+    end
     return tfmtable
 end
 
@@ -254,8 +263,8 @@ function fonts.tfm.readers.opentype(specification,suffix,what)
         local fullname, tfmtable = nil, nil
         fullname = input.findbinfile(texmf.instance,specification.name,suffix)
         if fullname and fullname ~= "" then
-            specification.filename, specification.format = fullname, what
-            tfmtable = fonts.tfm.read_from_open_type(specification)
+            specification.filename, specification.format = fullname, what -- hm, so we do set the filename, then
+            tfmtable = fonts.tfm.read_from_open_type(specification)       -- we need to do it for all matches / todo
             fonts.logger.save(tfmtable,suffix,specification)
         end
         return tfmtable
@@ -268,23 +277,24 @@ function fonts.tfm.readers.otf(specification) return fonts.tfm.readers.opentype(
 function fonts.tfm.readers.ttf(specification) return fonts.tfm.readers.opentype(specification,"ttf","truetype") end
 function fonts.tfm.readers.ttc(specification) return fonts.tfm.readers.opentype(specification,"ttf","truetype") end -- !!
 
-function fonts.tfm.readers.afm(specification)
+function fonts.tfm.readers.afm(specification,method)
     local fullname, tfmtable = nil, nil
-    if fonts.define.method == 2 then
+    method = method or fonts.define.method
+    if method == 2 then
         fullname = input.findbinfile(texmf.instance,specification.name,"ofm") -- ?
-        if not (fullname and fullname ~= "") then
-            specification.filename = fullname
+        if not fullname or fullname == "" then
             tfmtable = fonts.tfm.read_from_afm(specification)
             fonts.logger.save(tfmtable,'afm',specification)
+        else
+            specification.filename = fullname
+            tfmtable = fonts.tfm.read_from_tfm(specification)
         end
-    elseif fonts.define.method == 3 then
--- maybe also findbinfile here
+    elseif method == 3 then -- maybe also findbinfile here
         if fonts.define.auto_afm then
             tfmtable = fonts.tfm.read_from_afm(specification)
             fonts.logger.save(tfmtable,'afm',specification)
         end
-    elseif fonts.define.method == 4 then
--- maybe also findbinfile here
+    elseif method == 4 then -- maybe also findbinfile here
         tfmtable = fonts.tfm.read_from_afm(specification)
         fonts.logger.save(tfmtable,'afm',specification)
     end
@@ -361,7 +371,7 @@ end
 
 fonts.define.register_split(":", fonts.define.specify.colonized)
 
-fonts.define.specify.context_setups =  fonts.define.specify.context_setups or { }
+fonts.define.specify.context_setups = fonts.define.specify.context_setups or { }
 
 input.storage.register(false,"fonts/setups", fonts.define.specify.context_setups, "fonts.define.specify.context_setups")
 
@@ -448,6 +458,9 @@ function fonts.define.read(name,size,id)
         fonts.tfm.id[id] = fontdata
         fonts.tfm.internalized[hash] = id
     end
+    if not fontdata then
+        logs.error("defining font", string.format("name: %s, loading aborted",specification.name))
+    end
     return fontdata
 end
 
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index c6a100566..8dec45481 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -1643,7 +1643,7 @@ do
             end
             local lookupdata = otfdata.lookups[lookupname]
             if not lookupdata then
-                texio.write_nl(string.format("error, missing lookupdata table %s",lookupname))
+                logs.error("otf process", string.format("missing lookupdata table %s",lookupname))
             elseif lookupdata.rules then
                 for nofrules, rule in ipairs(lookupdata.rules) do
                     local coverage = rule.coverage
diff --git a/tex/context/base/font-tfm.lua b/tex/context/base/font-tfm.lua
index b07f0a062..61b1d3a94 100644
--- a/tex/context/base/font-tfm.lua
+++ b/tex/context/base/font-tfm.lua
@@ -17,6 +17,7 @@ fonts.logger     = fonts.logger     or { }
 fonts.loadtime   = 0
 fonts.tfm        = fonts.tfm        or { }
 fonts.triggers   = fonts.triggers   or { } -- brrr
+fonts.trace      = false
 
 --[[ldx--
 <p>The next function encapsulates the standard <l n='tfm'/> loader as
@@ -24,7 +25,30 @@ supplied by <l n='luatex'/>.</p>
 --ldx]]--
 
 function fonts.tfm.read_from_tfm(specification)
-    return font.read_tfm(specification.name,specification.size)
+    local fname, tfmdata = specification.filename, nil
+    if fname then
+        -- safeguard, we use tfm as fallback
+        local suffix = file.extname(fname)
+        if suffix ~= "" and suffix ~= "tfm" then
+            fname = ""
+        end
+    end
+    if not fname or fname == "" then
+        fname = input.findbinfile(texmf.instance, specification.name, 'ofm')
+    else
+        fname = input.findbinfile(texmf.instance, fname, 'ofm')
+    end
+    if fname and fname ~= "" then
+        if fonts.trace then
+            logs.report("define font",string.format("loading tfm file %s at size %s",fname,specification.size))
+        end
+        tfmdata = font.read_tfm(fname,specification.size)
+    else
+        if fonts.trace then
+            logs.report("define font",string.format("loading tfm with name %s fails",specification.name))
+        end
+    end
+    return tfmdata
 end
 
 --[[ldx--
diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua
index ca983402b..67bf44b5a 100644
--- a/tex/context/base/l-file.lua
+++ b/tex/context/base/l-file.lua
@@ -36,8 +36,12 @@ function file.extname(name)
     return name:match("^.+%.(.-)$") or  ""
 end
 
-function file.join(...) -- args
-    return (string.gsub(table.concat({...},"/"),"\\","/"))
+function file.join(...)
+    local t = { ... }
+    for i=1,#t do
+        t[i] = (t[i]:gsub("\\","/")):gsub("/+$","")
+    end
+    return table.concat(t,"/")
 end
 
 function file.is_writable(name)
@@ -60,16 +64,31 @@ function file.is_readable(name)
     end
 end
 
+--~ function file.split_path(str)
+--~     if str:find(';') then
+--~         return str:splitchr(";")
+--~     else
+--~         return str:splitchr(io.pathseparator)
+--~     end
+--~ end
+
+-- todo: lpeg
+
 function file.split_path(str)
-    if str:find(';') then
-        return str:splitchr(";")
-    else
-        return str:splitchr(io.pathseparator)
+    local t = { }
+    str = str:gsub("\\", "/")
+    str = str:gsub("(%a):([;/])", "%1\001%2")
+    for name in str:gmatch("([^;:]+)") do
+        if name ~= "" then
+            name = name:gsub("\001",":")
+            t[#t+1] = name
+        end
     end
+    return t
 end
 
 function file.join_path(tab)
-    return table.concat(tab,io.pathseparator)
+    return table.concat(tab,io.pathseparator) -- can have trailing //
 end
 
 --~ print('test'           .. " == " .. file.collapse_path("test"))
diff --git a/tex/context/base/l-utils.lua b/tex/context/base/l-utils.lua
index 96273106a..02efebe08 100644
--- a/tex/context/base/l-utils.lua
+++ b/tex/context/base/l-utils.lua
@@ -116,6 +116,13 @@ end
 function utils.lua.compile(luafile, lucfile)
  -- utils.report("compiling",luafile,"into",lucfile)
     os.remove(lucfile)
-    return (os.execute("luac -s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)) == 0)
+    local command = "-s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)
+    if os.execute("texluac " .. command) == 0 then
+        return true
+    elseif os.execute("luac " .. command) == 0 then
+        return true
+    else
+        return false
+    end
 end
 
diff --git a/tex/context/base/luat-inp.lua b/tex/context/base/luat-inp.lua
index 798105718..656bd76a1 100644
--- a/tex/context/base/luat-inp.lua
+++ b/tex/context/base/luat-inp.lua
@@ -14,7 +14,9 @@
 -- (any case), rest paths (so no need for optimization). Or maybe a
 -- separate table that matches lowercase names to mixed case when
 -- present. In that case the lower() cases can go away. I will do that
--- only when we run into problems with names.
+-- only when we run into problems with names ... well ... Iwona-Regular.
+
+-- Beware, loading and saving is overloaded in luat-tmp!
 
 if not versions    then versions    = { } end versions['luat-inp'] = 1.001
 if not environment then environment = { } end
@@ -78,12 +80,14 @@ input.suffixes['lua'] = { 'lua', 'luc', 'tma', 'tmc' }
 -- here we catch a few new thingies
 
 function input.checkconfigdata(instance)
-    if input.env(instance,"LUAINPUTS") == "" then
-        instance.environment["LUAINPUTS"] = ".;$TEXINPUTS;$TEXMFSCRIPTS"
-    end
-    if input.env(instance,"FONTFEATURES") == "" then
-        instance.environment["FONTFEATURES"] = ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS"
+    function fix(varname,default)
+        local proname = varname .. "." .. instance.progname or "crap"
+        if not instance.environment[proname] and not instance.variables[proname] == "" and not instance.environment[varname] and not instance.variables[varname] == "" then
+            instance.variables[varname] = default
+        end
     end
+    fix("LUAINPUTS"   , ".;$TEXINPUTS;$TEXMFSCRIPTS")
+    fix("FONTFEATURES", ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS")
 end
 
 -- backward compatible ones
@@ -119,6 +123,7 @@ function input.reset()
     instance.variables       = { }
     instance.expansions      = { }
     instance.files           = { }
+    instance.remap           = { }
     instance.configuration   = { }
     instance.found           = { }
     instance.foundintrees    = { }
@@ -239,7 +244,7 @@ function input.reportlines(str)
     for _,v in pairs(str) do input.report(v) end
 end
 
-input.settrace(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0)
+input.settrace(tonumber(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0))
 
 -- These functions can be used to test the performance, especially
 -- loading the database files.
@@ -620,6 +625,10 @@ function input.generators.tex(instance,specification)
                             end
                         else
                             files[name] = path
+                            local lower = name:lower()
+                            if name ~= lower then
+                                files["remap:"..lower] = name
+                            end
                         end
                     end
                 end
@@ -650,6 +659,10 @@ function input.generators.tex(instance,specification)
                         end
                     else
                         files[line] = path -- string
+                        local lower = line:lower()
+                        if line ~= lower then
+                            files["remap:"..lower] = line
+                        end
                     end
                 else
                     path = line:match("%.%/(.-)%:$") or path -- match could be nil due to empty line
@@ -1110,8 +1123,8 @@ function input.aux.expanded_path(instance,pathlist)
                     local pre, mid, post = v:match(pattern)
                     if pre and mid and post then
                         more = true
-                     -- for _,vv in ipairs(mid:splitchr(',')) do
-                        for vv in string.gmatch(mid..',',"(.-),") do
+--~                         for vv in string.gmatch(mid..',',"(.-),") do
+                        for vv in string.gmatch(mid,"([^,]+)") do
                             if vv == '.' then
                                 t[#t+1] = pre..post
                             else
@@ -1185,11 +1198,20 @@ function input.aux.collect_files(instance,names)
             end
             for _, hash in pairs(instance.hashes) do
                 local blobpath = hash.tag
-                if blobpath and instance.files[blobpath] then
+                local files = blobpath and instance.files[blobpath]
+                if files then
                     if input.trace > 2 then
                         input.logger('? blobpath do',blobpath .. " (" .. bname ..")")
                     end
-                    local blobfile = instance.files[blobpath][bname]
+                    local blobfile = files[bname]
+                    if not blobfile then
+                        local rname = "remap:"..bname
+                        blobfile = files[rname]
+                        if blobfile then
+                            bname = files[rname]
+                            blobfile = files[bname]
+                        end
+                    end
                     if blobfile then
                         if type(blobfile) == 'string' then
                             if not dname or blobfile:find(dname) then
@@ -1817,14 +1839,16 @@ end
 -- beware: i need to check where we still need a / on windows:
 
 function input.clean_path(str)
- -- return string.gsub(string.gsub(string.gsub(str,"\\","/"),"^!+",""),"//$","/")
-    return (string.gsub(string.gsub(str,"\\","/"),"^!+",""))
+--~     return (((str:gsub("\\","/")):gsub("^!+","")):gsub("//+","//"))
+    return ((str:gsub("\\","/")):gsub("^!+",""))
 end
+
 function input.do_with_path(name,func)
     for _, v in pairs(input.expanded_path_list(instance,name)) do
         func("^"..input.clean_path(v))
     end
 end
+
 function input.do_with_var(name,func)
     func(input.aux.expanded_var(name))
 end
diff --git a/tex/context/base/luat-tmp.lua b/tex/context/base/luat-tmp.lua
index d11ae6329..84966bd2c 100644
--- a/tex/context/base/luat-tmp.lua
+++ b/tex/context/base/luat-tmp.lua
@@ -26,16 +26,16 @@ cache = cache  or { }
 dir   = dir    or { }
 texmf = texmf  or { }
 
-cache.path   = nil
+cache.path   = cache.path or nil
 cache.base   = cache.base or "luatex-cache"
 cache.more   = cache.more or "context"
 cache.direct = false -- true is faster but may need huge amounts of memory
 cache.trace  = false
 cache.tree   = false
-cache.temp   = os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
-cache.paths  = { cache.temp }
+cache.temp   = cache.temp or os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
+cache.paths  = cache.paths or { cache.temp }
 
-if not cache.temp then
+if not cache.temp or cache.temp == "" then
     print("\nFATAL ERROR: NO VALID TEMPORARY PATH\n")
     os.exit()
 end
@@ -69,6 +69,7 @@ function cache.setpath(instance,...)
         if not cache.path then
             cache.path = cache.temp
         end
+        cache.path = input.clean_path(cache.path) -- to be sure
         if lfs then
             cache.tree = cache.tree or cache.treehash(instance)
             if cache.tree then
diff --git a/tex/context/base/type-otf.tex b/tex/context/base/type-otf.tex
index ee51c559c..d1de4bd10 100644
--- a/tex/context/base/type-otf.tex
+++ b/tex/context/base/type-otf.tex
@@ -343,7 +343,7 @@
 % qplb  TeXGyrePagella-Bold
 % qplbi TeXGyrePagella-BoldItalic
 
-\starttypescript [serif] [palatino]
+\starttypescript [serif] [palatino,pagella]
   \definefontsynonym [Palatino]             [texgyrepagella-regular]    [features=default]
   \definefontsynonym [Palatino-Italic]      [texgyrepagella-italic]     [features=default]
   \definefontsynonym [Palatino-Bold]        [texgyrepagella-bold]       [features=default]
@@ -498,39 +498,39 @@
 % Antykwa Torunska (GUST)
 
 \starttypescript [serif] [antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond]
-    \definefontsynonym [AntykwaTorunska-Bold]              [AntykwaTorunska-Bold]             [features=default]
-    \definefontsynonym [AntykwaTorunska-BoldItalic]        [AntykwaTorunska-BoldItalic]       [features=default]
-    \definefontsynonym [AntykwaTorunska-Light]             [AntykwaTorunskaLight-Regular]     [features=default]
-    \definefontsynonym [AntykwaTorunska-LightItalic]       [AntykwaTorunskaLight-Italic]      [features=default]
-    \definefontsynonym [AntykwaTorunska-Medium]            [AntykwaTorunskaMed-Regular]       [features=default]
-    \definefontsynonym [AntykwaTorunska-MedItalic]         [AntykwaTorunskaMed-Italic]        [features=default]
-    \definefontsynonym [AntykwaTorunska-Regular]           [AntykwaTorunska-Regular]          [features=default]
-    \definefontsynonym [AntykwaTorunska-Italic]            [AntykwaTorunska-Italic]           [features=default]
-    \definefontsynonym [AntykwaTorunska-CondBold]          [AntykwaTorunskaCond-Bold]         [features=default]
-    \definefontsynonym [AntykwaTorunska-CondBoldItalic]    [AntykwaTorunskaCond-BoldItalic]   [features=default]
-    \definefontsynonym [AntykwaTorunska-CondLight]         [AntykwaTorunskaCondLight-Regular] [features=default]
-    \definefontsynonym [AntykwaTorunska-CondLightItalic]   [AntykwaTorunskaCondLight-Italic]  [features=default]
-    \definefontsynonym [AntykwaTorunska-CondMedium]        [AntykwaTorunskaCondMed-Regular]   [features=default]
-    \definefontsynonym [AntykwaTorunska-CondMedItalic]     [AntykwaTorunskaCondMed-Italic]    [features=default]
-    \definefontsynonym [AntykwaTorunska-CondRegular]       [AntykwaTorunskaCond-Regular]      [features=default]
-    \definefontsynonym [AntykwaTorunska-CondItalic]        [AntykwaTorunskaCond-Italic]       [features=default]
-
-    \definefontsynonym [AntykwaTorunska-BoldCap]           [AntykwaTorunska-Bold]             [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-BoldItalicCap]     [AntykwaTorunska-BoldItalic]       [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-LightCap]          [AntykwaTorunskaLight-Regular]     [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-LightItalicCap]    [AntykwaTorunskaLight-Italic]      [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-MediumCap]         [AntykwaTorunskaMed-Regular]       [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-MedItalicCap]      [AntykwaTorunskaMed-Italic]        [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-Cap]               [AntykwaTorunska-Regular]          [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-ItalicCap]         [AntykwaTorunska-Italic]           [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondBoldCap]       [AntykwaTorunskaCond-Bold]         [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondBoldItalicCap] [AntykwaTorunskaCond-BoldItalic]   [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondLightCap]      [AntykwaTorunskaCondLight-Regular] [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondLightItalicCap][AntykwaTorunskaCondLight-Italic]  [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondMediumCap]     [AntykwaTorunskaCondMed-Regular]   [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondMedItalicCap]  [AntykwaTorunskaCondMed-Italic]    [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondCap]           [AntykwaTorunskaCond-Regular]      [features=smallcaps]
-    \definefontsynonym [AntykwaTorunska-CondItalicCap]     [AntykwaTorunskaCond-Italic]       [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-Bold]              [antykwatorunska-bold]             [features=default]
+    \definefontsynonym [AntykwaTorunska-BoldItalic]        [antykwatorunska-bolditalic]       [features=default]
+    \definefontsynonym [AntykwaTorunska-Light]             [antykwatorunskalight-regular]     [features=default]
+    \definefontsynonym [AntykwaTorunska-LightItalic]       [antykwatorunskalight-italic]      [features=default]
+    \definefontsynonym [AntykwaTorunska-Medium]            [antykwatorunskamed-regular]       [features=default]
+    \definefontsynonym [AntykwaTorunska-MedItalic]         [antykwatorunskamed-italic]        [features=default]
+    \definefontsynonym [AntykwaTorunska-Regular]           [antykwatorunska-regular]          [features=default]
+    \definefontsynonym [AntykwaTorunska-Italic]            [antykwatorunska-italic]           [features=default]
+    \definefontsynonym [AntykwaTorunska-CondBold]          [antykwatorunskacond-bold]         [features=default]
+    \definefontsynonym [AntykwaTorunska-CondBoldItalic]    [antykwatorunskacond-bolditalic]   [features=default]
+    \definefontsynonym [AntykwaTorunska-CondLight]         [antykwatorunskacondlight-regular] [features=default]
+    \definefontsynonym [AntykwaTorunska-CondLightItalic]   [antykwatorunskacondlight-italic]  [features=default]
+    \definefontsynonym [AntykwaTorunska-CondMedium]        [antykwatorunskacondmed-regular]   [features=default]
+    \definefontsynonym [AntykwaTorunska-CondMedItalic]     [antykwatorunskacondmed-italic]    [features=default]
+    \definefontsynonym [AntykwaTorunska-CondRegular]       [antykwatorunskacond-regular]      [features=default]
+    \definefontsynonym [AntykwaTorunska-CondItalic]        [antykwatorunskacond-italic]       [features=default]
+
+    \definefontsynonym [AntykwaTorunska-BoldCap]           [antykwatorunska-bold]             [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-BoldItalicCap]     [antykwatorunska-bolditalic]       [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-LightCap]          [antykwatorunskalight-regular]     [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-LightItalicCap]    [antykwatorunskalight-italic]      [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-MediumCap]         [antykwatorunskamed-regular]       [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-MedItalicCap]      [antykwatorunskamed-italic]        [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-Cap]               [antykwatorunska-regular]          [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-ItalicCap]         [antykwatorunska-italic]           [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondBoldCap]       [antykwatorunskacond-bold]         [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondBoldItalicCap] [antykwatorunskacond-bolditalic]   [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondLightCap]      [antykwatorunskacondlight-regular] [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondLightItalicCap][antykwatorunskacondlight-italic]  [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondMediumCap]     [antykwatorunskacondmed-regular]   [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondMedItalicCap]  [antykwatorunskacondmed-italic]    [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondCap]           [antykwatorunskacond-regular]      [features=smallcaps]
+    \definefontsynonym [AntykwaTorunska-CondItalicCap]     [antykwatorunskacond-italic]       [features=smallcaps]
 \stoptypescript
 
 \starttypescript [math] [antykwa-torunska] [default]
@@ -583,49 +583,49 @@
 % maybe this will change in Iwona-Math-Letters and Iwona-Math-Letters-Italic
 
 \starttypescript [sans] [iwona-light,iwona,iwona-medium,iwona-heavy,iwona-light-cond,iwona-cond,iwona-medium-cond,iwona-heavy-cond]
-    \definefontsynonym [Iwona-Regular]               [Iwona-Regular]           [features=default]
-    \definefontsynonym [Iwona-RegularItalic]         [Iwona-Italic]            [features=default]
-    \definefontsynonym [Iwona-Bold]                  [Iwona-Bold]              [features=default]
-    \definefontsynonym [Iwona-BoldItalic]            [Iwona-BoldItalic]        [features=default]
-    \definefontsynonym [Iwona-Light]                 [IwonaLight-Regular]      [features=default]
-    \definefontsynonym [Iwona-LightItalic]           [IwonaLight-Italic]       [features=default]
-    \definefontsynonym [Iwona-Medium]                [IwonaMedium-Regular]     [features=default]
-    \definefontsynonym [Iwona-MediumItalic]          [IwonaMedium-Italic]      [features=default]
-    \definefontsynonym [Iwona-Heavy]                 [IwonaHeavy-Regular]      [features=default]
-    \definefontsynonym [Iwona-HeavyItalic]           [IwonaHeavy-Italic]       [features=default]
-
-    \definefontsynonym [Iwona-CondLight]             [IwonaCond-Regular]       [features=default]
-    \definefontsynonym [Iwona-CondRegular]           [IwonaCond-Italic]        [features=default]
-    \definefontsynonym [Iwona-CondMedium]            [IwonaCond-Bold]          [features=default]
-    \definefontsynonym [Iwona-CondBold]              [IwonaCond-BoldItalic]    [features=default]
-    \definefontsynonym [Iwona-CondHeavy]             [IwonaCondLight-Regular]  [features=default]
-    \definefontsynonym [Iwona-CondLightItalic]       [IwonaCondLight-Italic]   [features=default]
-    \definefontsynonym [Iwona-CondRegularItalic]     [IwonaCondMedium-Regular] [features=default]
-    \definefontsynonym [Iwona-CondMediumItalic]      [IwonaCondMedium-Italic]  [features=default]
-    \definefontsynonym [Iwona-CondBoldItalic]        [IwonaCondHeavy-Regular]  [features=default]
-    \definefontsynonym [Iwona-CondHeavyItalic]       [IwonaCondHeavy-Italic]   [features=default]
-
-    \definefontsynonym [Iwona-CapsLight]             [Iwona-Regular]           [features=smallcaps]
-    \definefontsynonym [Iwona-CapsRegular]           [Iwona-Italic]            [features=smallcaps]
-    \definefontsynonym [Iwona-CapsMedium]            [Iwona-Bold]              [features=smallcaps]
-    \definefontsynonym [Iwona-CapsBold]              [Iwona-BoldItalic]        [features=smallcaps]
-    \definefontsynonym [Iwona-CapsHeavy]             [IwonaLight-Regular]      [features=smallcaps]
-    \definefontsynonym [Iwona-CapsLightItalic]       [IwonaLight-Italic]       [features=smallcaps]
-    \definefontsynonym [Iwona-CapsRegularItalic]     [IwonaMedium-Regular]     [features=smallcaps]
-    \definefontsynonym [Iwona-CapsMediumItalic]      [IwonaMedium-Italic]      [features=smallcaps]
-    \definefontsynonym [Iwona-CapsBoldItalic]        [IwonaHeavy-Regular]      [features=smallcaps]
-    \definefontsynonym [Iwona-CapsHeavyItalic]       [IwonaHeavy-Italic]       [features=smallcaps]
-
-    \definefontsynonym [Iwona-CondCapsLight]         [IwonaCond-Regular]       [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsRegular]       [IwonaCond-Italic]        [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsMedium]        [IwonaCond-Bold]          [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsBold]          [IwonaCond-BoldItalic]    [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsHeavy]         [IwonaCondLight-Regular]  [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsLightItalic]   [IwonaCondLight-Italic]   [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsRegularItalic] [IwonaCondMedium-Regular] [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsMediumItalic]  [IwonaCondMedium-Italic]  [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsBoldItalic]    [IwonaCondHeavy-Regular]  [features=smallcaps]
-    \definefontsynonym [Iwona-CondCapsHeavyItalic]   [IwonaCondHeavy-Italic]   [features=smallcaps]
+    \definefontsynonym [Iwona-Regular]               [iwona-regular]           [features=default]
+    \definefontsynonym [Iwona-RegularItalic]         [iwona-italic]            [features=default]
+    \definefontsynonym [Iwona-Bold]                  [iwona-bold]              [features=default]
+    \definefontsynonym [Iwona-BoldItalic]            [iwona-bolditalic]        [features=default]
+    \definefontsynonym [Iwona-Light]                 [iwonalight-regular]      [features=default]
+    \definefontsynonym [Iwona-LightItalic]           [iwonalight-italic]       [features=default]
+    \definefontsynonym [Iwona-Medium]                [iwonamedium-regular]     [features=default]
+    \definefontsynonym [Iwona-MediumItalic]          [iwonamedium-italic]      [features=default]
+    \definefontsynonym [Iwona-Heavy]                 [iwonaheavy-regular]      [features=default]
+    \definefontsynonym [Iwona-HeavyItalic]           [iwonaheavy-italic]       [features=default]
+
+    \definefontsynonym [Iwona-CondLight]             [iwonacond-regular]       [features=default]
+    \definefontsynonym [Iwona-CondRegular]           [iwonacond-italic]        [features=default]
+    \definefontsynonym [Iwona-CondMedium]            [iwonacond-bold]          [features=default]
+    \definefontsynonym [Iwona-CondBold]              [iwonacond-bolditalic]    [features=default]
+    \definefontsynonym [Iwona-CondHeavy]             [iwonacondlight-regular]  [features=default]
+    \definefontsynonym [Iwona-CondLightItalic]       [iwonacondlight-italic]   [features=default]
+    \definefontsynonym [Iwona-CondRegularItalic]     [iwonacondmedium-regular] [features=default]
+    \definefontsynonym [Iwona-CondMediumItalic]      [iwonacondmedium-italic]  [features=default]
+    \definefontsynonym [Iwona-CondBoldItalic]        [iwonacondheavy-regular]  [features=default]
+    \definefontsynonym [Iwona-CondHeavyItalic]       [iwonacondheavy-italic]   [features=default]
+
+    \definefontsynonym [Iwona-CapsLight]             [iwona-regular]           [features=smallcaps]
+    \definefontsynonym [Iwona-CapsRegular]           [iwona-italic]            [features=smallcaps]
+    \definefontsynonym [Iwona-CapsMedium]            [iwona-bold]              [features=smallcaps]
+    \definefontsynonym [Iwona-CapsBold]              [iwona-bolditalic]        [features=smallcaps]
+    \definefontsynonym [Iwona-CapsHeavy]             [iwonalight-regular]      [features=smallcaps]
+    \definefontsynonym [Iwona-CapsLightItalic]       [iwonalight-italic]       [features=smallcaps]
+    \definefontsynonym [Iwona-CapsRegularItalic]     [iwonamedium-regular]     [features=smallcaps]
+    \definefontsynonym [Iwona-CapsMediumItalic]      [iwonamedium-italic]      [features=smallcaps]
+    \definefontsynonym [Iwona-CapsBoldItalic]        [iwonaheavy-regular]      [features=smallcaps]
+    \definefontsynonym [Iwona-CapsHeavyItalic]       [iwonaheavy-italic]       [features=smallcaps]
+
+    \definefontsynonym [Iwona-CondCapsLight]         [iwonacond-regular]       [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsRegular]       [iwonacond-italic]        [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsMedium]        [iwonacond-bold]          [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsBold]          [iwonacond-bolditalic]    [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsHeavy]         [iwonacondlight-regular]  [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsLightItalic]   [iwonacondlight-italic]   [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsRegularItalic] [iwonacondmedium-regular] [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsMediumItalic]  [iwonacondmedium-italic]  [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsBoldItalic]    [iwonacondheavy-regular]  [features=smallcaps]
+    \definefontsynonym [Iwona-CondCapsHeavyItalic]   [iwonacondheavy-italic]   [features=smallcaps]
 \stoptypescript
 
 \starttypescript [math] [iwona] [default]
@@ -715,6 +715,18 @@
   \definefontsynonym [MartinVogel]           [fmvr8x]
 \stoptypescript
 
+% Temp here
+
+\starttypescript [serif] [charter]
+    \definefontsynonym [Charter-Roman]       [name:CharterBT-Roman]        % or: [bchr8a]
+    \definefontsynonym [Charter-Italic]      [name:CharterBT-Italic]       % or: [bchri8a]
+    \definefontsynonym [Charter-Bold]        [name:CharterBT-Bold]         % or: [bchb8a]
+    \definefontsynonym [Charter-BoldItalic]  [name:CharterBT-BoldItalic]   % or: [bchbi8a]
+    \definefontsynonym [Charter-Slanted]     [name:CharterBT-Italic]       % or: [bchri8a]
+    \definefontsynonym [Charter-BoldSlanted] [name:CharterBT-BoldItalic]   % or: [bchbi8a]
+    \definefontsynonym [Charter-Roman-Caps]  [name:CharterBT-SmallCap]     % or: [bchrc8a]
+\stoptypescript
+
 \stoptypescriptcollection
 
 \endinput
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 7bb8e9000..b7385fccb 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.08.08 14:35">
 
   <cd:variables>
     <cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index 9611a5593..e740f71ff 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.08.08 14:35">
 
   <cd:variables>
     <cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 2b623712e..8705ff11f 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.08.08 14:35">
 
   <cd:variables>
     <cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index afdee8099..1f78f000e 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.08.08 14:35">
 
   <cd:variables>
     <cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 3a6de75a1..1de46baa0 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.08.08 14:35">
 
   <cd:variables>
     <cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 5fccd10a7..eac4f545d 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.08.08 14:35">
 
   <cd:variables>
     <cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index f1194cf49..2bf0b1792 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.08.08 14:35">
 
   <cd:variables>
     <cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/sample/ward.tex b/tex/context/sample/ward.tex
index a95b90f5f..f73b62a58 100644
--- a/tex/context/sample/ward.tex
+++ b/tex/context/sample/ward.tex
@@ -2,4 +2,4 @@ The Earth, as a habitat for animal life, is in old age and
 has a fatal illness. Several, in fact. It would be happening
 whether humans had ever evolved or not. But our presence is
 like the effect of an old|-|age patient who smokes many packs
-of cigarettes per day |.| and we humans are the cigarettes.
\ No newline at end of file
+of cigarettes per day |=| and we humans are the cigarettes.
-- 
cgit v1.2.3