0
0 Comments

For some time now, we have had the problem that PDF24 does not use Windows fonts when displaying PDFs, even if they are available.

In my case the font SegoeUI, respectively SegoeUI,Bold which is replaced by NimbusMonoPS-Regular. This is despite the fact that the sFONTPATH parameter is set correctly in the gswinc.exe call.

The call on the console looks like this:
----------------
“C:\Program Files\PDF24\gs\bin\gswinc. exe” -dBATCH -dNOPAUSE -dSAFER -dALLOWPSTRANSPARENCY ”-sFONTPATH=C:\WINDOWS\Fonts;C: \Users\Username\AppData\Local\Microsoft\Windows\Fonts” -dNEWPDF=true -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72 -dFirstPage=1 -dLastPage=1 -sDEVICE=png16m -dDownScaleFactor=1 ”-sOutputFile=C:\Users\S7445~1. USE\AppData\Local\Temp\PDF24\9_87764609_398350540.png” ‘C:\Users\S7445~1.USE\AppData\Local\Temp\PDF24\unlocked_8_87764437_1152102662.pdf’
----------------
GPL Ghostscript 10.02.1 (2023-11-01)
Copyright (C) 2023 Artifex Software, Inc. all rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 1.
Page 1
Loading font SegoeUI,Bold (or substitute) from %rom%Resource/Font/NimbusMonoPS-Regular
Loading font SegoeUI (or substitute) from %rom%Resource/Font/NimbusMonoPS-Regular
----------------

Using a different font causes problems with the character spacing and the document is not formatted correctly.

How can we ensure that the display is rendered with the correct fonts?

Stefan Ziegler Answered question 2024-06-03