xdanaux / moderncv

A modern curriculum vitae class for LaTeX
1.8k stars 556 forks source link

Drop \IfFileExists #73

Open moewew opened 6 years ago

moewew commented 6 years ago

While \IfFileExists can be helpful to avoid error messages due to non-existent files (think self-made auxiliary files), it can have serious drawbacks when used for package loading. As currently used, packages will be skipped over if they are not found. This means that two documents with the same code can have significantly different output on different installations. Granted, there is always a chance that things look slightly different if compiled with different package installations, but since the class currently does \IfFileExists with font packages, the impact can be huge.

Since there are no error messages or warnings, the files will just silently look different and confuse people. Case in point: https://tex.stackexchange.com/q/446425/35864

So I suggest to drop the \IfFileExists test when loading font packages. If you want the font, load it directly, be upfront about it. If you want your users to be able to use the files even without the default font packages, an option to disable font loading seems more sensible, since it lets people actively decide to opt in or out.