bug-lilypond
[Top][All Lists]
Advanced

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

Re: huge pdf file-sizes


From: Werner LEMBERG
Subject: Re: huge pdf file-sizes
Date: Tue, 28 Mar 2006 05:53:27 +0200 (CEST)

> Same here: 
> 
> 1 Page with 9 systems and lyrics. 
> PDF=4MB
> SP=400KB

Two reasons:

  1. Insert this at the top of your document

       #(ly:set-option 'point-and-click #f)

  2. Apply the patch below to gs 8.53 (and older versions too, IIRC)
     and recompile.


    Werner


======================================================================


Modified: trunk/gs/src/gdevpdtt.c
===================================================================
--- trunk/gs/src/gdevpdtt.c     2006-02-05 14:25:24 UTC (rev 6560)
+++ trunk/gs/src/gdevpdtt.c     2006-02-06 11:04:12 UTC (rev 6561)
@@ -1287,6 +1287,7 @@
     gs_char ch;
     gs_const_string gname;
     gs_glyph *gid = (gs_glyph *)pstr->data; /* pdf_text_process allocs enough 
space. */
+    bool unknown = false;
 
     /* Translate glyph name indices into gscencs.c indices. */
     for (i = 0; i < pstr->size; i++) {
@@ -1295,10 +1296,14 @@
        if (code < 0)
            return code;
        gid[i] = gs_c_name_glyph(gname.data, gname.size);
-       if (gid[i] == GS_NO_GLYPH)
-           return_error(gs_error_rangecheck);
+       if (gid[i] == GS_NO_GLYPH) {
+           /* Use global glyph name. */
+           gid[i] = gdata[i];
+           unknown = true;
+       }
     }
-
+    if (unknown)
+       return 0; /* Using global glyph names. */
     /* Find an acceptable encodng. */
     for (ei = 0; gs_c_known_encodings[ei]; ei++) {
        cgp->num_unused_chars = 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]