]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4989/1: Fix Type1 (PFA) font embedding
authorMasamichi Hosoda <trueroad@trueroad.jp>
Wed, 26 Oct 2016 11:56:49 +0000 (20:56 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Thu, 3 Nov 2016 21:52:50 +0000 (06:52 +0900)
Type1 (PFA) fonts can contain '\0'.
e.g. URW++ June 2016 (Ghostscript 9.20)

In order to avoid problems with '\0',
this commit makes to use the file length
instead of zero-terminated string.

lily/pfb-scheme.cc

index e718a13bf079f36c89708aebf65ddbcf1aa98611..0f96d63fb6de23c2b6a43f2287f30de263bc6466 100644 (file)
@@ -33,8 +33,8 @@ LY_DEFINE (ly_type1_2_pfa, "ly:type1->pfa",
   else
     {
       /* The file is in PFA format. Pass it through. */
-      type1_string.push_back(0);
-      pfa_scm = scm_from_latin1_string (&type1_string[0]);
+      pfa_scm = scm_from_latin1_stringn (&type1_string[0],
+                                         type1_string.size ());
     }
 
   debug_output ("]", false);