summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-01 21:20:26 +0300
committerMarius <mariausol@gmail.com>2013-10-01 21:20:26 +0300
commita90bcf0dcd9265b64b65b1f874b39f4c75553137 (patch)
treed007448cf2bb55d05ce160873cafd508e1069d8b /tex
parentf861bacd6096d49a91faaeb5298864416e59bf8b (diff)
downloadcontext-a90bcf0dcd9265b64b65b1f874b39f4c75553137.tar.gz
beta 2013.10.01 20:08
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4118 -> 4105 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/meta-fnt.lua131
-rw-r--r--tex/context/base/status-files.pdfbin24733 -> 24732 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
7 files changed, 77 insertions, 62 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 5b54b459f..c1008d722 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{2013.10.01 19:00}
+\newcontextversion{2013.10.01 20:08}
%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
index 224eaeec1..e62eb1541 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 20ba815f4..674f8a2bf 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.10.01 19:00}
+\edef\contextversion{2013.10.01 20:08}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/meta-fnt.lua b/tex/context/base/meta-fnt.lua
index 0ebe8e0dc..3d13b0b34 100644
--- a/tex/context/base/meta-fnt.lua
+++ b/tex/context/base/meta-fnt.lua
@@ -26,7 +26,7 @@ metapost.fonts = metapost.fonts or { }
-- a few glocals
local characters, descriptions = { }, { }
-local factor, code, slot, width, height, depth, total, variants = 100, { }, 0, 0, 0, 0, 0, 0, true
+local factor, code, slot, width, height, depth, total, variants, bbox, llx, lly, urx, ury = 100, { }, 0, 0, 0, 0, 0, 0, true, 0, 0, 0, 0
-- The next variant of ActualText is what Taco and I could come up with
-- eventually. As of September 2013 Acrobat copies okay, Summatra copies a
@@ -48,9 +48,13 @@ end
-- end
local flusher = {
- startfigure = function(chrnum,llx,lly,urx,ury)
+ startfigure = function(_chr_,_llx_,_lly_,_urx_,_ury_)
code = { }
- slot = chrnum
+ slot = _chr_
+ llx = _llx_
+ lly = _lly_
+ urx = _urx_
+ ury = _ury_
width = urx - llx
height = ury
depth = -lly
@@ -70,7 +74,7 @@ local flusher = {
width = width * 100,
height = height * 100,
depth = depth * 100,
- boundingbox = { 0, -depth, width, height },
+ boundingbox = { llx, lly, urx, ury },
}
if inline then
characters[slot] = {
@@ -95,63 +99,74 @@ local flusher = {
}
local function process(mpxformat,name,instances,scalefactor)
- statistics.starttiming(metapost.fonts)
- scalefactor = scalefactor or 1
- instances = instances or metapost.fonts.instances or 1
- local fontname = file.removesuffix(file.basename(name))
- local hash = file.robustname(formatters["%s %05i %03i"](fontname,scalefactor*1000,instances))
- local lists = containers.read(mpfonts.cache,hash)
- if not lists or lists.version ~= version then
- statistics.starttiming(flusher)
- local data = io.loaddata(resolvers.findfile(name))
- metapost.reset(mpxformat)
- metapost.setoutercolor(2) -- no outer color and no reset either
- lists = { }
- for i=1,instances do
- characters = { }
- descriptions = { }
- metapost.process(
- mpxformat,
- {
- formatters["randomseed := %s ;"](i*10),
- formatters["charscale := %s ;"](scalefactor),
- data,
- },
- false,
- flusher,
- false,
- false,
- "all"
- )
- lists[i] = {
- characters = characters,
- descriptions = descriptions,
- parameters = {
- designsize = 655360,
- slant = 0,
- space = 333 * scalefactor,
- space_stretch = 166.5 * scalefactor,
- space_shrink = 111 * scalefactor,
- x_height = 431 * scalefactor,
- quad = 1000 * scalefactor,
- extra_space = 0,
- },
- properties = {
- name = formatters["%s-%03i"](hash,i),
- virtualized = true,
- spacer = "space",
+ local filename = resolvers.findfile(name)
+ local attributes = filename and lfs.isfile(filename) and lfs.attributes(filename)
+ if attributes then
+ statistics.starttiming(metapost.fonts)
+ scalefactor = scalefactor or 1
+ instances = instances or metapost.fonts.instances or 1 -- maybe store in liost too
+ local fontname = file.removesuffix(file.basename(name))
+ local modification = attributes.modification
+ local filesize = attributes.size
+ local hash = file.robustname(formatters["%s %05i %03i"](fontname,scalefactor*1000,instances))
+ local lists = containers.read(mpfonts.cache,hash)
+ if not lists or lists.modification ~= modification or lists.filesize ~= filesize or lists.instances ~= instances or lists.scalefactor ~= scalefactor then
+ statistics.starttiming(flusher)
+ local data = io.loaddata(filename)
+ metapost.reset(mpxformat)
+ metapost.setoutercolor(2) -- no outer color and no reset either
+ lists = { }
+ for i=1,instances do
+ characters = { }
+ descriptions = { }
+ metapost.process(
+ mpxformat,
+ {
+ formatters["randomseed := %s ;"](i*10),
+ formatters["charscale := %s ;"](scalefactor),
+ data,
+ },
+ false,
+ flusher,
+ false,
+ false,
+ "all"
+ )
+ lists[i] = {
+ characters = characters,
+ descriptions = descriptions,
+ parameters = {
+ designsize = 655360,
+ slant = 0,
+ space = 333 * scalefactor,
+ space_stretch = 166.5 * scalefactor,
+ space_shrink = 111 * scalefactor,
+ x_height = 431 * scalefactor,
+ quad = 1000 * scalefactor,
+ extra_space = 0,
+ },
+ properties = {
+ name = formatters["%s-%03i"](hash,i),
+ virtualized = true,
+ spacer = "space",
+ }
}
- }
+ end
+ lists.version = metapost.variables.fontversion or "1.000"
+ lists.modification = modification
+ lists.filesize = filesize
+ lists.instances = instances
+ lists.scalefactor = scalefactor
+ metapost.reset(mpxformat) -- saves memory
+ lists = containers.write(mpfonts.cache, hash, lists)
+ statistics.stoptiming(flusher)
end
--- inspect(lists)
- lists.version = metapost.variables.fontversion or "1.000"
- metapost.reset(mpxformat) -- saves memory
- lists = containers.write(mpfonts.cache, hash, lists)
- statistics.stoptiming(flusher)
+ variants = variants + #lists
+ statistics.stoptiming(metapost.fonts)
+ return lists
+ else
+ return { }
end
- variants = variants + #lists
- statistics.stoptiming(metapost.fonts)
- return lists
end
metapost.fonts.flusher = flusher
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 3825c5148..2f5997597 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log
index be7dbe7e1..f2a3738c2 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.10.01 19:00 MKIV beta fmt: 2013.10.1 int: english/english
+ConTeXt ver: 2013.10.01 20:08 MKIV beta fmt: 2013.10.1 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 62f1b874c..ef78f0ef8 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 : 10/01/13 19:00:22
+-- merge date : 10/01/13 20:08:43
do -- begin closure to overcome local limits and interference