[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"



Hi fabian!

On Fri, 20 Jan 2023, fabian@greffrath.com wrote:

> Am 20.01.2023 11:49, schrieb Roland Rosenfeld:
> > So from my point of view we shouldn't remove the symlinks (since we
> > want to use these fonts in X11) but we should change the symlink
> > filenames from .pfb to .t1 and change urw-fonts-base35.scale
> > accordingly (hope that this works as expected, since I didn't try this
> > out yet).
> 
> Alright, sounds like a reasonable plan to me. At least more
> reasonable than a format conversion at package build time. ;)

Sadly it sounds much better than it really works.
I tried this out in
https://salsa.debian.org/roland/fonts-urw-base35/-/tree/t1 and the
resulting package doesn't show the fonts in X11.
(don't forget to run "xset fp rehash" after installing or changing the
package).

A downgrade to fonts-urw-base35 20200910-6 solves the issue.

So X11 seems to be unable to handle the fonts if their file suffix is
neither .pfa or .pfb but .t1 :-(

If you try to reproduce my tests, I attached fonts-portrait.fig, which
I open with xfig.  This should show a list of fonts that xfig can
handle, all of them should be scalable and no errors or warnings
should pop up (don't forget the "xset fp rehash" after installing a
different version of fonts-urw-base35).


I searched for some definition that says, that a .pfb file has to
be prefixed with 80 01 91 03 00 00 (in front of %!PS-AdobeFont-1.),
but didn't find such a specification.
https://git.in-ulm.de/cbiedl/file/src/master/magic/Magdir/fonts
refers to http://mark0.net/download/triddefs_xml.7z defs/p/pfb.trid.xml,
which defines the following pattern
        <FrontBlock>
                <Pattern>
                        <Bytes>8001</Bytes>
                        <Pos>0</Pos>
                </Pattern>
                <Pattern>
                        <Bytes>00002521</Bytes>
                        <ASCII> . . % !</ASCII>
                        <Pos>4</Pos>
                </Pattern>
        </FrontBlock>
for pfb-files, but this isn't a specification but only some trial to
identify pfb files...

In the T1 font format specification
https://web.archive.org/web/20150321034514/http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF
I don't find anything about pfb especially not about some 0x8001 file
prefix.


Anyway, it still may be a good idea to run the t1 file through
t1binary(1) at build time to add this 80 01 91 03 00 00 header.

So I tried so in
https://salsa.debian.org/roland/fonts-urw-base35/-/commits/t1binary
which I expected to work in the same way as 20200910-6 does, but I had
to notice, that my above mentioned xfig test fails with century
schoolbook font now sometimes (okay, I reproduced this multiple times
while switching between -6 and my -7, but now I cannot reproduce the
issue any longer with my -7, maybe I should pause and try this out
later (maybe on a different machine)...

But I send this mail out now, maybe my "results" can help somebody
with his further research...

Greetings
Roland

PS: Just noticed, that the build pipeline of my above t1binary
    branch fails because the converted C059-Italic.t1 now triggers the
    flowing warning:
    "cp1252 "\x90" does not map to Unicode at
    /usr/share/lintian/lib/Lintian/Check/Fonts/Postscript/Type1.pm
    line 57."
    (whatever this means, maybe some bug in lintian).

Attachment: fonts-portrait.fig
Description: application/xfig


Reply to: