* [PATCH -perfbook 0/6] Update Dockerfiles
@ 2023-06-15 9:48 Akira Yokosawa
2023-06-15 9:49 ` [PATCH -perfbook 1/6] Makefile: Add 'DejaVu Sans' to nice-to-have fonts Akira Yokosawa
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 9:48 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
Hi Paul,
Commit a80a57b21a5e ("fixsvgfonts.sh: Convert sans-serif into 'DejaVu Sans'")
assumed that having "DejaVu Sans Mono" is sufficent for "DejaVu Sans".
It turns out that docker/Dockerfile.fedora doesn't cover "DejaVu Sans".
Fedora's dejavu-sans-mono-fonts package doesn't contain "DejaVu Sans Mono"!
There is a meta package of the name dejavu-fonts-all which covers them
both as well as dejavu-serif-fonts.
It also turns out that Answer to #9 in FAQ-BUILD.txt saying:
As for Ubuntu and Fedora, packages listed in #5 should cover
all the font families needed.
is wrong on the Fedora front. DejaVu and Liberation fonts need
font packages dejavu-fonts-all and liberation-fonts.
Furthermore, Fedora 38 (released this April) has a regression of
Inkscape where font markup is corrupted in SVG --> PDF conversion.
So Deckerfile.fedora should stay with Fedora 37 for the moment.
Quick search of upstream Inkscape's issue tracker didn't hit the
font markup regression. I'll open an issue there unless somebody
else beats me to it.
So, this patch set consists of the following
Patch 1/6 adds check of "DejaVu Sans" as nice-to-have font.
Patch 2/6 updates FAQ-BUILD.txt and Dockerfile.fedora for nice-to-have
font packages.
Patch 3/6 updates Dockerfile.fedora to stay with Fedora 37, using an ARG
variable so that building from fedora:38 can be possible.
It also adds popller-utils to check the font markup info in PDF properties.
Patch 4/6 updates Dockerfile (from ubuntu) so that the default base
image is the "latest" (jammy at the moment). There is no reason to stick
with focal (20.04).
Patch 5/6 adds poppler-utils to Dockerfile (from ubuntu) to detect
Inkscape regression early in case it actually sneaks in.
(Note: Ubuntu 23.04 is safe at the moment.)
Patch 6/6 changes the default uid:gid pair of container images built
from Dockerfiles to 0:0, which is for rootless mode docker/podman.
Repository at dockerhub for prebuilt images is changed to
akiyks/perfbook-build, where the tags "latest" and "fedora" have
uid:gid pair of 0:0.
Thanks, Akira
--
Akira Yokosawa (6):
Makefile: Add 'DejaVu Sans' to nice-to-have fonts
FAQ-BUILD: Update nice-to-have fonts for SVG figures
docker/Dockerfile.fedora: Stay with Fedora 37 for the moment
docker/Dockerfile: Use 'latest' as the default tag
docker/Dockerfile: Add poppler-utils package
Dockerfile: Make uid:gid = 0:0 the default
FAQ-BUILD.txt | 37 ++++++++++++++++++++-----------------
Makefile | 15 ++++++++++++---
docker/Dockerfile | 9 +++++----
docker/Dockerfile.fedora | 16 +++++++++++-----
4 files changed, 48 insertions(+), 29 deletions(-)
base-commit: a80a57b21a5e8ea3dfa90471126920a1131682f7
--
2.25.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH -perfbook 1/6] Makefile: Add 'DejaVu Sans' to nice-to-have fonts
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
@ 2023-06-15 9:49 ` Akira Yokosawa
2023-06-15 9:51 ` [PATCH -perfbook 2/6] FAQ-BUILD: Update nice-to-have fonts for SVG figures Akira Yokosawa
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 9:49 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
Under RHEL and Fedora, it is possible to install "DejaVu Sans Mono"
alone. Add check of "DejaVu Sans" font in Makefile and print info
on a nice-to-have font in case it is missing.
Update FAQ-BUILD.txt accordingly.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
FAQ-BUILD.txt | 1 +
Makefile | 15 ++++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/FAQ-BUILD.txt b/FAQ-BUILD.txt
index 024f98bd4555..7c584c2444fe 100644
--- a/FAQ-BUILD.txt
+++ b/FAQ-BUILD.txt
@@ -186,6 +186,7 @@
There are SVG figures which use other font families
listed below:
+ - DejaVu Sans
- DejaVu Sans Mono
- FreeMono
- Liberation Sans
diff --git a/Makefile b/Makefile
index e44b370d58d0..6a389089e38c 100644
--- a/Makefile
+++ b/Makefile
@@ -125,6 +125,7 @@ COURIERS := $(findstring couriers,$(FONTPACKAGES))
NEWTXSF := $(findstring newtxsf,$(FONTPACKAGES))
INCONSOLATA := $(findstring inconsolata,$(FONTPACKAGES))
FREESANS := $(shell fc-list | grep FreeSans | wc -l)
+DEJAVUSANS := $(shell fc-list | grep "DejaVu Sans" | grep -v "DejaVu Sans Mono" | 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)
@@ -149,10 +150,15 @@ ifeq ($(FREESANS),0)
else
RECOMMEND_FREEFONT := 0
endif
+ifeq ($(DEJAVUSANS),0)
+ RECOMMEND_DEJAVUSANS := 1
+else
+ RECOMMEND_DEJAVUSANS := 0
+endif
ifeq ($(DEJAVUMONO),0)
- RECOMMEND_DEJAVU := 1
+ RECOMMEND_DEJAVUMONO := 1
else
- RECOMMEND_DEJAVU := 0
+ RECOMMEND_DEJAVUMONO := 0
endif
ifeq ($(LIBERATIONSANS),0)
RECOMMEND_LIBERATIONSANS := 1
@@ -461,7 +467,10 @@ endif
ifeq ($(RECOMMEND_FREEFONT),1)
$(info Nice-to-have font family 'FreeMono' not found. See #9 in FAQ-BUILD.txt)
endif
-ifeq ($(RECOMMEND_DEJAVU),1)
+ifeq ($(RECOMMEND_DEJAVUSANS),1)
+ $(info Nice-to-have font family 'DejaVu Sans' not found. See #9 in FAQ-BUILD.txt)
+endif
+ifeq ($(RECOMMEND_DEJAVUMONO),1)
$(info Nice-to-have font family 'DejaVu Sans Mono' not found. See #9 in FAQ-BUILD.txt)
endif
ifeq ($(RECOMMEND_LIBERATIONSANS),1)
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH -perfbook 2/6] FAQ-BUILD: Update nice-to-have fonts for SVG figures
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
2023-06-15 9:49 ` [PATCH -perfbook 1/6] Makefile: Add 'DejaVu Sans' to nice-to-have fonts Akira Yokosawa
@ 2023-06-15 9:51 ` Akira Yokosawa
2023-06-15 9:52 ` [PATCH -perfbook 3/6] docker/Dockerfile.fedora: Stay with Fedora 37 for the moment Akira Yokosawa
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 9:51 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
The list for Fedora in the answer to #5 doesn't cover DejaVu and
Liberation font families.
Update A-2 of #9 to suggest packages for Fedora.
Update docker/Dockerfile.fedora accordingly.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
FAQ-BUILD.txt | 9 +++++++--
docker/Dockerfile.fedora | 3 +--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/FAQ-BUILD.txt b/FAQ-BUILD.txt
index 7c584c2444fe..e0fa0847fd53 100644
--- a/FAQ-BUILD.txt
+++ b/FAQ-BUILD.txt
@@ -201,8 +201,13 @@
in .svg --> .pdf conversions if that happens.
- As for Ubuntu and Fedora, packages listed in #5 should cover
- all the font families needed.
+ As for Ubuntu, packages listed in #5 should cover all the
+ font families listed above.
+
+ As for Fedora, installing packages listed below should suffice:
+
+ - dejavu-fonts-all
+ - liberation-fonts
10. Building perfbook fails with a warning of buggy cleveref or
version mismatch of epigraph.
diff --git a/docker/Dockerfile.fedora b/docker/Dockerfile.fedora
index ff56ac4c751e..fdfbdc344bf5 100644
--- a/docker/Dockerfile.fedora
+++ b/docker/Dockerfile.fedora
@@ -2,8 +2,7 @@ FROM fedora:latest
RUN dnf -y update && dnf install -y --setopt=tsflags=nodocs \
fig2ps graphviz inkscape make git vim nano gnuplot-minimal groff time \
- liberation-mono-fonts liberation-sans-fonts \
- dejavu-sans-mono-fonts \
+ liberation-fonts dejavu-fonts-all \
texlive-collection-plaingeneric texlive-collection-binextra \
texlive-collection-latexextra texlive-epstopdf texlive-fontools \
texlive-newtx texlive-newtxtt texlive-nimbus15 texlive-courier-scaled \
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH -perfbook 3/6] docker/Dockerfile.fedora: Stay with Fedora 37 for the moment
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
2023-06-15 9:49 ` [PATCH -perfbook 1/6] Makefile: Add 'DejaVu Sans' to nice-to-have fonts Akira Yokosawa
2023-06-15 9:51 ` [PATCH -perfbook 2/6] FAQ-BUILD: Update nice-to-have fonts for SVG figures Akira Yokosawa
@ 2023-06-15 9:52 ` Akira Yokosawa
2023-06-15 9:53 ` [PATCH -perfbook 4/6] docker/Dockerfile: Use 'latest' as the default tag Akira Yokosawa
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 9:52 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
Inkscape of Fedora 38 has a regression in font markup corruption
in SVG --> PDF conversion.
Stay with Fedora 37 by Using an ARG variable "rel" with its value
of 37.
Add poppler-utils package for the pdffonts command to see font markup
in PDF properties.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
docker/Dockerfile.fedora | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/docker/Dockerfile.fedora b/docker/Dockerfile.fedora
index fdfbdc344bf5..9b5ed5440869 100644
--- a/docker/Dockerfile.fedora
+++ b/docker/Dockerfile.fedora
@@ -1,8 +1,15 @@
-FROM fedora:latest
+# As of June 2023, Inkscape of Fedora 38 has a regression of font markup
+# corruption.
+# Stay with Fedora 37 for the moment.
+# You can override "rel" by saying:
+# docker build -t <tag> --build-arg rel=latest -f Dockerfile.fedora .
+#
+ARG rel=37
+FROM fedora:$rel
RUN dnf -y update && dnf install -y --setopt=tsflags=nodocs \
fig2ps graphviz inkscape make git vim nano gnuplot-minimal groff time \
- liberation-fonts dejavu-fonts-all \
+ liberation-fonts dejavu-fonts-all poppler-utils \
texlive-collection-plaingeneric texlive-collection-binextra \
texlive-collection-latexextra texlive-epstopdf texlive-fontools \
texlive-newtx texlive-newtxtt texlive-nimbus15 texlive-courier-scaled \
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH -perfbook 4/6] docker/Dockerfile: Use 'latest' as the default tag
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
` (2 preceding siblings ...)
2023-06-15 9:52 ` [PATCH -perfbook 3/6] docker/Dockerfile.fedora: Stay with Fedora 37 for the moment Akira Yokosawa
@ 2023-06-15 9:53 ` Akira Yokosawa
2023-06-15 9:54 ` [PATCH -perfbook 5/6] docker/Dockerfile: Add poppler-utils package Akira Yokosawa
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 9:53 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
ubuntu:jammy (22.04) based image works just fine for building
perfbook. The tag of "latest" should work fine.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
docker/Dockerfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 1fec609a0043..faa0a0fb5a31 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,4 +1,5 @@
-FROM ubuntu:focal
+ARG rel=latest
+FROM ubuntu:$rel
RUN apt-get update && apt-get install -y locales && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH -perfbook 5/6] docker/Dockerfile: Add poppler-utils package
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
` (3 preceding siblings ...)
2023-06-15 9:53 ` [PATCH -perfbook 4/6] docker/Dockerfile: Use 'latest' as the default tag Akira Yokosawa
@ 2023-06-15 9:54 ` Akira Yokosawa
2023-06-15 9:56 ` [PATCH -perfbook 6/6] Dockerfile: Make uid:gid = 0:0 the default Akira Yokosawa
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 9:54 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
Font markup info in PDF properties can be printed by the pdffonts
command provided by the poppler-utils package.
Add it for catching possible regression in Ubuntu's Inkscape.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
docker/Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
index faa0a0fb5a31..b11116493c6d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -9,7 +9,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=UTC apt-get install -y t
rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y fig2ps inkscape xfig graphviz psutils \
texlive-publishers texlive-pstricks texlive-science texlive-fonts-extra \
- make nano vim git curl gnuplot-nox time && \
+ make nano vim git curl gnuplot-nox time poppler-utils && \
rm -rf /var/lib/apt/lists/*
COPY steel-city-comic.regular.ttf /usr/local/share/fonts/
RUN fc-cache /usr/local/share/fonts/
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH -perfbook 6/6] Dockerfile: Make uid:gid = 0:0 the default
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
` (4 preceding siblings ...)
2023-06-15 9:54 ` [PATCH -perfbook 5/6] docker/Dockerfile: Add poppler-utils package Akira Yokosawa
@ 2023-06-15 9:56 ` Akira Yokosawa
2023-06-15 10:43 ` [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
2023-06-15 16:49 ` Paul E. McKenney
7 siblings, 0 replies; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 9:56 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
Most container images at dockerhub and other repositories have
uid:gid = 0:0 by default.
This makes it possible to run commands to update or install packages
after invoking such images.
Furthermore, rootless-mode docker has become easier to install [1]
and podman is rootless by default.
Change the default uid:gid pair to 0:0 in our Dockerfiles.
(Dockerfile.bionic will soon be removed and is not updated here)
Update FAQ-BUILD.txt accordingly. Container images uploaded to
akiyks/perfbook-build will be for rootless mode by default from now
on.
akiyks/perfbook-build-focal and akiyks/perfbook-build-fedora
should be regarded as deprecated but will be kept for a while.
Link: [1] https://docs.docker.com/engine/security/rootless/
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
FAQ-BUILD.txt | 27 ++++++++++++---------------
docker/Dockerfile | 4 ++--
docker/Dockerfile.fedora | 4 ++--
3 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/FAQ-BUILD.txt b/FAQ-BUILD.txt
index e0fa0847fd53..5867acd9d4d3 100644
--- a/FAQ-BUILD.txt
+++ b/FAQ-BUILD.txt
@@ -40,7 +40,7 @@
Alternatively, you can use the container image described
in #13 below. Otherwise, instructions follow.
- On Ubuntu Bionic and Focal, the following list should cover
+ On Ubuntu Bionic and later, the following list should cover
necessary packages (except for -doc packages):
texlive-publishers texlive-pstricks
texlive-science texlive-fonts-extra
@@ -296,42 +296,39 @@
subdirectory. You can pull the container image built from
it as follows:
- docker pull akiyks/perfbook-build-focal:latest
+ docker pull akiyks/perfbook-build:latest
It can be run with the command:
docker run --rm -it -v <path to perfbook dir>:/work \
- akiyks/perfbook-build-focal:latest
+ akiyks/perfbook-build:latest
Note:
- The prebuilt container image assumes <uid:pid> = <1000:1000>.
- If you have different IDs, you can still run the image by
+ The prebuilt container image assumes rootless mode.
+ If you run root-mode docker, you can still run the image by
adding the option:
-u $(id -u):$(id -g)
- to the "docker run" command. The bash prompt will be in the
- form of "I have no name!@abcdef012345:/work$". Builds of
- perfbook will nevertheless succeed. You can also build
- a container image of your own:
+ to the "docker run" command.
+
+ You can build a container image on your own:
cd docker
docker build -t <container image tag> \
--build-arg uid=$(id -u) --build-arg gid=$(id -g) .
For those prefer a Fedora-based container image,
- akiyks/perfbook-build-fedora:latest is also available.
+ akiyks/perfbook-build:fedora is also available.
It is built from docker/Dockerfile.fedora.
If you have podman already installed, you can run the image
- with podman. podman maps container's root to your host uid
- by default.
- Use the following command to run:
+ with podman. podman runs in rootless mode by default.
+ Use the following command to run (Note the ":z" in the -v flag):
podman run --rm -it -v <path to perfbook dir>:/work:z \
- -u 0:0 akiyks/perfbook-build-fedora:latest
+ akiyks/perfbook-build:fedora
- You will see a prompt with a "#".
Your updates under /work will have your host uid in host's POV.
14. It looks as if answers above all assume building under GNU/Linux
diff --git a/docker/Dockerfile b/docker/Dockerfile
index b11116493c6d..ec89c6f266dd 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -17,8 +17,8 @@ WORKDIR /opt
RUN curl https://gitlab.com/latexpand/latexpand/-/archive/v1.3/latexpand-v1.3.tar.gz -o - | tar xfz - && \
sed -i -e 's/@LATEXPAND_VERSION@/v1.3/' latexpand-*/latexpand && \
cp latexpand-*/latexpand /usr/local/bin
-ARG uid=1000
-ARG gid=1000
+ARG uid=0
+ARG gid=0
ARG user=perfbook
ARG group=perfbook
RUN if [ $uid -ne 0 ] ; then \
diff --git a/docker/Dockerfile.fedora b/docker/Dockerfile.fedora
index 9b5ed5440869..5eff2a2a00cd 100644
--- a/docker/Dockerfile.fedora
+++ b/docker/Dockerfile.fedora
@@ -22,8 +22,8 @@ WORKDIR /opt
RUN curl https://gitlab.com/latexpand/latexpand/-/archive/v1.3/latexpand-v1.3.tar.gz -o - | tar xfz - && \
sed -i -e 's/@LATEXPAND_VERSION@/v1.3/' latexpand-*/latexpand && \
cp latexpand-*/latexpand /usr/local/bin
-ARG uid=1000
-ARG gid=1000
+ARG uid=0
+ARG gid=0
ARG user=perfbook
ARG group=perfbook
RUN if [ $uid -ne 0 ] ; then \
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH -perfbook 0/6] Update Dockerfiles
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
` (5 preceding siblings ...)
2023-06-15 9:56 ` [PATCH -perfbook 6/6] Dockerfile: Make uid:gid = 0:0 the default Akira Yokosawa
@ 2023-06-15 10:43 ` Akira Yokosawa
2023-06-16 6:07 ` Leonardo Brás
2023-06-15 16:49 ` Paul E. McKenney
7 siblings, 1 reply; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-15 10:43 UTC (permalink / raw)
To: Paul E. McKenney, Leonardo Bras; +Cc: perfbook, Akira Yokosawa
[+To: Leo]
On 2023/06/15 18:48, Akira Yokosawa wrote:
> Hi Paul,
>
> Commit a80a57b21a5e ("fixsvgfonts.sh: Convert sans-serif into 'DejaVu Sans'")
> assumed that having "DejaVu Sans Mono" is sufficent for "DejaVu Sans".
>
> It turns out that docker/Dockerfile.fedora doesn't cover "DejaVu Sans".
> Fedora's dejavu-sans-mono-fonts package doesn't contain "DejaVu Sans Mono"!
> There is a meta package of the name dejavu-fonts-all which covers them
> both as well as dejavu-serif-fonts.
>
> It also turns out that Answer to #9 in FAQ-BUILD.txt saying:
>
> As for Ubuntu and Fedora, packages listed in #5 should cover
> all the font families needed.
>
> is wrong on the Fedora front. DejaVu and Liberation fonts need
> font packages dejavu-fonts-all and liberation-fonts.
>
> Furthermore, Fedora 38 (released this April) has a regression of
> Inkscape where font markup is corrupted in SVG --> PDF conversion.
Leo, just for you info, I see the same regression under Arch Linux.
Pick a perfbook.pdf from your gitlab-ci build, and run:
pdffonts perfbook.pdf
You will see something like (I don't know how the corrupted encoding
will work in your mailbox...):
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
OTFSIT+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
NWEUXR+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
JZAPTL+k湌顕 CID Type 0C Identity-H yes yes yes 3038 0
XCILRI+i湌顕 Type 1C WinAnsi yes yes yes 3039 0
CZRRGJ+=潌顕 CID Type 0C Identity-H yes yes yes 3040 0
LAEXLB+o湌顕 Type 1C WinAnsi yes yes yes 3041 0
WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
DEIMBC+j솛慕 TrueType WinAnsi yes yes yes 3209 0
RWADWA+蛒ୖ TrueType WinAnsi yes yes yes 3238 0
HDCMTE+蛒ୖ TrueType WinAnsi yes yes yes 3239 0
JGKXJS+½���䕖 Type 1C WinAnsi yes yes yes 3269 0
ANXDLC+Xۨ㝖 TrueType WinAnsi yes yes yes 3320 0
RUPDBM+ѓ㡖 Type 1C WinAnsi yes yes yes 3553 00
LWHAZS+秞煕 Type 1C WinAnsi yes yes yes 3560 0
RQGRST+A绞煕 TrueType WinAnsi yes yes yes 3561 0
[...]
Expected output is:
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
ICXLWS+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
NUKNCC+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
QNDHMI+NimbusSans-Regular CID Type 0C Identity-H yes yes yes 3038 0
JKBTOX+NimbusSans-Regular Type 1C WinAnsi yes yes yes 3039 0
BIKSFC+NimbusSans-Bold CID Type 0C Identity-H yes yes yes 3040 0
XFXZKY+NimbusSans-Bold Type 1C WinAnsi yes yes yes 3041 0
WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
KPAYFY+steelcitycomic TrueType WinAnsi yes yes yes 3209 0
IGYOWD+steelcitycomic TrueType WinAnsi yes yes yes 3238 0
LVRVOR+steelcitycomic TrueType WinAnsi yes yes yes 3239 0
OCNFNQ+FreeMonoBold Type 1C WinAnsi yes yes yes 3269 0
DHHOAV+DejaVuSans TrueType WinAnsi yes yes yes 3320 0
RVTHEX+DejaVuSansMono-Bold TrueType WinAnsi yes yes yes 3479 0
ODJFYL+FreeMonoBold Type 1C WinAnsi yes yes yes 3553 0
HAXSLA+URWGothic-DemiOblique Type 1C WinAnsi yes yes yes 3560 0
[...]
Thanks, Akira
>
> So Deckerfile.fedora should stay with Fedora 37 for the moment.
>
> Quick search of upstream Inkscape's issue tracker didn't hit the
> font markup regression. I'll open an issue there unless somebody
> else beats me to it.
>
> So, this patch set consists of the following
>
> Patch 1/6 adds check of "DejaVu Sans" as nice-to-have font.
>
> Patch 2/6 updates FAQ-BUILD.txt and Dockerfile.fedora for nice-to-have
> font packages.
>
> Patch 3/6 updates Dockerfile.fedora to stay with Fedora 37, using an ARG
> variable so that building from fedora:38 can be possible.
> It also adds popller-utils to check the font markup info in PDF properties.
>
> Patch 4/6 updates Dockerfile (from ubuntu) so that the default base
> image is the "latest" (jammy at the moment). There is no reason to stick
> with focal (20.04).
>
> Patch 5/6 adds poppler-utils to Dockerfile (from ubuntu) to detect
> Inkscape regression early in case it actually sneaks in.
> (Note: Ubuntu 23.04 is safe at the moment.)
>
> Patch 6/6 changes the default uid:gid pair of container images built
> from Dockerfiles to 0:0, which is for rootless mode docker/podman.
> Repository at dockerhub for prebuilt images is changed to
> akiyks/perfbook-build, where the tags "latest" and "fedora" have
> uid:gid pair of 0:0.
>
> Thanks, Akira
> --
> Akira Yokosawa (6):
> Makefile: Add 'DejaVu Sans' to nice-to-have fonts
> FAQ-BUILD: Update nice-to-have fonts for SVG figures
> docker/Dockerfile.fedora: Stay with Fedora 37 for the moment
> docker/Dockerfile: Use 'latest' as the default tag
> docker/Dockerfile: Add poppler-utils package
> Dockerfile: Make uid:gid = 0:0 the default
>
> FAQ-BUILD.txt | 37 ++++++++++++++++++++-----------------
> Makefile | 15 ++++++++++++---
> docker/Dockerfile | 9 +++++----
> docker/Dockerfile.fedora | 16 +++++++++++-----
> 4 files changed, 48 insertions(+), 29 deletions(-)
>
>
> base-commit: a80a57b21a5e8ea3dfa90471126920a1131682f7
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH -perfbook 0/6] Update Dockerfiles
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
` (6 preceding siblings ...)
2023-06-15 10:43 ` [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
@ 2023-06-15 16:49 ` Paul E. McKenney
7 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2023-06-15 16:49 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: perfbook
On Thu, Jun 15, 2023 at 06:48:00PM +0900, Akira Yokosawa wrote:
> Hi Paul,
>
> Commit a80a57b21a5e ("fixsvgfonts.sh: Convert sans-serif into 'DejaVu Sans'")
> assumed that having "DejaVu Sans Mono" is sufficent for "DejaVu Sans".
>
> It turns out that docker/Dockerfile.fedora doesn't cover "DejaVu Sans".
> Fedora's dejavu-sans-mono-fonts package doesn't contain "DejaVu Sans Mono"!
> There is a meta package of the name dejavu-fonts-all which covers them
> both as well as dejavu-serif-fonts.
>
> It also turns out that Answer to #9 in FAQ-BUILD.txt saying:
>
> As for Ubuntu and Fedora, packages listed in #5 should cover
> all the font families needed.
>
> is wrong on the Fedora front. DejaVu and Liberation fonts need
> font packages dejavu-fonts-all and liberation-fonts.
>
> Furthermore, Fedora 38 (released this April) has a regression of
> Inkscape where font markup is corrupted in SVG --> PDF conversion.
>
> So Deckerfile.fedora should stay with Fedora 37 for the moment.
>
> Quick search of upstream Inkscape's issue tracker didn't hit the
> font markup regression. I'll open an issue there unless somebody
> else beats me to it.
>
> So, this patch set consists of the following
>
> Patch 1/6 adds check of "DejaVu Sans" as nice-to-have font.
>
> Patch 2/6 updates FAQ-BUILD.txt and Dockerfile.fedora for nice-to-have
> font packages.
>
> Patch 3/6 updates Dockerfile.fedora to stay with Fedora 37, using an ARG
> variable so that building from fedora:38 can be possible.
> It also adds popller-utils to check the font markup info in PDF properties.
>
> Patch 4/6 updates Dockerfile (from ubuntu) so that the default base
> image is the "latest" (jammy at the moment). There is no reason to stick
> with focal (20.04).
>
> Patch 5/6 adds poppler-utils to Dockerfile (from ubuntu) to detect
> Inkscape regression early in case it actually sneaks in.
> (Note: Ubuntu 23.04 is safe at the moment.)
>
> Patch 6/6 changes the default uid:gid pair of container images built
> from Dockerfiles to 0:0, which is for rootless mode docker/podman.
> Repository at dockerhub for prebuilt images is changed to
> akiyks/perfbook-build, where the tags "latest" and "fedora" have
> uid:gid pair of 0:0.
Queued and pushed, thank you!
Thanx, Paul
> Thanks, Akira
> --
> Akira Yokosawa (6):
> Makefile: Add 'DejaVu Sans' to nice-to-have fonts
> FAQ-BUILD: Update nice-to-have fonts for SVG figures
> docker/Dockerfile.fedora: Stay with Fedora 37 for the moment
> docker/Dockerfile: Use 'latest' as the default tag
> docker/Dockerfile: Add poppler-utils package
> Dockerfile: Make uid:gid = 0:0 the default
>
> FAQ-BUILD.txt | 37 ++++++++++++++++++++-----------------
> Makefile | 15 ++++++++++++---
> docker/Dockerfile | 9 +++++----
> docker/Dockerfile.fedora | 16 +++++++++++-----
> 4 files changed, 48 insertions(+), 29 deletions(-)
>
>
> base-commit: a80a57b21a5e8ea3dfa90471126920a1131682f7
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH -perfbook 0/6] Update Dockerfiles
2023-06-15 10:43 ` [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
@ 2023-06-16 6:07 ` Leonardo Brás
2023-06-16 11:05 ` Akira Yokosawa
0 siblings, 1 reply; 13+ messages in thread
From: Leonardo Brás @ 2023-06-16 6:07 UTC (permalink / raw)
To: Akira Yokosawa, Paul E. McKenney; +Cc: perfbook
On Thu, 2023-06-15 at 19:43 +0900, Akira Yokosawa wrote:
> [+To: Leo]
>
> On 2023/06/15 18:48, Akira Yokosawa wrote:
> > Hi Paul,
> >
> > Commit a80a57b21a5e ("fixsvgfonts.sh: Convert sans-serif into 'DejaVu Sans'")
> > assumed that having "DejaVu Sans Mono" is sufficent for "DejaVu Sans".
> >
> > It turns out that docker/Dockerfile.fedora doesn't cover "DejaVu Sans".
> > Fedora's dejavu-sans-mono-fonts package doesn't contain "DejaVu Sans Mono"!
> > There is a meta package of the name dejavu-fonts-all which covers them
> > both as well as dejavu-serif-fonts.
> >
> > It also turns out that Answer to #9 in FAQ-BUILD.txt saying:
> >
> > As for Ubuntu and Fedora, packages listed in #5 should cover
> > all the font families needed.
> >
> > is wrong on the Fedora front. DejaVu and Liberation fonts need
> > font packages dejavu-fonts-all and liberation-fonts.
> >
> > Furthermore, Fedora 38 (released this April) has a regression of
> > Inkscape where font markup is corrupted in SVG --> PDF conversion.
>
> Leo, just for you info, I see the same regression under Arch Linux.
Hello Akira, thanks for letting me know!
>
> Pick a perfbook.pdf from your gitlab-ci build, and run:
>
> pdffonts perfbook.pdf
>
> You will see something like (I don't know how the corrupted encoding
> will work in your mailbox...):
>
> name type encoding emb sub uni object ID
> ------------------------------------ ----------------- ---------------- --- --- --- ---------
> WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
> ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
> OTFSIT+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
> IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
> PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
> IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
> NWEUXR+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
> UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
> OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
> TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
> UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
> IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
> VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
> JZAPTL+k湌顕 CID Type 0C Identity-H yes yes yes 3038 0
> XCILRI+i湌顕 Type 1C WinAnsi yes yes yes 3039 0
> CZRRGJ+=潌顕 CID Type 0C Identity-H yes yes yes 3040 0
> LAEXLB+o湌顕 Type 1C WinAnsi yes yes yes 3041 0
> WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
> DEIMBC+j솛慕 TrueType WinAnsi yes yes yes 3209 0
> RWADWA+蛒ୖ TrueType WinAnsi yes yes yes 3238 0
> HDCMTE+蛒ୖ TrueType WinAnsi yes yes yes 3239 0
> JGKXJS+½���䕖 Type 1C WinAnsi yes yes yes 3269 0
> ANXDLC+Xۨ㝖 TrueType WinAnsi yes yes yes 3320 0
> RUPDBM+ѓ㡖 Type 1C WinAnsi yes yes yes 3553 00
> LWHAZS+秞煕 Type 1C WinAnsi yes yes yes 3560 0
> RQGRST+A绞煕 TrueType WinAnsi yes yes yes 3561 0
>
> [...]
>
> Expected output is:
>
> name type encoding emb sub uni object ID
> ------------------------------------ ----------------- ---------------- --- --- --- ---------
> WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
> ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
> ICXLWS+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
> IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
> PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
> IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
> NUKNCC+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
> UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
> OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
> TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
> UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
> IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
> VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
> QNDHMI+NimbusSans-Regular CID Type 0C Identity-H yes yes yes 3038 0
> JKBTOX+NimbusSans-Regular Type 1C WinAnsi yes yes yes 3039 0
> BIKSFC+NimbusSans-Bold CID Type 0C Identity-H yes yes yes 3040 0
> XFXZKY+NimbusSans-Bold Type 1C WinAnsi yes yes yes 3041 0
> WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
> KPAYFY+steelcitycomic TrueType WinAnsi yes yes yes 3209 0
> IGYOWD+steelcitycomic TrueType WinAnsi yes yes yes 3238 0
> LVRVOR+steelcitycomic TrueType WinAnsi yes yes yes 3239 0
> OCNFNQ+FreeMonoBold Type 1C WinAnsi yes yes yes 3269 0
> DHHOAV+DejaVuSans TrueType WinAnsi yes yes yes 3320 0
> RVTHEX+DejaVuSansMono-Bold TrueType WinAnsi yes yes yes 3479 0
> ODJFYL+FreeMonoBold Type 1C WinAnsi yes yes yes 3553 0
> HAXSLA+URWGothic-DemiOblique Type 1C WinAnsi yes yes yes 3560 0
> [...]
>
IIUC, the issue is the appearing of non-ascii chars in the output of pdffonts,
is that correct?
Arch Linux provides two packages for DejaVu fonts:
ttf-dejavu and ttf-dejavu-nerd, and both seem to provide DejaVu-Sans-mono
In this test, I install them both, just for the sake of trying to fix the issue:
https://gitlab.com/linux-kernel/perfbook/-/jobs/4485677006
I also added pdffonts command in the end to make it easier to verify if
everything is fine, which still outputs non-ascii names.
When I grep for DejaVuSansMono I see them appearing in the output of the job,
and also in a previous pdf I have downloaded.
I don't quite understand this, but maybe the issue is missing other fonts?
Please help me understand the issue.
Best regards,
Leo
>
> Thanks, Akira
>
> >
> > So Deckerfile.fedora should stay with Fedora 37 for the moment.
> >
> > Quick search of upstream Inkscape's issue tracker didn't hit the
> > font markup regression. I'll open an issue there unless somebody
> > else beats me to it.
> >
> > So, this patch set consists of the following
> >
> > Patch 1/6 adds check of "DejaVu Sans" as nice-to-have font.
> >
> > Patch 2/6 updates FAQ-BUILD.txt and Dockerfile.fedora for nice-to-have
> > font packages.
> >
> > Patch 3/6 updates Dockerfile.fedora to stay with Fedora 37, using an ARG
> > variable so that building from fedora:38 can be possible.
> > It also adds popller-utils to check the font markup info in PDF properties.
> >
> > Patch 4/6 updates Dockerfile (from ubuntu) so that the default base
> > image is the "latest" (jammy at the moment). There is no reason to stick
> > with focal (20.04).
> >
> > Patch 5/6 adds poppler-utils to Dockerfile (from ubuntu) to detect
> > Inkscape regression early in case it actually sneaks in.
> > (Note: Ubuntu 23.04 is safe at the moment.)
> >
> > Patch 6/6 changes the default uid:gid pair of container images built
> > from Dockerfiles to 0:0, which is for rootless mode docker/podman.
> > Repository at dockerhub for prebuilt images is changed to
> > akiyks/perfbook-build, where the tags "latest" and "fedora" have
> > uid:gid pair of 0:0.
> >
> > Thanks, Akira
> > --
> > Akira Yokosawa (6):
> > Makefile: Add 'DejaVu Sans' to nice-to-have fonts
> > FAQ-BUILD: Update nice-to-have fonts for SVG figures
> > docker/Dockerfile.fedora: Stay with Fedora 37 for the moment
> > docker/Dockerfile: Use 'latest' as the default tag
> > docker/Dockerfile: Add poppler-utils package
> > Dockerfile: Make uid:gid = 0:0 the default
> >
> > FAQ-BUILD.txt | 37 ++++++++++++++++++++-----------------
> > Makefile | 15 ++++++++++++---
> > docker/Dockerfile | 9 +++++----
> > docker/Dockerfile.fedora | 16 +++++++++++-----
> > 4 files changed, 48 insertions(+), 29 deletions(-)
> >
> >
> > base-commit: a80a57b21a5e8ea3dfa90471126920a1131682f7
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH -perfbook 0/6] Update Dockerfiles
2023-06-16 6:07 ` Leonardo Brás
@ 2023-06-16 11:05 ` Akira Yokosawa
2023-09-22 23:52 ` Akira Yokosawa
0 siblings, 1 reply; 13+ messages in thread
From: Akira Yokosawa @ 2023-06-16 11:05 UTC (permalink / raw)
To: Leonardo Brás; +Cc: perfbook, Paul E. McKenney, Akira Yokosawa
On 2023/06/16 15:07, Leonardo Brás wrote:
> On Thu, 2023-06-15 at 19:43 +0900, Akira Yokosawa wrote:
>> [+To: Leo]
>>
>> On 2023/06/15 18:48, Akira Yokosawa wrote:
>>> Hi Paul,
>>>
>>> Commit a80a57b21a5e ("fixsvgfonts.sh: Convert sans-serif into 'DejaVu Sans'")
>>> assumed that having "DejaVu Sans Mono" is sufficent for "DejaVu Sans".
>>>
>>> It turns out that docker/Dockerfile.fedora doesn't cover "DejaVu Sans".
>>> Fedora's dejavu-sans-mono-fonts package doesn't contain "DejaVu Sans Mono"!
>>> There is a meta package of the name dejavu-fonts-all which covers them
>>> both as well as dejavu-serif-fonts.
>>>
>>> It also turns out that Answer to #9 in FAQ-BUILD.txt saying:
>>>
>>> As for Ubuntu and Fedora, packages listed in #5 should cover
>>> all the font families needed.
>>>
>>> is wrong on the Fedora front. DejaVu and Liberation fonts need
>>> font packages dejavu-fonts-all and liberation-fonts.
>>>
>>> Furthermore, Fedora 38 (released this April) has a regression of
>>> Inkscape where font markup is corrupted in SVG --> PDF conversion.
>>
>> Leo, just for you info, I see the same regression under Arch Linux.
>
> Hello Akira, thanks for letting me know!
>
>>
>> Pick a perfbook.pdf from your gitlab-ci build, and run:
>>
>> pdffonts perfbook.pdf
>>
>> You will see something like (I don't know how the corrupted encoding
>> will work in your mailbox...):
>>
>> name type encoding emb sub uni object ID
>> ------------------------------------ ----------------- ---------------- --- --- --- ---------
>> WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
>> ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
>> OTFSIT+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
>> IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
>> PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
>> IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
>> NWEUXR+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
>> UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
>> OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
>> TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
>> UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
>> IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
>> VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
>> JZAPTL+k湌顕 CID Type 0C Identity-H yes yes yes 3038 0
>> XCILRI+i湌顕 Type 1C WinAnsi yes yes yes 3039 0
>> CZRRGJ+=潌顕 CID Type 0C Identity-H yes yes yes 3040 0
>> LAEXLB+o湌顕 Type 1C WinAnsi yes yes yes 3041 0
>> WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
>> DEIMBC+j솛慕 TrueType WinAnsi yes yes yes 3209 0
>> RWADWA+蛒ୖ TrueType WinAnsi yes yes yes 3238 0
>> HDCMTE+蛒ୖ TrueType WinAnsi yes yes yes 3239 0
>> JGKXJS+½���䕖 Type 1C WinAnsi yes yes yes 3269 0
>> ANXDLC+Xۨ㝖 TrueType WinAnsi yes yes yes 3320 0
>> RUPDBM+ѓ㡖 Type 1C WinAnsi yes yes yes 3553 00
>> LWHAZS+秞煕 Type 1C WinAnsi yes yes yes 3560 0
>> RQGRST+A绞煕 TrueType WinAnsi yes yes yes 3561 0
>>
>> [...]
>>
>> Expected output is:
>>
>> name type encoding emb sub uni object ID
>> ------------------------------------ ----------------- ---------------- --- --- --- ---------
>> WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
>> ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
>> ICXLWS+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
>> IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
>> PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
>> IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
>> NUKNCC+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
>> UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
>> OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
>> TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
>> UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
>> IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
>> VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
>> QNDHMI+NimbusSans-Regular CID Type 0C Identity-H yes yes yes 3038 0
>> JKBTOX+NimbusSans-Regular Type 1C WinAnsi yes yes yes 3039 0
>> BIKSFC+NimbusSans-Bold CID Type 0C Identity-H yes yes yes 3040 0
>> XFXZKY+NimbusSans-Bold Type 1C WinAnsi yes yes yes 3041 0
>> WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
>> KPAYFY+steelcitycomic TrueType WinAnsi yes yes yes 3209 0
>> IGYOWD+steelcitycomic TrueType WinAnsi yes yes yes 3238 0
>> LVRVOR+steelcitycomic TrueType WinAnsi yes yes yes 3239 0
>> OCNFNQ+FreeMonoBold Type 1C WinAnsi yes yes yes 3269 0
>> DHHOAV+DejaVuSans TrueType WinAnsi yes yes yes 3320 0
>> RVTHEX+DejaVuSansMono-Bold TrueType WinAnsi yes yes yes 3479 0
>> ODJFYL+FreeMonoBold Type 1C WinAnsi yes yes yes 3553 0
>> HAXSLA+URWGothic-DemiOblique Type 1C WinAnsi yes yes yes 3560 0
>> [...]
>>
>
> IIUC, the issue is the appearing of non-ascii chars in the output of pdffonts,
> is that correct?
Right.
>
> Arch Linux provides two packages for DejaVu fonts:
> ttf-dejavu and ttf-dejavu-nerd, and both seem to provide DejaVu-Sans-mono
>
> In this test, I install them both, just for the sake of trying to fix the issue:
> https://gitlab.com/linux-kernel/perfbook/-/jobs/4485677006
>
> I also added pdffonts command in the end to make it easier to verify if
> everything is fine, which still outputs non-ascii names.
>
> When I grep for DejaVuSansMono I see them appearing in the output of the job,
> and also in a previous pdf I have downloaded.
>
> I don't quite understand this, but maybe the issue is missing other fonts?
>
> Please help me understand the issue.
As far as I see, there is no font problem on your side.
I think this is regression of Inkscape.
As a matter of fact, Inkscape packages on most rolling-release distros
are having a more annoying regression, random SIGSEGV when run from
CLI under Gnome desktop environment.
See: https://gitlab.com/inkscape/inkscape/-/issues/4177
"glib2 2.76.0 breaks Command Line export"
This issue was opened back on January 24, 2023.
It was once believed to have been resolved with a fix in gtk3, but the
issue still remains after the fixed version of gtk3 reached Fedora 38.
For gitlab-ci, where there is no Gnome desktop involved, this issue
has never affected, but the font markup corruption has sneaked in
without being reported by anyone.
I happened to test Dockerfile.fedora (from fedora:38) and checked if
"DejaVu Sans" was used in Intel_Core2_arch-simplified.pdf as intended,
and failed to see the font markup.
So, I think there is nothing wrong in your gitlab-ci.yaml script.
You need to wait until the regression is fixed in the Arch Linux
Inkscape or its dependency.
I have no idea how long that would take, though.
Or you could switch the container to a fedora:37 or ubuntu:jammy
based one for the moment.
Thanks, Akira
>
> Best regards,
> Leo
>
>
>
>>
>> Thanks, Akira
>>
>>>
>>> So Deckerfile.fedora should stay with Fedora 37 for the moment.
>>>
>>> Quick search of upstream Inkscape's issue tracker didn't hit the
>>> font markup regression. I'll open an issue there unless somebody
>>> else beats me to it.
>>>
>>> So, this patch set consists of the following
>>>
>>> Patch 1/6 adds check of "DejaVu Sans" as nice-to-have font.
>>>
>>> Patch 2/6 updates FAQ-BUILD.txt and Dockerfile.fedora for nice-to-have
>>> font packages.
>>>
>>> Patch 3/6 updates Dockerfile.fedora to stay with Fedora 37, using an ARG
>>> variable so that building from fedora:38 can be possible.
>>> It also adds popller-utils to check the font markup info in PDF properties.
>>>
>>> Patch 4/6 updates Dockerfile (from ubuntu) so that the default base
>>> image is the "latest" (jammy at the moment). There is no reason to stick
>>> with focal (20.04).
>>>
>>> Patch 5/6 adds poppler-utils to Dockerfile (from ubuntu) to detect
>>> Inkscape regression early in case it actually sneaks in.
>>> (Note: Ubuntu 23.04 is safe at the moment.)
>>>
>>> Patch 6/6 changes the default uid:gid pair of container images built
>>> from Dockerfiles to 0:0, which is for rootless mode docker/podman.
>>> Repository at dockerhub for prebuilt images is changed to
>>> akiyks/perfbook-build, where the tags "latest" and "fedora" have
>>> uid:gid pair of 0:0.
>>>
>>> Thanks, Akira
>>> --
>>> Akira Yokosawa (6):
>>> Makefile: Add 'DejaVu Sans' to nice-to-have fonts
>>> FAQ-BUILD: Update nice-to-have fonts for SVG figures
>>> docker/Dockerfile.fedora: Stay with Fedora 37 for the moment
>>> docker/Dockerfile: Use 'latest' as the default tag
>>> docker/Dockerfile: Add poppler-utils package
>>> Dockerfile: Make uid:gid = 0:0 the default
>>>
>>> FAQ-BUILD.txt | 37 ++++++++++++++++++++-----------------
>>> Makefile | 15 ++++++++++++---
>>> docker/Dockerfile | 9 +++++----
>>> docker/Dockerfile.fedora | 16 +++++++++++-----
>>> 4 files changed, 48 insertions(+), 29 deletions(-)
>>>
>>>
>>> base-commit: a80a57b21a5e8ea3dfa90471126920a1131682f7
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH -perfbook 0/6] Update Dockerfiles
2023-06-16 11:05 ` Akira Yokosawa
@ 2023-09-22 23:52 ` Akira Yokosawa
2023-09-27 2:49 ` Leonardo Brás
0 siblings, 1 reply; 13+ messages in thread
From: Akira Yokosawa @ 2023-09-22 23:52 UTC (permalink / raw)
To: Leonardo Brás; +Cc: perfbook, Paul E. McKenney, Akira Yokosawa
Hi Leo,
Follow-up news on font info in PDF:
On 2023/06/16 20:05, Akira Yokosawa wrote:
> On 2023/06/16 15:07, Leonardo Brás wrote:
>> On Thu, 2023-06-15 at 19:43 +0900, Akira Yokosawa wrote:
>>> [+To: Leo]
>>>
>>> On 2023/06/15 18:48, Akira Yokosawa wrote:
>>>> Hi Paul,
>>>>
>>>> Commit a80a57b21a5e ("fixsvgfonts.sh: Convert sans-serif into 'DejaVu Sans'")
>>>> assumed that having "DejaVu Sans Mono" is sufficent for "DejaVu Sans".
>>>>
>>>> It turns out that docker/Dockerfile.fedora doesn't cover "DejaVu Sans".
>>>> Fedora's dejavu-sans-mono-fonts package doesn't contain "DejaVu Sans Mono"!
>>>> There is a meta package of the name dejavu-fonts-all which covers them
>>>> both as well as dejavu-serif-fonts.
>>>>
>>>> It also turns out that Answer to #9 in FAQ-BUILD.txt saying:
>>>>
>>>> As for Ubuntu and Fedora, packages listed in #5 should cover
>>>> all the font families needed.
>>>>
>>>> is wrong on the Fedora front. DejaVu and Liberation fonts need
>>>> font packages dejavu-fonts-all and liberation-fonts.
>>>>
>>>> Furthermore, Fedora 38 (released this April) has a regression of
>>>> Inkscape where font markup is corrupted in SVG --> PDF conversion.
>>>
>>> Leo, just for you info, I see the same regression under Arch Linux.
>>
>> Hello Akira, thanks for letting me know!
>>
>>>
>>> Pick a perfbook.pdf from your gitlab-ci build, and run:
>>>
>>> pdffonts perfbook.pdf
>>>
>>> You will see something like (I don't know how the corrupted encoding
>>> will work in your mailbox...):
>>>
>>> name type encoding emb sub uni object ID
>>> ------------------------------------ ----------------- ---------------- --- --- --- ---------
>>> WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
>>> ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
>>> OTFSIT+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
>>> IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
>>> PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
>>> IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
>>> NWEUXR+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
>>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
>>> UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
>>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
>>> OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
>>> TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
>>> UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
>>> IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
>>> VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
>>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
>>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
>>> JZAPTL+k湌顕 CID Type 0C Identity-H yes yes yes 3038 0
>>> XCILRI+i湌顕 Type 1C WinAnsi yes yes yes 3039 0
>>> CZRRGJ+=潌顕 CID Type 0C Identity-H yes yes yes 3040 0
>>> LAEXLB+o湌顕 Type 1C WinAnsi yes yes yes 3041 0
>>> WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
>>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
>>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
>>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
>>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
>>> DEIMBC+j솛慕 TrueType WinAnsi yes yes yes 3209 0
>>> RWADWA+蛒ୖ TrueType WinAnsi yes yes yes 3238 0
>>> HDCMTE+蛒ୖ TrueType WinAnsi yes yes yes 3239 0
>>> JGKXJS+½���䕖 Type 1C WinAnsi yes yes yes 3269 0
>>> ANXDLC+Xۨ㝖 TrueType WinAnsi yes yes yes 3320 0
>>> RUPDBM+ѓ㡖 Type 1C WinAnsi yes yes yes 3553 00
>>> LWHAZS+秞煕 Type 1C WinAnsi yes yes yes 3560 0
>>> RQGRST+A绞煕 TrueType WinAnsi yes yes yes 3561 0
>>>
>>> [...]
>>>
>>> Expected output is:
>>>
>>> name type encoding emb sub uni object ID
>>> ------------------------------------ ----------------- ---------------- --- --- --- ---------
>>> WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
>>> ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
>>> ICXLWS+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
>>> IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
>>> PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
>>> IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
>>> NUKNCC+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
>>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
>>> UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
>>> EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
>>> OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
>>> TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
>>> UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
>>> IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
>>> VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
>>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
>>> YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
>>> QNDHMI+NimbusSans-Regular CID Type 0C Identity-H yes yes yes 3038 0
>>> JKBTOX+NimbusSans-Regular Type 1C WinAnsi yes yes yes 3039 0
>>> BIKSFC+NimbusSans-Bold CID Type 0C Identity-H yes yes yes 3040 0
>>> XFXZKY+NimbusSans-Bold Type 1C WinAnsi yes yes yes 3041 0
>>> WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
>>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
>>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
>>> WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
>>> LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
>>> KPAYFY+steelcitycomic TrueType WinAnsi yes yes yes 3209 0
>>> IGYOWD+steelcitycomic TrueType WinAnsi yes yes yes 3238 0
>>> LVRVOR+steelcitycomic TrueType WinAnsi yes yes yes 3239 0
>>> OCNFNQ+FreeMonoBold Type 1C WinAnsi yes yes yes 3269 0
>>> DHHOAV+DejaVuSans TrueType WinAnsi yes yes yes 3320 0
>>> RVTHEX+DejaVuSansMono-Bold TrueType WinAnsi yes yes yes 3479 0
>>> ODJFYL+FreeMonoBold Type 1C WinAnsi yes yes yes 3553 0
>>> HAXSLA+URWGothic-DemiOblique Type 1C WinAnsi yes yes yes 3560 0
>>> [...]
>>>
>>
>> IIUC, the issue is the appearing of non-ascii chars in the output of pdffonts,
>> is that correct?
>
> Right.
>
>>
>> Arch Linux provides two packages for DejaVu fonts:
>> ttf-dejavu and ttf-dejavu-nerd, and both seem to provide DejaVu-Sans-mono
>>
>> In this test, I install them both, just for the sake of trying to fix the issue:
>> https://gitlab.com/linux-kernel/perfbook/-/jobs/4485677006
>>
>> I also added pdffonts command in the end to make it easier to verify if
>> everything is fine, which still outputs non-ascii names.
>>
>> When I grep for DejaVuSansMono I see them appearing in the output of the job,
>> and also in a previous pdf I have downloaded.
>>
>> I don't quite understand this, but maybe the issue is missing other fonts?
>>
>> Please help me understand the issue.
>
> As far as I see, there is no font problem on your side.
> I think this is regression of Inkscape.
>
> As a matter of fact, Inkscape packages on most rolling-release distros
> are having a more annoying regression, random SIGSEGV when run from
> CLI under Gnome desktop environment.
>
> See: https://gitlab.com/inkscape/inkscape/-/issues/4177
> "glib2 2.76.0 breaks Command Line export"
>
> This issue was opened back on January 24, 2023.
> It was once believed to have been resolved with a fix in gtk3, but the
> issue still remains after the fixed version of gtk3 reached Fedora 38.
>
> For gitlab-ci, where there is no Gnome desktop involved, this issue
> has never affected, but the font markup corruption has sneaked in
> without being reported by anyone.
>
> I happened to test Dockerfile.fedora (from fedora:38) and checked if
> "DejaVu Sans" was used in Intel_Core2_arch-simplified.pdf as intended,
> and failed to see the font markup.
>
> So, I think there is nothing wrong in your gitlab-ci.yaml script.
> You need to wait until the regression is fixed in the Arch Linux
> Inkscape or its dependency.
It turns out there was a regression in Cairo 1.17.8 (released Feb 2, 2023).
It was fixed in upstream Cairo on Feb 8, 2023.
Soon-to-be-released Cairo 1.18.0 should have the fix.
I guess Arch Linux will get the Cairo upgrade soon after.
See: https://gitlab.freedesktop.org/cairo/cairo/-/issues/806
Thanks, Akira
>
> I have no idea how long that would take, though.
>
> Or you could switch the container to a fedora:37 or ubuntu:jammy
> based one for the moment.
>
> Thanks, Akira
>
>>
>> Best regards,
>> Leo
>>
>>
>>
>>>
>>> Thanks, Akira
[...]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH -perfbook 0/6] Update Dockerfiles
2023-09-22 23:52 ` Akira Yokosawa
@ 2023-09-27 2:49 ` Leonardo Brás
0 siblings, 0 replies; 13+ messages in thread
From: Leonardo Brás @ 2023-09-27 2:49 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: perfbook, Paul E. McKenney
Hello Akira,
On Sat, 2023-09-23 at 08:52 +0900, Akira Yokosawa wrote:
> Hi Leo,
>
> Follow-up news on font info in PDF:
>
> On 2023/06/16 20:05, Akira Yokosawa wrote:
> > On 2023/06/16 15:07, Leonardo Brás wrote:
> > > On Thu, 2023-06-15 at 19:43 +0900, Akira Yokosawa wrote:
> > > > [+To: Leo]
> > > >
> > > > On 2023/06/15 18:48, Akira Yokosawa wrote:
> > > > > Hi Paul,
> > > > >
> > > > > Commit a80a57b21a5e ("fixsvgfonts.sh: Convert sans-serif into 'DejaVu Sans'")
> > > > > assumed that having "DejaVu Sans Mono" is sufficent for "DejaVu Sans".
> > > > >
> > > > > It turns out that docker/Dockerfile.fedora doesn't cover "DejaVu Sans".
> > > > > Fedora's dejavu-sans-mono-fonts package doesn't contain "DejaVu Sans Mono"!
> > > > > There is a meta package of the name dejavu-fonts-all which covers them
> > > > > both as well as dejavu-serif-fonts.
> > > > >
> > > > > It also turns out that Answer to #9 in FAQ-BUILD.txt saying:
> > > > >
> > > > > As for Ubuntu and Fedora, packages listed in #5 should cover
> > > > > all the font families needed.
> > > > >
> > > > > is wrong on the Fedora front. DejaVu and Liberation fonts need
> > > > > font packages dejavu-fonts-all and liberation-fonts.
> > > > >
> > > > > Furthermore, Fedora 38 (released this April) has a regression of
> > > > > Inkscape where font markup is corrupted in SVG --> PDF conversion.
> > > >
> > > > Leo, just for you info, I see the same regression under Arch Linux.
> > >
> > > Hello Akira, thanks for letting me know!
> > >
> > > >
> > > > Pick a perfbook.pdf from your gitlab-ci build, and run:
> > > >
> > > > pdffonts perfbook.pdf
> > > >
> > > > You will see something like (I don't know how the corrupted encoding
> > > > will work in your mailbox...):
> > > >
> > > > name type encoding emb sub uni object ID
> > > > ------------------------------------ ----------------- ---------------- --- --- --- ---------
> > > > WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
> > > > ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
> > > > OTFSIT+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
> > > > IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
> > > > PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
> > > > IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
> > > > NWEUXR+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
> > > > EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
> > > > UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
> > > > EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
> > > > OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
> > > > TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
> > > > UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
> > > > IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
> > > > VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
> > > > YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
> > > > YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
> > > > JZAPTL+k湌顕 CID Type 0C Identity-H yes yes yes 3038 0
> > > > XCILRI+i湌顕 Type 1C WinAnsi yes yes yes 3039 0
> > > > CZRRGJ+=潌顕 CID Type 0C Identity-H yes yes yes 3040 0
> > > > LAEXLB+o湌顕 Type 1C WinAnsi yes yes yes 3041 0
> > > > WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
> > > > WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
> > > > LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
> > > > WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
> > > > LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
> > > > DEIMBC+j솛慕 TrueType WinAnsi yes yes yes 3209 0
> > > > RWADWA+蛒ୖ TrueType WinAnsi yes yes yes 3238 0
> > > > HDCMTE+蛒ୖ TrueType WinAnsi yes yes yes 3239 0
> > > > JGKXJS+½���䕖 Type 1C WinAnsi yes yes yes 3269 0
> > > > ANXDLC+Xۨ㝖 TrueType WinAnsi yes yes yes 3320 0
> > > > RUPDBM+ѓ㡖 Type 1C WinAnsi yes yes yes 3553 00
> > > > LWHAZS+秞煕 Type 1C WinAnsi yes yes yes 3560 0
> > > > RQGRST+A绞煕 TrueType WinAnsi yes yes yes 3561 0
> > > >
> > > > [...]
> > > >
> > > > Expected output is:
> > > >
> > > > name type encoding emb sub uni object ID
> > > > ------------------------------------ ----------------- ---------------- --- --- --- ---------
> > > > WGDPYX+LMMono8-Regular Type 1 Custom yes yes yes 1722 0
> > > > ULGKTM+TeXGyreTermesX-Regular Type 1 Custom yes yes yes 1725 0
> > > > ICXLWS+LMMono12-Regular Type 1 Custom yes yes yes 1726 0
> > > > IYVMBP+TeXGyreTermesX-Bold Type 1 Custom yes yes yes 1741 0
> > > > PSUFXP+TeXGyreTermes-Regular Type 1 Custom yes yes yes 1742 0
> > > > IMBSNT+NimbusRomNo9L-Regu-Slant_167 Type 1 Custom yes yes yes 1929 0
> > > > NUKNCC+LMMonoLt10-Bold Type 1 Custom yes yes yes 2227 0
> > > > EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2673 0
> > > > UHVCIJ+LinBiolinumT Type 1 Custom yes yes yes 2674 0
> > > > EOPMEH+LinBiolinumTI Type 1 Custom yes yes yes 2677 0
> > > > OIRARM+LMMono10-Regular Type 1 Custom yes yes yes 2764 0
> > > > TLODOC+txsys Type 1 Builtin yes yes yes 2828 0
> > > > UFJTMD+StandardSymL Type 1 Builtin yes yes yes 2830 0
> > > > IGSKIX+NewTXMI5 Type 1 Builtin yes yes yes 2831 0
> > > > VVGNAR+TeXGyreTermesX-Italic Type 1 Custom yes yes yes 2921 0
> > > > YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 2980 0
> > > > YFRDMR+NimbusSanL-Regu Type 1 Custom yes yes no 3012 0
> > > > QNDHMI+NimbusSans-Regular CID Type 0C Identity-H yes yes yes 3038 0
> > > > JKBTOX+NimbusSans-Regular Type 1C WinAnsi yes yes yes 3039 0
> > > > BIKSFC+NimbusSans-Bold CID Type 0C Identity-H yes yes yes 3040 0
> > > > XFXZKY+NimbusSans-Bold Type 1C WinAnsi yes yes yes 3041 0
> > > > WJVJMV+NimbusSans-Regular Type 1C Custom yes yes no 3066 0
> > > > WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3129 0
> > > > LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3130 0
> > > > WGDQZH+NimbusSans-Regular Type 1C WinAnsi yes yes no 3159 0
> > > > LSRNIT+NimbusSans-BoldItalic Type 1C WinAnsi yes yes no 3160 0
> > > > KPAYFY+steelcitycomic TrueType WinAnsi yes yes yes 3209 0
> > > > IGYOWD+steelcitycomic TrueType WinAnsi yes yes yes 3238 0
> > > > LVRVOR+steelcitycomic TrueType WinAnsi yes yes yes 3239 0
> > > > OCNFNQ+FreeMonoBold Type 1C WinAnsi yes yes yes 3269 0
> > > > DHHOAV+DejaVuSans TrueType WinAnsi yes yes yes 3320 0
> > > > RVTHEX+DejaVuSansMono-Bold TrueType WinAnsi yes yes yes 3479 0
> > > > ODJFYL+FreeMonoBold Type 1C WinAnsi yes yes yes 3553 0
> > > > HAXSLA+URWGothic-DemiOblique Type 1C WinAnsi yes yes yes 3560 0
> > > > [...]
> > > >
> > >
> > > IIUC, the issue is the appearing of non-ascii chars in the output of pdffonts,
> > > is that correct?
> >
> > Right.
> >
> > >
> > > Arch Linux provides two packages for DejaVu fonts:
> > > ttf-dejavu and ttf-dejavu-nerd, and both seem to provide DejaVu-Sans-mono
> > >
> > > In this test, I install them both, just for the sake of trying to fix the issue:
> > > https://gitlab.com/linux-kernel/perfbook/-/jobs/4485677006
> > >
> > > I also added pdffonts command in the end to make it easier to verify if
> > > everything is fine, which still outputs non-ascii names.
> > >
> > > When I grep for DejaVuSansMono I see them appearing in the output of the job,
> > > and also in a previous pdf I have downloaded.
> > >
> > > I don't quite understand this, but maybe the issue is missing other fonts?
> > >
> > > Please help me understand the issue.
> >
> > As far as I see, there is no font problem on your side.
> > I think this is regression of Inkscape.
> >
> > As a matter of fact, Inkscape packages on most rolling-release distros
> > are having a more annoying regression, random SIGSEGV when run from
> > CLI under Gnome desktop environment.
> >
> > See: https://gitlab.com/inkscape/inkscape/-/issues/4177
> > "glib2 2.76.0 breaks Command Line export"
> >
> > This issue was opened back on January 24, 2023.
> > It was once believed to have been resolved with a fix in gtk3, but the
> > issue still remains after the fixed version of gtk3 reached Fedora 38.
> >
> > For gitlab-ci, where there is no Gnome desktop involved, this issue
> > has never affected, but the font markup corruption has sneaked in
> > without being reported by anyone.
> >
> > I happened to test Dockerfile.fedora (from fedora:38) and checked if
> > "DejaVu Sans" was used in Intel_Core2_arch-simplified.pdf as intended,
> > and failed to see the font markup.
> >
> > So, I think there is nothing wrong in your gitlab-ci.yaml script.
> > You need to wait until the regression is fixed in the Arch Linux
> > Inkscape or its dependency.
>
> It turns out there was a regression in Cairo 1.17.8 (released Feb 2, 2023).
> It was fixed in upstream Cairo on Feb 8, 2023.
> Soon-to-be-released Cairo 1.18.0 should have the fix.
Thanks for the update!
> I guess Arch Linux will get the Cairo upgrade soon after.
Today Cairo got updated to 1.18.0 in Arch Linux, and it totally fixes the issue.
Check this pipeline (fixed):
https://gitlab.com/linux-kernel/perfbook/-/pipelines/1017496054
The previous pipeline still reproduces the issue:
https://gitlab.com/linux-kernel/perfbook/-/pipelines/1014892578
Thanks!
Leo
>
> See: https://gitlab.freedesktop.org/cairo/cairo/-/issues/806
>
> Thanks, Akira
>
> >
> > I have no idea how long that would take, though.
> >
> > Or you could switch the container to a fedora:37 or ubuntu:jammy
> > based one for the moment.
> >
> > Thanks, Akira
> >
> > >
> > > Best regards,
> > > Leo
> > >
> > >
> > >
> > > >
> > > > Thanks, Akira
> [...]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-09-27 2:49 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 9:48 [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
2023-06-15 9:49 ` [PATCH -perfbook 1/6] Makefile: Add 'DejaVu Sans' to nice-to-have fonts Akira Yokosawa
2023-06-15 9:51 ` [PATCH -perfbook 2/6] FAQ-BUILD: Update nice-to-have fonts for SVG figures Akira Yokosawa
2023-06-15 9:52 ` [PATCH -perfbook 3/6] docker/Dockerfile.fedora: Stay with Fedora 37 for the moment Akira Yokosawa
2023-06-15 9:53 ` [PATCH -perfbook 4/6] docker/Dockerfile: Use 'latest' as the default tag Akira Yokosawa
2023-06-15 9:54 ` [PATCH -perfbook 5/6] docker/Dockerfile: Add poppler-utils package Akira Yokosawa
2023-06-15 9:56 ` [PATCH -perfbook 6/6] Dockerfile: Make uid:gid = 0:0 the default Akira Yokosawa
2023-06-15 10:43 ` [PATCH -perfbook 0/6] Update Dockerfiles Akira Yokosawa
2023-06-16 6:07 ` Leonardo Brás
2023-06-16 11:05 ` Akira Yokosawa
2023-09-22 23:52 ` Akira Yokosawa
2023-09-27 2:49 ` Leonardo Brás
2023-06-15 16:49 ` Paul E. McKenney
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 NNTP newsgroup(s).