Discussion:
[pdftex] pdftex - Support for Type3 fonts
Pali Rohár
2016-07-31 18:26:33 UTC
Permalink
Hi! Is there any way to download external Type3 font into output PDF
file when generating it?

I tried it in same way as Type1 font (via \pdfmapline) but pdftex show
me fatal error:

!pdfTeX error: Type3 fonts unsupported by pdfTeX

==> Fatal error occurred, no output PDF file produced!

PDF format supports also Type3 fonts, so I think that pdfTeX could
support it somehow...
--
Pali Rohár
***@gmail.com
Karl Berry
2016-08-03 22:07:52 UTC
Permalink
Is there any way to download external Type3 font into output PDF

I'm afraid I have nothing to offer here, and it's nothing I'm likely to
implement in the foreseeable future. Sorry. Maybe you could develop a
patch? -k
Pali Rohár
2016-08-03 22:14:51 UTC
Permalink
Post by Pali Rohár
Is there any way to download external Type3 font into output PDF
I'm afraid I have nothing to offer here, and it's nothing I'm likely
to implement in the foreseeable future. Sorry. Maybe you could
develop a patch? -k
Ok thank you for answer. As I understand you Type3 fonts are not supported by pdftex.
--
Pali Rohár
***@gmail.com
Reinhard Kotucha
2016-08-03 23:25:47 UTC
Permalink
Post by Pali Rohár
Post by Pali Rohár
Is there any way to download external Type3 font into output PDF
I'm afraid I have nothing to offer here, and it's nothing I'm
likely to implement in the foreseeable future. Sorry. Maybe you
could develop a patch? -k
Ok thank you for answer. As I understand you Type3 fonts are not supported by pdftex.
The problem is that Type 3 fonts can contain arbitrary PostScript code
and thus require a full-fledged PostScript interpreter.

Can't you convert the fonts to Type 1 somehow in advance?

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Pali Rohár
2016-08-04 07:06:25 UTC
Permalink
Post by Reinhard Kotucha
Post by Pali Rohár
Post by Pali Rohár
Is there any way to download external Type3 font into output PDF
I'm afraid I have nothing to offer here, and it's nothing I'm
likely to implement in the foreseeable future. Sorry. Maybe you
could develop a patch? -k
Ok thank you for answer. As I understand you Type3 fonts are not supported by pdftex.
The problem is that Type 3 fonts can contain arbitrary PostScript code
and thus require a full-fledged PostScript interpreter.
But is not Type 3 font support required by PDF standards? I thought yes.
Post by Reinhard Kotucha
Can't you convert the fonts to Type 1 somehow in advance?
I'm just asking if such thing is supported by pdftex... If not scratch
that, not a fatal problem for me.
--
Pali Rohár
***@gmail.com
Martin Schröder
2016-08-04 08:33:07 UTC
Permalink
Post by Pali Rohár
Ok thank you for answer. As I understand you Type3 fonts are not supported by pdftex.
IIRC this is wrong: Bitmap fonts (e.g. Metafont fonts) _are_ converted
to Type3 fonts
and work with PDF. So at least _some_ kind of Type3 fonts are
supported (or generated
by pdfTeX).

Best
Martin
Reinhard Kotucha
2016-08-04 22:04:08 UTC
Permalink
Post by Martin Schröder
Post by Pali Rohár
Ok thank you for answer. As I understand you Type3 fonts are not supported by pdftex.
IIRC this is wrong: Bitmap fonts (e.g. Metafont fonts) _are_
converted to Type3 fonts and work with PDF. So at least _some_ kind
of Type3 fonts are supported (or generated by pdfTeX).
Thinking about the issue again, I fear that what I said in a former
message was wrong. In order to *insert* a Type3 font into a PDF
file, no PostScript interpreter is needed, of course.

The Type3 format doesn't support hinting, hence Type3 fonts always
look extremely ugly at low resolutions. I suppose that FontForge can
convert Type3 to Type1 and apply hints automatically.

Is there any reason not to go this way? The conversion has to be done
only once.

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Karl Berry
2016-08-04 22:07:33 UTC
Permalink
I'm just asking if such thing is supported by pdftex...

As the error message said: there's nothing in pdftex that can handle
arbitrary incoming Type 3 fonts, if that's what you're after. As far as
I know.

PDF does support a form of Type 3 fonts (which is why pdftex can write
them from pk bitmaps). It's similar to but simplified from PostScript
Type 3. Described in section "9.6.5 Type 3 Fonts" (p.266ff.) in the
PDF32000_2008.pdf reference.

Thus, I see no reason in principle why pdftex could not read them, if
someone wants to put in the work. I don't recall the question ever
coming up before.

(Coincidentally, there was an interesting talk at TUG16 about using
Type3 fonts to do math operator sizing, which was the first time I'd
seen Type 3 fonts come up in ages.
http://tug.org/tug2016/abstracts/bayar.txt)

karl
Ross Moore
2016-08-04 23:49:37 UTC
Permalink
Hi Karl, Pali,

On Aug 5, 2016, at 8:07 AM, Karl Berry <***@freefriends.org<mailto:***@freefriends.org>> wrote:

I'm just asking if such thing is supported by pdftex...

As the error message said: there's nothing in pdftex that can handle
arbitrary incoming Type 3 fonts, if that's what you're after. As far as
I know.

PDF does support a form of Type 3 fonts (which is why pdftex can write
them from pk bitmaps). It's similar to but simplified from PostScript
Type 3. Described in section "9.6.5 Type 3 Fonts" (p.266ff.) in the
PDF32000_2008.pdf reference.

Correct.

PDF Type 3 fonts can contain arbitrary PDF graphics operators,
but no hinting. They must be packaged correctly.

Compare this with PostScript Type 3 fonts,
which can contain arbitrary PostScript graphics operators.
A PDF reader need not support PostScript Type 3 fonts,
but should support PDF Type 3 fonts.

One purpose of PDF was to *not* require a full PostScript
engine, with its Turing-completeness and associated
vulnerability to malicious attacks from within documents.


Thus, I see no reason in principle why pdftex could not read them, if
someone wants to put in the work. I don't recall the question ever
coming up before.

Pali, can you provide a version of your example where pdftex
complained about the Type 3 font?
Maybe it used PostScript operators that are not part of PDF,
or something else was wrong with how the font was structured?


(Coincidentally, there was an interesting talk at TUG16 about using
Type3 fonts to do math operator sizing, which was the first time I'd
seen Type 3 fonts come up in ages.
http://tug.org/tug2016/abstracts/bayar.txt)

karl


Cheers

Ross


Dr Ross Moore
Mathematics Dept | Level 2, S2.638 AHH
Macquarie University, NSW 2109, Australia

T: +61 2 9850 8955 | F: +61 2 9850 8114
M:+61 407 288 255 | E: ***@mq.edu.au<mailto:***@mq.edu.au>

http://www.maths.mq.edu.au


[cid:***@01D030BE.D37A46F0]


CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University.

Loading...