Em Sun, 18 Feb 2024 18:58:47 +0900 Akira Yokosawa <akiyks@xxxxxxxxx> escreveu: > Hi Jon, > > A few comments on PDF of CJK docs. > > On Sat, 17 Feb 2024 14:29:24 -0700, Jonathan Corbet wrote: > > [...] > > > > The *other* problem is that PDF generation of the Chinese, Korean, or > > Japanese translations fails with: > > > > xdvipdfmx:fatal: Invalid TTC index number > > > > This, I am thinking, is likely some sort of F39 bug. xdvipdfmx is > > finding the CJK fonts just fine, but then something clearly goes wrong. > > I'll try to find the time to narrow that down and perhaps put in a > > proper bug report. > > I think this is because xdvipdfmx accesses NotoSansCJK-VF.ttc, which is > a variable font. xdvipdfmx/xetex can't work with such fonts (yet). > See note at the bottom for more info on variable fonts support. > > It sounds like you have google-noto-sans-cjk-vf-fonts installed on your > system besides google-noto-sans-cjk-fonts. > > What does > > fc-list | grep NotoSansCJK-VF.ttc > > say? > > I'm wondering why xdvipdfmx behaves that way despite the fontconfig > setting with: > > fc-match "Noto Sans CJK SC" > > returning: > > NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular" > > This might be a bug in xdvipdfmx worth reporting. Or there might > be glitches in the fontconfig setting. > > > Uninstalling google-noto-sans-cjk-vf-fonts (and > google-noto-serif-cjk-vf-fonts in case you have it) should resolve > the issue for you, that is if you can safely uninstall it/them. Tried the above on my desktop with Fedora 39: <snip> $ fc-list | grep NotoSansCJK-VF.ttc /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Bold /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Bold /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Bold /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Bold /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Bold /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Black /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Black /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Black /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Black /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Black /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Thin,Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Thin,Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Thin,Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Thin,Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Thin,Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Regular /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=DemiLight /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=DemiLight /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Light /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Light /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=DemiLight /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Medium /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=DemiLight /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=DemiLight /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Light /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Medium /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Light /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Light /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Medium /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Medium /usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Medium $ fc-match "Noto Sans CJK SC" NotoSansCJK-VF.ttc: "Noto Sans CJK SC" "Regular" $ sudo dnf remove google-noto-sans-cjk-vf-fonts google-noto-serif-cjk-vf-fonts -y ... Removed: default-fonts-cjk-sans-4.0-9.fc39.noarch default-fonts-cjk-serif-4.0-9.fc39.noarch google-noto-sans-cjk-vf-fonts-1:2.004-5.fc39.noarch google-noto-serif-cjk-vf-fonts-1:2.002-2.fc39.noarch Done! $ fc-list | grep NotoSansCJK-VF.ttc $ fc-match "Noto Sans CJK SC" Vera.ttf: "Bitstream Vera Sans" "Regular" </snip> Thanks, Mauro