lilypond-user
[Top][All Lists]
Advanced

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

Ghostscript patches and packaging


From: Quentin Spencer
Subject: Ghostscript patches and packaging
Date: Wed, 12 Apr 2006 18:21:13 -0500
User-agent: Thunderbird 1.5 (X11/20060313)

Hello everyone,

I'm an occasional user of lilypond, and new to this list. I'm also the maintainer of a few packages in Fedora Extras, and I'm considering submitting lilypond for inclusion there. Initially I built everything (version 2.8.1) from source and I ran into the PDF file size problem that apparently several others have noticed. I downloaded the GUB installer and the file sizes are sane again. However, I would really like to get things working properly with RPM packages. At this point, mftrace is the only dependency that is not in Fedora Core or Extras, so I would need to submit packages for mftrace and lilypond.

Anyway, I saw the patch that someone posted on the bug list for GhostScript 8.53. I backported the patch (basically the only difference is the line numbers) to the version of 8.15 that is currently in Fedora, and amazingly, my PDFs are now back down to their small sizes again. I have attached the patch for anyone interested. It should be noted that while this lilypond setup has been working for me, it fails when building the documentation, so clearly there are special cases that gs 8.15 can't handle. I would like to put a request in Fedora's bugzilla to add this patch, however, I would like to present a convincing reason for why it needs to be included. Can someone give an explanation of what the patch does and where it came from (is this already in upstream CVS, for example)?

-Quentin

--- src/gdevpdtt.c.orig 2005-02-16 15:21:49.000000000 -0600
+++ src/gdevpdtt.c      2006-04-08 00:32:09.000000000 -0500
@@ -1269,6 +1269,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++) {
@@ -1277,10 +1278,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]