summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-08-24 15:20:23 +0300
committerMarius <mariausol@gmail.com>2013-08-24 15:20:23 +0300
commitbf235a901844972cf6c64df72153b7b85d26aacc (patch)
treeadd14c528e1d4b461d6b82bc0d6fdc97fa56bbf0 /scripts
parentb35a62a09c7bbe13669634671c195748559b1e98 (diff)
downloadcontext-bf235a901844972cf6c64df72153b7b85d26aacc.tar.gz
beta 2013.08.24 13:59
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-fonts.lua6
-rw-r--r--scripts/context/lua/mtx-plain.lua7
2 files changed, 10 insertions, 3 deletions
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua
index b171dd611..745f7b90a 100644
--- a/scripts/context/lua/mtx-fonts.lua
+++ b/scripts/context/lua/mtx-fonts.lua
@@ -132,9 +132,9 @@ function fonts.names.statistics()
end
-function fonts.names.simple()
+function fonts.names.simple(alsotypeone)
local simpleversion = 1.001
- local simplelist = { "ttf", "otf", "ttc", "dfont" }
+ local simplelist = { "ttf", "otf", "ttc", "dfont", alsotypeone and "afm" or nil }
local name = "luatex-fonts-names.lua"
local path = file.collapsepath(caches.getwritablepath("..","..","generic","fonts","data"))
fonts.names.filters.list = simplelist
@@ -182,7 +182,7 @@ end
function scripts.fonts.reload()
if getargument("simple") then
- fonts.names.simple()
+ fonts.names.simple(getargument("typeone"))
else
fonts.names.load(true,getargument("force"))
end
diff --git a/scripts/context/lua/mtx-plain.lua b/scripts/context/lua/mtx-plain.lua
index f43dcdeaf..d10c21375 100644
--- a/scripts/context/lua/mtx-plain.lua
+++ b/scripts/context/lua/mtx-plain.lua
@@ -24,6 +24,7 @@ local helpinfo = [[
<category name="basic">
<subcategory>
<flag name="make"><short>create format file</short></flag>
+ <flag name="fonts"><short>create plain font database</short></flag>
<flag name="run"><short>process file</short></flag>
<flag name="format" value="string"><short>format name (default: luatex-plain)</short></flag>
<flag name="engine" value="string"><short>engine to use (default: luatex)</short></flag>
@@ -105,6 +106,10 @@ function scripts.plain.run(texengine,texformat,filename)
execute('%s --fmt=%s "%s"',texengine,file.removesuffix(texformat),filename)
end
+function scripts.plain.fonts()
+ execute('mtxrun --script fonts --reload --simple --typeone')
+end
+
local texformat = environment.arguments.texformat or environment.arguments.format
local texengine = environment.arguments.texengine or environment.arguments.engine
@@ -122,6 +127,8 @@ if environment.arguments.exporthelp then
application.export(environment.arguments.exporthelp,filename)
elseif environment.arguments.make then
scripts.plain.make(texengine,texformat)
+elseif environment.arguments.fonts then
+ scripts.plain.fonts()
elseif filename then
scripts.plain.run(texengine,texformat,filename)
else