[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1029168: fonts-urw-base35: Apache pdfbox cannot load fonts. Complains "Start marker missing"



On Sat, 21 Jan 2023, James Cloos wrote:

> oh, and one way to convert the .t1 to traditional pfa or pfb is like this:
> 
> t1disasm …/urw-base35/NimbusRoman-Bold.t1|t1asm -b -o NimbusRoman-Bold.pfb

Except that this does not work for C059-Italic.t1 (see
https://bugs.debian.org/1029289).


On Sat, 21 Jan 2023, Fabian Greffrath wrote:

> We must not forget the primary purpose of these fonts, and that is to
> serve as the 35 base fonts for ghostscript! Thus, I consider it out of
> question to modify the original T1 fonts in this package.
> 
> What we may discuss about is to replace the "compatibility symlinks" in
> /usr/share/fonts/X11/Type1 with actual converted PFB files.

That would be an option.  But X11 works for me with the symlinks
without problems (it's only necessary that they are named .pfb not
.t1).

So from a "requirement" point of view it's only pdfbox, which fails on
.pfb files without the binary segment headers (and t1utils, which
fails with C059-Italic.t1, which can be repaired with my segmentheader
generator script).

> > doesn't handle C059-Italic.t1 correctly but generates a completely
> > broken font file.

> Does it work if you first convert to PFA format and from there to PFB
> format?

No,
 t1ascii C059-Italic.t1 | t1binary | t1disasm
still has a binary blob (near definition of /uni0496).

So t1utils are not able to handle C059-Italic.t1 at all (unless this
font is patched with segment headers using my script before).

I just compared the output of t1disasm of the original .t1 fonts and
my patched fonts and noticed that the result is identical except
C059-Italic.t1 and P052-italic.t1, which both have (unexpected) binary
data in their disassembled output.


I understand, that you do not want to modify the official urw-base35
.t1 fonts, since FreeType is able to handle them as they are, but from
robustness principle view
(https://en.wikipedia.org/wiki/Robustness_principle)
"be conservative in what you send, be liberal in what you accept",
it may be a good idea to "convert" the .t1 fonts to .pfb fonts by
adding thes segment headers (and maybe rename them to .pfb), so all
software (not only FreeType) is able to use them...

Because there is other software, that doesn't support the fonts as
they are:
- X11 does not accept the .t1 suffix
- pdfbox does not accept .t1 suffix and missing segment headers
- t1utils fails on missing segment headers on C059-Italic.t1 and
  P052-italic.t1

So the current .t1 fonts are not really conservative...

Greetings
Roland


Reply to: