Skip to contentSkip to conversation

Abandon font embedding by gnuplot

Suggestion -perfbook Akira Yokosawa 2 participants 4 messages Sep 3, 2021 – Sep 6, 2021

lore
Share & tools
lore
#0 lore raw

Hi Paul,

When I tried to run gnuplot under formal/data/ on a smallish Fedora container image to test the update of Figure 12.10, it failed with the error of:

sh: line 1: pfbtops: command not found
line 0: Command 'pfbtops /usr/share/texlive/texmf-dist/fonts/
.../uhvr8a.pfb' genereted error, exitcode is 32512

It turned out that I needed to install groff. And gnuplot ran happily.

While I looked formal/data/plot.sh, if I removed the options:

    enhanced "NimbusSanL-Regu" fontfile "${font}"

in the first line of gnuplot instructions, gnuplot ran fine without groff installed.

I think the fontfile option is for embedding font data into .eps files.

Now we are doing .eps -> .pdf conversion via a2ping (or ghostscript), so I don't think font embedding is necessary.

Furthermore, gnuplot's default of Helvetica font is overridden on-the-fly by fixfonts.sh and its friends.

So there is no concern of embedding Helvetica font in the generated pdf figures.

In the test on my side, generated pdf figures have the same font properties regardless of the fontfile option.

So I'd like to ask you if it is ok to remove those fontfile options in the plot scripts under CodeSamples/.
Removing them will reduce .eps file size and hopefully might reduce time of (the lots of) .eps -> .pdf conversions.

Side note: plot.sh under formal/data should be moved under CodeSamples/formal/ for the sake of consistency, I suppose.

Thanks, Akira

#1 lore raw
Quoted 4 lines · Akira Yokosawa

Hi Paul,

When I tried to run gnuplot under formal/data/ on a smallish Fedora container image to test the update of Figure 12.10, it failed with

                                        (typo) 12.4
Quoted 40 lines

the error of:

sh: line 1: pfbtops: command not found
line 0: Command 'pfbtops /usr/share/texlive/texmf-dist/fonts/
.../uhvr8a.pfb' genereted error, exitcode is 32512

It turned out that I needed to install groff. And gnuplot ran happily.

While I looked formal/data/plot.sh, if I removed the options:

    enhanced "NimbusSanL-Regu" fontfile "${font}"

in the first line of gnuplot instructions, gnuplot ran fine without groff installed.

I think the fontfile option is for embedding font data into .eps files.

Now we are doing .eps -> .pdf conversion via a2ping (or ghostscript), so I don't think font embedding is necessary.

Furthermore, gnuplot's default of Helvetica font is overridden on-the-fly by fixfonts.sh and its friends.

So there is no concern of embedding Helvetica font in the generated pdf figures.

In the test on my side, generated pdf figures have the same font properties regardless of the fontfile option.

So I'd like to ask you if it is ok to remove those fontfile options in the plot scripts under CodeSamples/.
Removing them will reduce .eps file size and hopefully might reduce time of (the lots of) .eps -> .pdf conversions.

Side note: plot.sh under formal/data should be moved under CodeSamples/formal/ for the sake of consistency, I suppose.

Thanks, Akira

#2 lore raw
In reply to Akira Yokosawa
Quoted 2 lines · Akira Yokosawa

Hi Paul,

[...]

Quoted 13 lines

I think the fontfile option is for embedding font data into .eps files.

Now we are doing .eps -> .pdf conversion via a2ping (or ghostscript), so I don't think font embedding is necessary.

Furthermore, gnuplot's default of Helvetica font is overridden on-the-fly by fixfonts.sh and its friends.

So there is no concern of embedding Helvetica font in the generated pdf figures.

Quoted 7 lines

In the test on my side, generated pdf figures have the same font properties regardless of the fontfile option.

So I'd like to ask you if it is ok to remove those fontfile options in the plot scripts under CodeSamples/.
Removing them will reduce .eps file size and hopefully might reduce time of (the lots of) .eps -> .pdf conversions.

Well, in reality, eps -> .pdf conversion takes longer when the fontfile option is removed.
I guess this is because ghostscript needs to fetch a proper font file on the system to embed used font data into PDF.

So, I'm retracting this suggestion.

Sorry for the noise.

Quoted 3 lines

Side note: plot.sh under formal/data should be moved under CodeSamples/formal/ for the sake of consistency, I suppose.

I'll try this directory move.

Thanks, Akira

Quoted 3 lines

Thanks, Akira

#3 lore raw
Quoted 25 lines · Akira Yokosawa
Quoted 2 lines · Akira Yokosawa

Hi Paul,

[...]

Quoted 13 lines

I think the fontfile option is for embedding font data into .eps files.

Now we are doing .eps -> .pdf conversion via a2ping (or ghostscript), so I don't think font embedding is necessary.

Furthermore, gnuplot's default of Helvetica font is overridden on-the-fly by fixfonts.sh and its friends.

So there is no concern of embedding Helvetica font in the generated pdf figures.

Quoted 7 lines

In the test on my side, generated pdf figures have the same font properties regardless of the fontfile option.

So I'd like to ask you if it is ok to remove those fontfile options in the plot scripts under CodeSamples/.
Removing them will reduce .eps file size and hopefully might reduce time of (the lots of) .eps -> .pdf conversions.

Quoted 8 lines

Well, in reality, eps -> .pdf conversion takes longer when the fontfile option is removed.
I guess this is because ghostscript needs to fetch a proper font file on the system to embed used font data into PDF.

So, I'm retracting this suggestion.

Sorry for the noise.

Not a problem, in fact, thank you for trying it out.

Quoted 4 lines
Quoted 2 lines

Side note: plot.sh under formal/data should be moved under CodeSamples/formal/ for the sake of consistency, I suppose.

I'll try this directory move.

Sounds good, and I am looking forward to seeing the patch.

Thanx, Paul