if ((Byte) type1_string[0] == 0x80)
{
/* The file is in PFB format. Convert it to PFA format. */
- char *pfa = pfb2pfa ((Byte *) &type1_string[0],
- (int) type1_string.size ());
- pfa_scm = scm_from_latin1_string (pfa);
- free (pfa);
+ vector<char> pfa = pfb2pfa (type1_string);
+ pfa_scm = scm_from_latin1_stringn (&pfa[0], pfa.size ());
}
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);