All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	linux-doc@vger.kernel.org
Subject: Re: PDF misery
Date: Sun, 18 Feb 2024 11:17:52 +0100	[thread overview]
Message-ID: <20240218111752.45cd9b8a@coco.lan> (raw)
In-Reply-To: <64908dd3-17c9-47e3-a076-d78105fb823b@gmail.com>

Em Sun, 18 Feb 2024 18:58:47 +0900
Akira Yokosawa <akiyks@gmail.com> 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

  reply	other threads:[~2024-02-18 10:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 21:29 PDF misery Jonathan Corbet
2024-02-18  0:40 ` Mauro Carvalho Chehab
2024-02-18  9:58 ` Akira Yokosawa
2024-02-18 10:17   ` Mauro Carvalho Chehab [this message]
2024-02-19 17:49   ` Jonathan Corbet
2024-02-18 10:08 ` Vegard Nossum
2024-02-18 13:07   ` Vegard Nossum
2024-02-18 15:49 ` Akira Yokosawa
2024-02-18 19:57   ` Mauro Carvalho Chehab
2024-02-18 22:15   ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240218111752.45cd9b8a@coco.lan \
    --to=mchehab@kernel.org \
    --cc=akiyks@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.