10

As pointed out in the answer to PDF file size with LuaLaTeX vs XeLaTeX, the difference between using Type 1 and Type 1C fonts in two documents made a big difference in file size.

File size is important in the PDF files I'm working with. So my question is can you force LuaLaTeX to embed a Type 1C font instead of Type 1? This is something XeLaTeX can do (and in the case of the question cited above, did automatically).

The font I'm working with is Gill Sans MT (I believe it comes with Adobe CS). While I'm not opposed to changing fonts, I'd still like to know how LuaLaTeX decides how to embed fonts and how it can be changed.

3 Answers 3

8

I do not know how to make lualatex output Type 1C fonts. However, you may be able to use ps2pdf to convert a PDF containing Type 1 fonts to another PDF containing Type1C fonts. You should carefully choose parameters to ps2pdf. For example:

newell:~/latex/help $ du -h plain.pdf
60K plain.pdf
newell:~/latex/help $ pdffonts plain.pdf 
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
BZAAVM+NimbusSanL-Bold               Type 1            yes yes no      17  0
YCENSD+LMMathItalic12-Regular        Type 1            yes yes no      18  0
KDKAQG+CMSS12                        Type 1            yes yes no      19  0
IDSSCN+NimbusSanL-Regu               Type 1            yes yes no      20  0
ZIJBJP+NimbusSanL-ReguItal           Type 1            yes yes no      21  0
SEAJVD+NimbusSanL-BoldItal           Type 1            yes yes no      22  0
SQTJQN+LMMathSymbols10-Regular       Type 1            yes yes no      23  0
newell:~/latex/help $ ps2pdf -dPDFSETTINGS=/prepress -dAutoRotatePages=/None -dEmbedAllFonts=true -dMaxSubsetPct=100 -dSubsetFonts=true -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dDownsampleColorImages=false -dDownsampleGrayImages=false -dDownsampleMonoImages=false plain.pdf new.pdf
newell:~/latex/help $ du -h new.pdf
36K new.pdf
newell:~/latex/help $ pdffonts new.pdf 
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
OJEPRS+NimbusSanL-BoldItal           Type 1C           yes yes no      23  0
OJIXHX+LMMathSymbols10-Regular       Type 1C           yes yes no      25  0
CYORGJ+NimbusSanL-Bold               Type 1C           yes yes no      13  0
MZVUTG+LMMathItalic12-Regular        Type 1C           yes yes yes     15  0
PWIYDZ+CMSS12                        Type 1C           yes yes no      17  0
QBTHSF+NimbusSanL-Regu               Type 1C           yes yes no      19  0
XMYGAL+NimbusSanL-ReguItal           Type 1C           yes yes no      21  0
1
  • This is a servicable work-around. Commented Jun 6, 2012 at 14:47
8

Luatex never writes Type1C fonts. You will get smaller pdfs if you use OpenType/TrueType fonts instead of Type1 (luatex writes CIDType0 fonts for those) but otherwise pstopdf is the alternative. Unless someone supplies a patch, this situation is unlikely to change.

6
  • I wonder why there is no new version auf LuaTeX since almost a year. Your answer here seems to hint that you are not on it. Sorry for molesting you here, if somewhere the ongoing development of LuaTeX is being discussed, and I really hope, you don't mind being asked here.
    – Keks Dose
    Commented May 11, 2012 at 13:40
  • @KeksDose: foundry.supelec.fr/gf/project/luatex Commented May 11, 2012 at 13:53
  • @KhaledHosny As far as I can see, still »beta 0.70.1« .
    – Keks Dose
    Commented May 11, 2012 at 14:14
  • @KeksDose: mailing list [email protected]. There is no new version yet because daily bread is more important than luatex releases. Commented May 11, 2012 at 14:19
  • @TacoHoekwater I actually am using an Open Type font. I'm loading it fontspec. Commented Jun 6, 2012 at 14:39
1

If you are not forced to use LuaLaTeX for some reason, why don't you use pdfLaTeX and shrink the PDF afterwards by using the formidable python programm pdfsizeopt.py? See here: How to create small PDF files for the Internet?

2
  • 1
    Why wouldn’t this work with LuaTeX generated PDF? Commented May 11, 2012 at 13:51
  • @KhaledHosny Don't know why, but it never did with the PDFs I produced with LuaTeX.
    – Keks Dose
    Commented May 11, 2012 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .