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

More explanatory warning with language-not-exist #421

Closed
jbezos opened this issue May 9, 2020 · 4 comments
Closed

More explanatory warning with language-not-exist #421

jbezos opened this issue May 9, 2020 · 4 comments

Comments

@jbezos
Copy link

jbezos commented May 9, 2020

Many people seem puzzled by the message displayed when a certain language doesn't exist, and they even think it's an error. While the message in necessary, because it's relevant for some languages, it could be more informative, with something like:

Package fontspec Warning: Language 'Thai' not available for font 'FreeSerif'
(fontspec)                with script 'Thai'. There is nothing intrinsically wrong with
(fontspec)                this warning, and if the output is as expected, you can
(fontspec)                ignore it.
@jbezos
Copy link
Author

jbezos commented Sep 6, 2020

@wspr I've noticed some people is rejecting babel because of this message, which leads them to think the babel language is not available and therefore not useable. Please, can you provide some advice about what can I do to improve the situation? I'm trying to conceal it, but I haven't managed to do it yet. I'm even considering forcing the quiet mode, which is clearly a bad idea, but anyway better than showing this misleading message.

@wspr
Copy link
Collaborator

wspr commented Sep 9, 2020

Sorry I overlooked this previously. Probably a better option (?) is to check if the language/script is present and only load it if so. There should be enough commands in the API section of the manual to do this without delving into fontspec internals. If you think that's clunky, I could also add something like TryLanguage={...} or Language*={...} which has the same behaviour but doesn't call the warning. Or I could drop the warning all together but default and add a new LanguageStrict={...} key instead. What do you think would be best?

@jbezos
Copy link
Author

jbezos commented Sep 10, 2020

I haven't found a way to check if a language is available without actually loading before the font with some other settings. A message is fine, but not with Language XXX not available because most people knows nothing about font languages and some even think it refers to the babel language. Perhaps an info instead a warning and/or a message like that above or, in more positive terms something like:

      Font '\l_fontspec_fontname_tl' is using the default
      features because there are no specific ones for
      language '##1'.
      That's usually fine, because many languages
      require no specific features, but if the output is
      not as expected, consider selecting another font.

@jbezos
Copy link
Author

jbezos commented Dec 19, 2021

This is just a reminder, because many people clearly think there is something wrong when this warning is shown.

@wspr wspr closed this as completed in 0469638 May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants