perfbook.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: Leonardo Bras <leobras.c@gmail.com>, perfbook@vger.kernel.org
Subject: Re: [PATCH -perfbook] gitlab-ci.yml: Add Liberation font families for PDF build
Date: Mon, 6 Feb 2023 09:26:50 -0800	[thread overview]
Message-ID: <20230206172650.GP2948950@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <34b60e3b-b9e3-f645-8fb1-9a3743314166@gmail.com>

On Mon, Feb 06, 2023 at 05:47:37PM +0900, Akira Yokosawa wrote:
> There are a couple of SVG files that use the "Liberation Sans" and
> "Liberation Mono" font families, namely defer/multver.svg (Figure 9.15)
> and memorder/Alpha.svg (Figure 15.17), among others.
> When those font families are not found, Inkscape falls back to
> whatever available ones with similar properties.
> 
> This dependency is not explicitly mentioned in FAQ-BUILD.txt,
> because they are installed as dependencies of required packages
> listed for Ubuntu and Fedora.
> 
> As for Arch Linux, "ttf-liberation" should cover them.
> 
> In Makefile, add check of these font families and advises on missing
> nice-to-have font packages.
> 
> Expand the answer to #9 in FAQ-BUILD.txt and explain these nice-to-
> have fonts for SVG figures.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> Cc: Leonardo Bras <leobras.c@gmail.com>

Queued and pushed, thank you!

							Thanx, Paul

> ---
>  FAQ-BUILD.txt           | 26 +++++++++++++++++++++++++-
>  Makefile                | 24 ++++++++++++++++++++++--
>  utilities/gitlab-ci.yml |  2 +-
>  3 files changed, 48 insertions(+), 4 deletions(-)
> 
> diff --git a/FAQ-BUILD.txt b/FAQ-BUILD.txt
> index 1ea9d92c90b0..a4d9d86d6ada 100644
> --- a/FAQ-BUILD.txt
> +++ b/FAQ-BUILD.txt
> @@ -122,7 +122,7 @@
>  	"nimbus15", "newtxtt", etc.; or an old version of font package
>  	"newtx".  How can I install or update them?
>  
> -	A.	First of all, building perfbook requires TeX Live 2017/Debian
> +	A-1.	First of all, building perfbook requires TeX Live 2017/Debian
>  		(Ubuntu Bionic) or later. If you are told you don't have
>  		"glossaries-extra" package, you need to upgrade your TeX
>  		installation.
> @@ -179,6 +179,30 @@
>  		On upstream TeX Live (assuming user mode installation):
>  			tlmgr install newtx
>  
> +	A-2.	Figures drawn using Inkscape and added in the SVG format
> +		need fonts accessible via the fontconfig scheme.
> +		The "Steel City Comic" font mentioned in #1 of FAQ.txt
> +		is one of such fonts and is mandatory.
> +		There are SVG figures which use other font families
> +		listed below:
> +
> +		  - DejaVu Sans Mono
> +		  - FreeMono
> +		  - Liberation Sans
> +		  - Liberation Mono
> +
> +		These are treated as "nice-to-have" fonts and even if
> +		some of them are missing, conversion of those figures into
> +		PDF can go on using fallback fonts.
> +		You will see info-level messages from make runs:
> +
> +		  Nice-to-have font family 'DejaVu Sans Mono' not found.
> +
> +		in .svg --> .pdf conversions if that happens.
> +
> +		As for Ubuntu and Fedora, packages listed in #5 should cover
> +		all the font families needed.
> +
>  10.	Building perfbook fails with a warning of buggy cleveref or
>  	version mismatch of epigraph.
>  	What can I do?
> diff --git a/Makefile b/Makefile
> index abcd7e2ce1cc..98c7c91b4be7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -125,6 +125,8 @@ NEWTXSF := $(findstring newtxsf,$(FONTPACKAGES))
>  INCONSOLATA := $(findstring inconsolata,$(FONTPACKAGES))
>  FREESANS := $(shell fc-list | grep FreeSans | wc -l)
>  DEJAVUMONO := $(shell fc-list | grep "DejaVu Sans Mono" | wc -l)
> +LIBERATIONSANS := $(shell fc-list | grep "Liberation Sans" | wc -l)
> +LIBERATINOMONO := $(shell fc-list | grep "Liberation Mono" | wc -l)
>  
>  # for line break in error text
>  define n
> @@ -151,6 +153,17 @@ ifeq ($(DEJAVUMONO),0)
>  else
>    RECOMMEND_DEJAVU := 0
>  endif
> +ifeq ($(LIBERATIONSANS),0)
> +  RECOMMEND_LIBERATIONSANS := 1
> +else
> +  RECOMMEND_LIBERATIONSANS := 0
> +endif
> +ifeq ($(LIBERATIONMONO),0)
> +  RECOMMEND_LIBERATIONMONO := 1
> +else
> +  RECOMMEND_LIBERATIONMONO := 0
> +endif
> +
>  
>  STEELFONTID := $(shell fc-list | grep -i steel | grep -c Steel)
>  
> @@ -456,11 +469,18 @@ else
>  	@sh $(FIXSVGFONTS) < $< > $<i
>  endif
>  ifeq ($(RECOMMEND_FREEFONT),1)
> -	$(info Nice-to-have font package 'gnu-freefont' not found. See #9 in FAQ-BUILD.txt)
> +	$(info Nice-to-have font family 'FreeMono' not found. See #9 in FAQ-BUILD.txt)
>  endif
>  ifeq ($(RECOMMEND_DEJAVU),1)
> -	$(info Nice-to-have font package 'dejavu' not found. See #9 in FAQ-BUILD.txt)
> +	$(info Nice-to-have font family 'DejaVu Sans Mono' not found. See #9 in FAQ-BUILD.txt)
> +endif
> +ifeq ($(RECOMMEND_LIBERATIONSANS),1)
> +	$(info Nice-to-have font family 'Liberation Sans' not found. See #9 in FAQ-BUILD.txt)
>  endif
> +ifeq ($(RECOMMEND_LIBERATIONMONO),1)
> +	$(info Nice-to-have font family 'Liberation Mono' not found. See #9 in FAQ-BUILD.txt)
> +endif
> +
>  ifeq ($(INKSCAPE_ONE),0)
>  	@inkscape --export-pdf=$@ $<i > /dev/null 2>&1
>  else
> diff --git a/utilities/gitlab-ci.yml b/utilities/gitlab-ci.yml
> index 675793cc0ebd..9545029ee34c 100644
> --- a/utilities/gitlab-ci.yml
> +++ b/utilities/gitlab-ci.yml
> @@ -18,7 +18,7 @@ generate_pdfs:
>      stage: build
>  
>      before_script:
> -        - pacman --noconfirm -Sy texlive-most fig2dev ghostscript graphviz inkscape wget make which fontconfig git ttf-dejavu gnu-free-fonts
> +        - pacman --noconfirm -Sy texlive-most fig2dev ghostscript graphviz inkscape wget make which fontconfig git ttf-dejavu gnu-free-fonts ttf-liberation
>          - mkdir -p ~/.local/share/fonts && cp fonts/steel-city-comic.regular.ttf ~/.local/share/fonts/ && fc-cache
>          - wget https://sourceforge.net/projects/fig2ps/files/latest/download -O /dev/shm/fig2ps.tbz
>          - mkdir /dev/shm/build && tar -xjf /dev/shm/fig2ps.tbz -C /dev/shm/build --strip-components=1
> 
> base-commit: 9217963cbb7046616a6ad21813f88a3d0423cbbe
> -- 
> 2.25.1
> 

      reply	other threads:[~2023-02-06 17:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06  8:47 [PATCH -perfbook] gitlab-ci.yml: Add Liberation font families for PDF build Akira Yokosawa
2023-02-06 17:26 ` Paul E. McKenney [this message]

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=20230206172650.GP2948950@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=akiyks@gmail.com \
    --cc=leobras.c@gmail.com \
    --cc=perfbook@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).