2 pfb.cc -- implement pfb conversion.
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
14 #include "program-option.hh"
15 #include "source-file.hh"
16 #include "memory-stream.hh"
17 #include "open-type-font.hh"
22 pfb2pfa (Byte const *pfb, int length)
24 char *out = new char[1];
28 while (p < pfb + length)
39 | (p[2] << 16) | (p[3] << 24);
44 out = (char *)realloc (out, olen + seglen + 1);
45 char *outp = out + olen;
46 memcpy (outp, p, seglen);
52 unsigned outlength = (seglen * 2) + (seglen / 32) + 2;
54 out = (char *)realloc (out, olen + outlength + 1);
56 char *outp = out + olen;
57 for (int i = seglen; i--;)
59 sprintf (outp, "%02x", *p++);