reutenauer / polyglossia

An alternative to Babel for XeLaTeX and LuaLaTeX
http://www.ctan.org/pkg/polyglossia
MIT License
185 stars 52 forks source link

Missing cjkfont error incorrect #621

Closed bjhijmans closed 4 months ago

bjhijmans commented 6 months ago

I upgraded to 1.66, and I got the following error that I didn't have before:

 Package polyglossia Error: The current latin roman font does not contain the 
"CJK" script!
(polyglossia)                Please define \cJKfont with \newfontfamily command

I was confused because I did define \cJKfont. Turns out it's now \cjkfont with lowercase letters. Thankfully, I figured it out pretty quickly, but the error could lead people astray.

Udi-Fogiel commented 6 months ago

Thanks for the report. @jspitz it is caused by https://github.com/reutenauer/polyglossia/commit/3ae354adb75176fa5419c0bc7ab35a3e17a5fc6c, can you have a look?

jspitz commented 6 months ago

The lowercasing of just the first token in the string was always a bug that forgot about the possibility of acronyms such as CJK (that haven't been used when that code was introduced).

But then, the odd cJK is now in the world, so we could either

What is your preference?

jspitz commented 6 months ago

At least the error message is now correct.

reutenauer commented 6 months ago

On Sat, Dec 16, 2023 at 03:55:06AM -0800, Jürgen Spitzmüller wrote:

But then, the odd cJK is now in the world, so we could either

  • add an alias in case \cjkfont is beeing defined (a bit kludgy, but well) or
  • keep things as they are and force users to change their setting (which they need to do now anyway unless we released a hotfix version, which is probably risky given all the heavy code rewrite now underway).

What is your preference?

You didn’t ask me, but definitely the latter :-)

Arthur
jspitz commented 6 months ago

Thanks, let's mark this resolved, then.

Udi-Fogiel commented 6 months ago

What is your preference?

I agree with Arthur.