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

Bug#424404: PDF files are much larger with lmodern than with CM fonts



Hi Martin, hi all!

(Martin, I ask you because you seem to be the only one I know who
actually can answer about the font downloading properties of pdftex)

We got a bug report about pdf files made with lmodern fonts being much
bigger than those with cmr fonts (both in type1 format). For a tex file
containing just a simple "A" the size diff is big:
  3179  15922 A
(first is with cmr10, second with lmr10)

I took a look, generate two pdf with once aeguill and once with
lmodern, you get two pdf files. Uncompress them with
	pdftk aeguill.pdf output aeguill-uncompressed.pdf uncompress
and the same with lmodern.pdf

vim *-uncompressed.pdf shows that the part of the font included is much
bigger.

So I disassemdled cmr10 and lmr10 (note that I have no idea about
PostScript coding but a very primitive one)

For cmr10 we get:
/A {
        32 750 hsbw
        0 31 hstem
        228 31 hstem
        696 20 hstem
        0 685 vstem
        366 696 rmoveto
        -5 13 -2 7 -16 0 rrcurveto
        -16 0 -3 -6 -5 -14 rrcurveto
        -207 -598 rlineto
        -18 -51 -40 -15 -54 -1 rrcurveto
        -31 vlineto
        23 1 43 2 36 0 rrcurveto
        31 0 52 -2 32 -1 rrcurveto
        31 vlineto
        -50 -25 25 26 hvcurveto
        0 3 1 10 1 2 rrcurveto
        46 131 rlineto
        247 hlineto
        53 -153 rlineto
        1 -4 2 -6 0 -4 rrcurveto
        -30 -56 0 -27 vhcurveto
        -31 vlineto
        36 3 70 0 38 0 rrcurveto
        43 0 46 -1 42 -2 rrcurveto
        31 vlineto
        -18 hlineto
        -60 0 -14 7 -11 33 rrcurveto
        closepath
        -269 513 rmoveto
        113 -325 rlineto
        -225 hlineto
        closepath
        endchar
        } ND


For lmr10 we get:
/A {
        32 750 hsbw
        546 callsubr
        endchar
        } ND

with
dup 546 {
        0 31 hstem
        228 31 hstem
        716 -20 hstem
        685 hmoveto
        31 vlineto
        -18 hlineto
        -60 0 -14 7 -11 33 rrcurveto
        -216 625 rlineto
        -5 13 -2 7 -16 0 rrcurveto
        -16 0 -3 -6 -5 -14 rrcurveto
        -207 -598 rlineto
        -18 -51 -40 -15 -54 -1 rrcurveto
        -31 vlineto
        102 3 rlineto
        115 -3 rlineto
        31 vlineto
        -50 -25 25 26 hvcurveto
        0 3 1 10 1 2 rrcurveto
        46 131 rlineto
        247 hlineto
        53 -153 rlineto
        1 -4 2 -6 0 -4 rrcurveto
        -30 -56 0 -27 vhcurveto
        -31 vlineto
        36 3 70 0 38 0 rrcurveto
        closepath
        -128 256 rmoveto
        -225 hlineto
        112 325 rlineto
        closepath
        return
        } NP


So this shouldn't be the problem. Both are about the same size.

Now the question is, what else is included in the downloaded stream.
Unfortunately even after the uncompress the font stream is binary, so I
don't know how to continue. Could it be that for lmodern all subroutines
defined are included? That would explain the problem.

Martin do you have any explanation?

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>                    Università di Siena
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
UTTOXETER (n.)
A small but immensely complex mechanical device which is essentially
the 'brain' of a modern coffee vending machine, and which enables the
machine to take its own decisions.
			--- Douglas Adams, The Meaning of Liff



Reply to: