Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uppercase/lowercase font name #6

Closed
u-fischer opened this issue Jun 26, 2018 · 9 comments
Closed

uppercase/lowercase font name #6

u-fischer opened this issue Jun 26, 2018 · 9 comments

Comments

@u-fischer
Copy link
Owner

@u-fischer u-fischer commented Jun 26, 2018

See lualatex/luaotfload#417

@zauguin
Copy link
Collaborator

@zauguin zauguin commented Jun 26, 2018

@u-fischer I just pushed a patched luaotfload-database.lua which is supposed to fix this. I do not have a Windows system through, so please test it and report back.

@u-fischer
Copy link
Owner Author

@u-fischer u-fischer commented Jun 26, 2018

It works fine on windows. But I made a testfile latex-font-lower-uppercase-filename.lvt and it fails on travis. As far as I can see \font\testb={file:firamono-regular.otf} is not found. Is this expected on linux? Is is necessary to use the correct casing for file names?

@zauguin
Copy link
Collaborator

@zauguin zauguin commented Jun 26, 2018

@u-fischer This is expected on non-Windows systems. (Most) Linux filesystems are not case-sensitive, so ignorging the case would make some font inaccessible if their names only differ by case.
Also most Linux users would not expect this to work.

@u-fischer
Copy link
Owner Author

@u-fischer u-fischer commented Jun 26, 2018

@zauguin yes, I know that linux is case-sensitive. But in context all font/file names are normalized to lowercase/without spaces/without hyphen. E.g. in the names.tma I find entries like the following (don't ask why texlive/2017, I have forgotten how I added it to context).

["firamonobold.otf"]="D:/texlive/2017/texmf-dist/fonts/opentype/public/fira/FiraMono-Bold.otf",

So I wonder if it would be sensible behaviour for luaotfload too. (But for now I will remove the case insensitive test, to avoid the travis failure).

@zauguin
Copy link
Collaborator

@zauguin zauguin commented Jun 26, 2018

Methods for sanitizing the names like this are already implemented for fontnames, they would be quite easy to adapt to filenames.
But I do not think it is very useful: If an explicit filename is given, I would expect the user to have a specific file in mind. Then specifying another name would be odd. Also debugging can be very hard if the name is normalized too much. If I would have a problem with the font firamonobold.otf and I can't find a file with that name on my system, I would be at least confused. (Let's hope that nobody would write the filename as Firamo-NoBold.otf)

On the other hand I do not think sanitizing the names would break any real life use case, so I would be open to do it anyway if you think it is sensible.

@u-fischer
Copy link
Owner Author

@u-fischer u-fischer commented Jun 26, 2018

well I don't like the idea to sanitize hyphens or space away, lower/upper case sounds sensible but this is perhaps my windows view. I will ask in the chat.

@u-fischer
Copy link
Owner Author

@u-fischer u-fischer commented Jun 26, 2018

@zauguin Looks as if case insensitivity is not a bad idea "especially since kpathsea recently changed to do case insensitive searches in other contexts" and "best would be if you could honour the texmf_casefold_search configuration option (but just always doing a case insensitive lookup probably works in practice)".

@zauguin
Copy link
Collaborator

@zauguin zauguin commented Jun 26, 2018

@u-fischer The new version uses a case-insensitive lookup, iff a case-sensitive lookup does not find anything in a particular location. This is similar to kpathsea.

@u-fischer
Copy link
Owner Author

@u-fischer u-fischer commented Jun 28, 2018

@zauguin looks good (but as I'm windows I can't make real tests here). I also run the tests from the fontspec and unicode-math testsuite and while there are number of failures none of them seem to be related to the code changes ;-).

@u-fischer u-fischer closed this Jul 6, 2018
u-fischer pushed a commit to latex3/luaotfload that referenced this issue Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants