All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: linux-doc@vger.kernel.org, "Akira Yokosawa" <akiyks@gmail.com>,
	"Иван Иванович" <relect@bk.ru>,
	"Randy Dunlap" <rdunlap@infradead.org>
Subject: Re: [PATCH v2] docs: Detect variable fonts and suggest denylisting them
Date: Wed, 10 Apr 2024 14:52:37 -0600	[thread overview]
Message-ID: <87le5lszxm.fsf@meer.lwn.net> (raw)
In-Reply-To: <20240406020416.25096-1-akiyks@gmail.com>

Akira Yokosawa <akiyks@gmail.com> writes:

> Fedora and openSUSE has started deploying "variable font" [1] format
> Noto CJK fonts [2, 3].  "CJK" here stands for "Chinese, Japanese,
> and Korean".
>
> Unfortunately, XeTeX/XeLaTeX doesn't understand those fonts for
> historical reasons and builds of translations.pdf end up in errors
> if such fonts are present on the build host.
>
> To help developers work around the issue, add a script to check the
> presence of "variable font" Noto CJK fonts and to emit suggestions.
> The script is invoked in the error path of "make pdfdocs" so that the
> suggestions are made only when a PDF build actually fails.
>
> The first suggestion is to denylist those "variable font" files by
> activating a per-user and command-local fontconfig setting.
>
> For further info and backgrounds, please refer to the header comment
> of scripts/check-variable-font.sh newly added in this commit.
>
> Link: [1] https://en.wikipedia.org/wiki/Variable_font
> Link: [2] https://fedoraproject.org/wiki/Changes/Noto_CJK_Variable_Fonts
> Link: [3] https://build.opensuse.org/request/show/1157217
> Reported-by: Jonathan Corbet <corbet@lwn.net>
> Link: https://lore.kernel.org/r/8734tqsrt7.fsf@meer.lwn.net/
> Reported-by: "Иван Иванович" <relect@bk.ru>
> Link: https://lore.kernel.org/linux-doc/1708585803.600323099@f111.i.mail.ru/
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> ---
> Changes in v2:
>
> - Stop suggesting removal of variable-font packages. (Jon)
> - Rewrite changelog and add a couple of links for reference. (Randy)
> - Suggest denylisting "variable font" files for XeLaTeX in "make pdfdocs"
>   as a less invasive option.
> - Simplify message from check-variable-font.sh and expand the header
>   comments of the script.
> - Add template of fonts.conf for denylisting in the header comments.
> - Add rules for activating the XeLaTeX only fonts.conf in
>   Documentation/Makefile.

Thanks for working on this.

I've verified that the message comes up at the right time (though before
waiting a half-hour for things to fail would be better :) and that
following the advice in the script makes the build work.  I *did* have
to do a "make cleandocs" after adding the fonts.conf file, though,
before the build would succeed.

So I've applied this, for now at least, but I do wonder: might it be
better to stash this fonts.conf file in-tree somewhere and just pull it
in automatically?  Would that create problems for anybody if we were to
do so?  That might be a bit nicer than failing and making people set up
the workaround on their own.

Meanwhile, it occurred to me that it would be good to let the Fedora
folks know that this breaks, so I've filed a bug there; we'll see if
they have any thoughts on the matter as well.

Thanks,

jon

  reply	other threads:[~2024-04-10 21:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-23 12:02 [PATCH] docs: Detect variable fonts and suggest removing them Akira Yokosawa
2024-03-23 14:55 ` Randy Dunlap
2024-03-24  0:05   ` Akira Yokosawa
2024-03-24  0:34     ` Randy Dunlap
2024-03-29 14:35 ` Jonathan Corbet
2024-03-29 15:00   ` Akira Yokosawa
2024-04-06  2:04 ` [PATCH v2] docs: Detect variable fonts and suggest denylisting them Akira Yokosawa
2024-04-10 20:52   ` Jonathan Corbet [this message]
2024-04-10 22:57     ` Akira Yokosawa
2024-04-10 23:36       ` 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=87le5lszxm.fsf@meer.lwn.net \
    --to=corbet@lwn.net \
    --cc=akiyks@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=relect@bk.ru \
    /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.