diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-05-29 09:35:02 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-05-29 09:35:02 +0000 |
commit | bad9348a29610a5030b0ff1da29174f9fe2dbc98 (patch) | |
tree | 1a27079839d052f5b5760ec698e7d708a779a2c5 /Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua | |
parent | e62580242146a93f7836af785779cfd1a79e0ce1 (diff) |
luaotfload update (2010/05/28 v1.08a)
git-svn-id: svn://tug.org/texlive/trunk@18578 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua')
-rwxr-xr-x | Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua b/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua index 161080d740d..5eac9ae06af 100755 --- a/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua +++ b/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua @@ -16,11 +16,10 @@ require("alt_getopt") local name = 'mkluatexfontdb' local version = '1.07' -- same version number as luaotfload -mkluatexfontdb = { } -- just for now, elie is rewriting it anyway local names = fonts.names -- the directory in which the database will be saved, can be overwritten -mkluatexfontdb.directory = names.path.localdir +local output_directory = names.path.localdir local log = logs.report @@ -43,6 +42,24 @@ Valid options: -V --version print version and exit -h --help print this message +Fonts are found on Windows or Linux with fontconfig (i.e., using fc-list). + +On Mac OS X, only fonts located in the following standard font locations are +included in the font database: + ~/Library/Fonts /Library/Fonts + /System/Library/Fonts /Network/Library/Fonts +In particular, fonts installed in other locations with "Font Book" will not +be available. + +Rather than using fontconfig or, in Mac OS X, searching the default font +locations, you may specify where fonts are located by setting the OSFONTDIR +environment variable. Doing so will override the use of fontconfig or +scanning the system font locations. If you wish to continue to include them +while also including other font locations, simply include them in the list. +For example (using a bash shell), + + export OSFONTDIR='/path/to/other/fonts:/Users/will/Library/Fonts:...' + The output database file is named otfl-fonts.lua. By default it is placed in $TEXMFVAR/luatex/generic/luaotfload/names. ]], name)) @@ -112,36 +129,28 @@ local function process_cmdline() help_msg() os.exit(0) elseif v == "d" then - mkluatexfontdb.directory = optarg [i] + output_directory = optarg [i] elseif v == "f" then force_reload = 1 elseif v == "fc-cache" then run_fc_cache = 1 elseif v == "sys" then - mkluatexfontdb.directory = names.path.systemdir + output_directory = names.path.systemdir end end if string.match(arg[0], '-sys') then - mkluatexfontdb.directory = names.path.systemdir + output_directory = names.path.systemdir end - mkluatexfontdb.directory = fonts.path_normalize(mkluatexfontdb.directory) + output_directory = fonts.path_normalize(output_directory) names.set_log_level(log_level) end process_cmdline() do_run_fc_cache(run_fc_cache) --- the status table is containing correspondances between absolute path and last modification --- timestamp, it's uses to save time during update, by not reparsing unchanged fonts. -local status = nil -local status_file = mkluatexfontdb.directory .. "/otfl-names-status.lua" -if not force_reload and file.isreadable(status_file) then - status = dofile(status_file) -end - local function generate(force) log("generating font names database.") - local savepath = mkluatexfontdb.directory + local savepath = output_directory if not lfs.isdir(savepath) then log("creating directory %s", savepath) dir.mkdirs(savepath) @@ -163,11 +172,10 @@ local function generate(force) else fontnames = nil end - fontnames, status = names.update(fontnames, status, force) + fontnames = names.update(fontnames, force) log("%s fonts in the database", #fontnames.mappings) io.savedata(savepath, table.serialize(fontnames, true)) log("saved font names database in %s\n", savepath) - io.savedata(status_file, table.serialize(status, true)) end generate(force_reload) |