LaTeX source shown below (test.tex) which uses "Noto Sans CJK SC" and "Noto Sans Mono CJK SC" fonts via the xeCJK package doesn't compile with xelatex+xdvipdfmx when google-noto-sans-cjk-vf-fonts is installed in addition to google-noto-sans-cjk-fonts. With only google-noto-sans-cjk-fonts is installed, "xelatex test.tex" works fine. Reproducible: Always Steps to Reproduce: 1. Install google-noto-sans-cjk-fonts, google-noto-sans-mono-cjk-fonts, google-noto-sans-cjk-vf-fonts, and google-noto-sans-mono-cjk-vf-fonts, as well as texlive packages necessary for xelatex including texlive-xetex and texlive-ctex. 2. Run "xelatex test.tex", with test.tex shown below test.tex ------------------------------------------- \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{Noto Sans CJK SC} \setCJKmonofont{Noto Sans Mono CJK SC} \begin{document} 中文 \LaTeX 示例。 {\ttfamily 中文 \LaTeX 示例。 } \end{document} ------------------------------------------- Actual Results: xelatex+xdvipdfmx ends up in an error: ------------------------------------------- xdvipdfmx:fatal: Invalid TTC index number No output PDF file written. ) Error 256 (driver return code) generating output; file test.pdf may not be valid. Transcript written on test.log. ------------------------------------------- In test.log, there are info level messages which might be of interest: ------------------------------------------- Package fontspec Info: Could not resolve font "Noto Sans CJK SC/BI" (it (fontspec) probably doesn't exist). Package fontspec Info: Could not resolve font "Noto Sans CJK SC/B" (it (fontspec) probably doesn't exist). Package fontspec Info: Could not resolve font "Noto Sans CJK SC/I" (it (fontspec) probably doesn't exist). ----------------------------- Expected Results: As I also have non-variable fonts of google-noto-sans-cjk-fonts and google-noto-sans-mono-cjk-fonts installed, XeTeX would use the non-variable font and generate a PDF without error. I'm suspecting that XeTeX engine doesn't expect the mere presence of -VF fonts whose advertised font names (string) are the same as the non-VF fonts and generates bogus test.xdv which causes the error of xdvipdfmx. My question is: Can I hide the -VF fonts from XeTeX by tweaking fontconfig's per-user setting without removing those -vf packages system wide? Longer term, I guess it would be ideal to teach XeTeX to ignore -VF fonts. I have no idea if such an update is possible, though.
I guess the face index of named instance can be checked with the FT_IS_NAMED_INSTANCE macro. URL: https://freetype.org/freetype2/docs/reference/ft2-font_testing_macros.html#ft_is_named_instance Could you help to report this issue to the XeTeX upstream?
(In reply to Peng Wu from comment #1) > I guess the face index of named instance can be checked with the > FT_IS_NAMED_INSTANCE macro. > > URL: > https://freetype.org/freetype2/docs/reference/ft2-font_testing_macros. > html#ft_is_named_instance > > Could you help to report this issue to the XeTeX upstream? Sorry for the late response. I did some homework on this issue. Now I believe what is wrong in the first place is Fedore permits coexistence of static (google-noto-sans-cjk-fonts) and variable (google-noto-sans-cjk-vf-fonts), both of which advertise them as "Noto Sans CJK SC", "Noto Sans CJK TC", etc. Instead, google-noto-sans-cjk-vf-fonts should advertise it as, say, "Noto Sans CJK VF SC", "Noto Sans CJK VF TC", etc., so that fontspec would not see variable fonts while discovering "Noto Sans CJK SC", "Noto Sans CJK TC", etc.) even if they coexist with static fonts. I understand those font-family names came from upstream Google Noto CJK fonts, but I think Fedora as a distribution should not have blindly accepted such wrong convention which can break unprepared consumers of static fonts, not limited to XeLaTeX/fontspec. So I'd like you to take my words seriously and consider changing variable font packages so that they stop advertising same family names as the static ones. I do observe similar deployment of problematic variable font packages: google-noto-*-vf-fonts I really hope that you would report this issue to the Google Noto Font project and eventually to fix the wrong family names used in variable fonts under Google Fonts. To be clear, I'm not going to help you in reporting to XeTeX upstream or fontspec. In the meantime, it is possible to denylist variable fonts by enabling per-user command-local fontconfg setting as done in the Linux kernel documentation subsystem. The workaround is included in the pull request of documentation update for Linux v6.10: https://lore.kernel.org/r/87fruqc37u.fsf@meer.lwn.net/ , if you are interested. An example of well-behaved deployment of variable font: TeX Live 2024 now has a package named junicodevf, which is advertised as "Junicode VF". On the other hand, junicode package advertises it as "Junicode". (Looks like there is no texlive-junicodevf package for Fedora 40 yet.) Junicode documentation ("3. Getting Started with Junicode" in [1]) mentions variable fonts as quoted below: Because the static and variable versions of Junicode are differently named (“Junicode” and “Junicode VF”), both can be installed on the same system. How- ever, you should choose one or the other for any particular project. ... [1]: http://mirrors.ctan.org/fonts/junicode/doc/JunicodeManual.pdf Regards, Akira
Subject looks not correct to me. The variable font is new technology comparatively (That said, it's been 8 years since it was announced publicly). I know it doesn't still work well on some application. However, this is not a font issue in general. This sort of issues should be reported to application side. > Longer term, I guess it would be ideal to teach XeTeX to ignore -VF fonts. > I have no idea if such an update is possible, though. That still sounds to me like a workaround unless there are any resons that they can't support the variable font. In any case, they should have correct code to deal with both fonts at least even though they are going to deny the variable font. > Instead, google-noto-sans-cjk-vf-fonts should advertise it as, say, "Noto Sans CJK VF SC", > "Noto Sans CJK VF TC", etc., so that fontspec would not see variable fonts while > discovering "Noto Sans CJK SC", "Noto Sans CJK TC", etc.) even if they coexist with > static fonts. No, that's not a good idea. they are same fonts in a broad sense and are supposed to render text in the same way. one can usually get same outcome on rendering for both fonts. this means one can change them seamlessly, without modifying their configurations if any. However, making such changes in family name breaks it. That is really a bad experience.
This message is a reminder that Fedora Linux 39 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '39'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 39 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
(In reply to Aoife Moloney from comment #4) > This message is a reminder that Fedora Linux 39 is nearing its end of life. > Fedora will stop maintaining and issuing updates for Fedora Linux 39 on > 2024-11-26. ... > Thank you for reporting this issue and we are sorry that we were not > able to fix it before Fedora Linux 39 is end of life. If you would still > like > to see this bug fixed and are able to reproduce it against a later version > of Fedora Linux, you are encouraged to change the 'version' to a later > version > prior to this bug being closed. I have a workaround for this issue, namely *deny listing* VF fonts for only xetex by activating a command specific fontconfig settings. Please feel free to close this. Thanks anyway...
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle. Changing version to 42.