Closed wspr closed 14 years ago
You can also trigger the same results by removing the brackets entirely. But shouldn't it check for a filename before querying the database? And even if it does need to go to the database, it should be found in there—the rebuilding is still unnecessary.
If you don't have a file:
keyword, the font selection will go through the resolver function which first trays to find font by name, then trays to rebuild the database and look again, then just returns the requested font name as is.
file:
bypasses this altogether.
The square brackets syntax should be equivalent to using file:
, it seems not to be robust enough. I'll try to see what is wrong (I don't fully understand the lpeg stuff that Hans is using).
To be in safe side, I suggest that fontspec always set keyword, either name:
or file:
and not depend on the square brackets, also using curly brackets for grouping is the native luatex syntax.
Sorry, this lpeg stuff is beyond me, the code is in otfl-font-xtx.lua
for any one interested.
This is fixed now.
With the following document, everything works fine:
When you add an
.otf
extension, however, the database is rebuilt:But I think using the
file:
syntax doesn't cause the database to be rebuilt.