Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Cc: x11@g.o, fonts@g.o, gnome@g.o, Kerin Millar <kfm@×××××××××.net>
Subject: Re: [gentoo-dev] [PATCH 1/5] font.eclass: introduce FONT_CONVERT_SFNT for converting old bitmap fonts
Date: Sat, 15 Oct 2022 03:34:07
Message-Id: F1DE01E1-FB7A-4FC8-934A-87CF65DFC7B1@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/5] font.eclass: introduce FONT_CONVERT_SFNT for converting old bitmap fonts by Sam James
1 > On 15 Oct 2022, at 04:09, Sam James <sam@g.o> wrote:
2 >
3 >> =x11-libs/pango-1.44 dropped support for old bitmap fonts. We can convert
4 > fonts from the legacy .bdf and .pcf formats into the OTB wrapper format
5 > using x11-apps/fonttosfnt.
6 >
7 > This commit adds FONT_CONVERT_SFNT which packages installing bitmap fonts
8 > can set to opt-in to conversion.
9 >
10 > Note that the font conversion isn't perfect -- it's good enough
11 > in many cases, but in some cases they may require tweaking
12 > via fontconfig to get pixel size right, antialiasing settings, ...
13 >
14 > Adds IUSE=+convert-sfnt to any ebuilds which set FONT_CONVERT_SFNT;
15 > enabled by default given discoverability of this issue may be difficult
16 > and presumably any font package enabling FONT_CONVERT_SFNT will be
17 > useless without it anyway.
18 >
19 > See also https://fedoraproject.org/wiki/BitmapFontConversion.
20 >
21 > Bug: https://bugs.gentoo.org/698922
22 > Thanks-to: Kerin Millar <kfm@×××××××××.net>
23 > Signed-off-by: Sam James <sam@g.o>
24 > ---
25 > eclass/font.eclass | 35 +++++++++++++++++++++++++++++++++++
26 > 1 file changed, 35 insertions(+)
27 >
28 > diff --git a/eclass/font.eclass b/eclass/font.eclass
29 > index 83636ac3fed5..4b7021ee0599 100644
30 > --- a/eclass/font.eclass
31 > +++ b/eclass/font.eclass
32 > [snip]
33
34 > +# @FUNCTION: font_convert_sfnt
35 > +# @DESCRIPTION:
36 > +# Converts .bdf and .pcf fonts detected within ${ED} to the OTB wrapper format
37 > +# using x11-apps/fonttosfnt. Handles optional .gz extension.
38 > +font_convert_sfnt() {
39 > + local file tmpfile
40 > +
41 > + while IFS= read -rd '' file; do
42 > + if [[ ${file} != *.gz ]] ; then
43
44 ==, which I'll fix locally.

Attachments

File name MIME type
signature.asc application/pgp-signature