summaryrefslogtreecommitdiff
path: root/otfl-font-nms.lua
Commit message (Collapse)AuthorAgeFilesLines
* SimplifyKhaled Hosny2010-05-161-1/+1
| | | | | | | If it isn't a font collection file (which is true if we reach here) then the index always == 1. As a side effect, fixes a mysterious bug with --no-shell-escape causing all files to have empty index and the same timestamp.
* SimplifyKhaled Hosny2010-05-161-2/+1
|
* Tolerate not being able to run |fc-list|Khaled Hosny2010-05-161-10/+12
| | | | | This will avoid the error message, but also no system fonts will be scanned.
* Auto generate font names databaseKhaled Hosny2010-05-161-16/+16
| | | | | If no font names database is found, generate a new one. Broken unless luatex is run with "--shell-escape".
* Simplify the codeKhaled Hosny2010-05-161-34/+26
| | | | | The |status| table need not to reside in a separate file, it is now part of the font names database itself.
* Simplify the codeKhaled Hosny2010-05-161-8/+6
| | | | Always scan directories recursively, it doesn't harm.
* It's certainly better to scan the macos font dirs recursivelyElie Roux2010-05-151-1/+1
|
* Fixing a bug if OSFONTDIR is not emptyElie Roux2010-05-151-3/+19
| | | | | if OSFONTDIR was not empty, the texmf variable ended true and the filenames in the database were not complete.
* Attempt to fix the behaviour on macosxElie Roux2010-05-151-16/+40
| | | | | | Now if we are under macosx and if osfontdir is empty, we don't rely on fc-list to give us the system fonts, but we use some static directories.
* Adding an error when fontloader is unable to open a fontElie Roux2010-05-151-2/+5
|
* CosmeticsKhaled Hosny2010-05-141-13/+37
| | | | Avoid very long lines.
* Showing a log message only once (it used to be present 10s of times in the log)Elie Roux2010-05-111-1/+6
|
* Make sure the font exists on the diskKhaled Hosny2010-05-111-6/+14
| | | | | | | | Sometimes the database is outdated in the font no longer exits in the saved path, now we make sure the file exists before returning path to luatex. This way the user gets the good old "font not loadable" error, instead of mysterious backend error and program exit. Later we may try to update the database at this point.
* Skip names database for TFM fontsKhaled Hosny2010-05-111-0/+5
| | | | | | | if a tfm (or ofm) files exists with the same name, skip font names database. closes #3
* TypoKhaled Hosny2010-05-091-1/+1
|
* Change the default cache pathKhaled Hosny2010-04-271-2/+3
| | | | | Per Manuel's suggestion, we now use TEXMVAR/luatex/generic/luaotfload/ instead of TEXMVAR/luatex-cache/latex/.
* Fix loading subfontsKhaled Hosny2010-04-041-8/+7
| | | | | | | Previously, we relied in the fact that origname contains the subfont in the form of |foo.otf(subfoo)| and that luatex would then load the right font, but this is not what the rest of the code expects and cause some bugs. We now return the filename and subfont properly (i.e.separately).
* |table.insert()| is slowerKhaled Hosny2010-04-041-3/+3
| | | | The difference is negligible, but this make the code more consistent.
* Simplify a bitKhaled Hosny2010-04-041-11/+5
|
* Try fontname and ps fullname tooKhaled Hosny2010-04-021-1/+3
|
* Some cleanup + a bug fixKhaled Hosny2010-04-021-21/+18
| | | | | | | | If the family name is matching but no matching style, we would not return any thing, we now just return a random match (e.g. the user asks for XITS Math/Regular but gets XITS Math/Math), I hope in such rare cases there is only one match, else one is better giving proper style or fullname.
* Return the original name, not the normalised oneKhaled Hosny2010-04-021-1/+1
| | | | When we fallback to filename lookup, we should return the original name.
* Oops!Khaled Hosny2010-04-021-2/+2
|
* Check if kpse can find font names database firstKhaled Hosny2010-04-021-1/+4
| | | | This way we can load font names database from working directory etc.
* Clean database generation code a bitKhaled Hosny2010-04-021-62/+17
| | | | | Simplify the database and the code to reflect recent changes in font matching logic.
* Fix optical size matchingKhaled Hosny2010-04-021-15/+37
| | | | | | | | | | With the previous commit, if we don't found a font with the requested optical size, we return nothing, though we might have a matching font name. Now we store all matching names with no matching optical size and return the first one, then we return the closest match (i.e. if the requested size is 15pt and we have 10pt and 5pt match, we return the 10pt one).
* Rewrite font matching logic to be more consistentKhaled Hosny2010-04-021-52/+66
| | | | | | We now simply loop over the whole data.mappings table, so loading font by family, fullname, psname etc is all the same, but it is a bit slower now (~0.25s with syatemfonts.tex).
* Support loading fonts by fullnameKhaled Hosny2010-04-011-16/+15
| | | | Now, if we didn't find a matching family name, we then try fullname.
* Fix optical size with no range_top/bottomKhaled Hosny2010-04-011-9/+25
| | | | | Some fonts give only design size with no range, in this case we now will assume range top == range bottom == design size.
* Purge removed fonts by defaultKhaled Hosny2010-03-301-12/+4
| | | | | There is no performance difference, so it doesn't make sense to keep removed fonts in the database.
* Do garbage collectionKhaled Hosny2010-03-301-0/+1
| | | | Patch from Taco.
* Make sure names file exist before loading itKhaled Hosny2010-03-291-1/+6
| | | | To protect against lua complaining about non existing file.
* CosmeticsKhaled Hosny2010-03-281-24/+36
| | | | | Move function documentation inside the function block, and make multi-line documents look better.
* Make sanitize() Unicode friendlyKhaled Hosny2010-03-241-1/+2
|
* Make some frequently used functions localKhaled Hosny2010-03-241-7/+8
|
* Make font names case insensitiveKhaled Hosny2010-03-241-1/+3
|
* Change the default database directoryKhaled Hosny2010-03-241-2/+2
| | | | | Now $TEXMFVAR/luatex-cache/latex/names/ which looks more logical than $TEXMFVAR/scripts/luatexfontdb/.
* Fixing database generation under windowseroux2010-03-171-4/+3
|
* Make the loaded names database table globalKhaled Hosny2010-03-121-12/+13
| | | | + some cosmetics
* Isolate database loading code and clean it a bitKhaled Hosny2010-03-121-13/+18
|
* Check for windows not "not unix"Khaled Hosny2010-03-121-1/+1
|
* LUAROCKS_UNAME_S doesn't work in tex modeKhaled Hosny2010-03-121-18/+2
| | | | | Use os.type and os.name instead, if os.name doesn't return cygwin then luatex need to be fixed.
* CleanupKhaled Hosny2010-03-121-5/+86
| | | | | | | Group all our font names functions in |otfl-font-nms.lua| and make |luaotfload.lua| load it. Now |otfl-font-dum.lua| is an unmodified, we instead override the needed functions in the names module. This decreases the redundancy that we had.
* Oops...eroux2010-03-101-0/+3
|
* Making purge an non-default option and fixing log levelseroux2010-03-101-21/+52
| | | | | It seems that there is no performance regressions with purge... can you test, maybe it would be better to make it default?
* Improvements on the database and on the scripteroux2010-03-091-29/+41
| | | | | | | | | | | | * the info on a font now contains the checksum (might be needed for font caching) * very small optimizations in force mode * database version bumping * a new purge option (not taken into consideration yet) * new mechanism to remove old entries in the database without rebuilding everything, activated all the time but (for performance reasons) will be activated only with the purge options in the very near future.
* Now having version in status table tooeroux2010-03-011-3/+11
| | | | Also stronger checks on status
* Changing the checksum system to a timestamp systemeroux2010-03-011-16/+20
| | | | | | | - the status is now externalized in another file name (in the same directory), so that it's not loaded when just asking for a font - the status is now filename->last-modification-timestamp so that we don't have to checksum the files (much faster)
* Fixing small bugseroux2010-03-011-5/+4
|
* Rewrite loggingKhaled Hosny2010-03-011-34/+56
|