Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 100265 | Differences between
and this patch

Collapse All | Expand All

(-)gpdf-2.8.2/xpdf/GPOutputDev.cc.krh (-32 lines)
Lines 258-266 Link Here
258
  }
258
  }
259
  case fontTrueType: {
259
  case fontTrueType: {
260
    FoFiTrueType *ff;
260
    FoFiTrueType *ff;
261
    gint fd;
262
    gchar *temp_name;
263
    FILE *f;
264
    gushort *code_to_gid;
261
    gushort *code_to_gid;
265
262
266
    ff = FoFiTrueType::make((char *)contents, length);
263
    ff = FoFiTrueType::make((char *)contents, length);
Lines 269-284 Link Here
269
266
270
    code_to_gid = ((Gfx8BitFont *)font)->getCodeToGIDMap(ff); // this is g(oo)malloc'd
267
    code_to_gid = ((Gfx8BitFont *)font)->getCodeToGIDMap(ff); // this is g(oo)malloc'd
271
268
272
    fd = g_file_open_tmp("gpdf-ttf-XXXXXX", &temp_name, NULL);
273
    f = fdopen(fd, "wb");
274
    ff->writeTTF(&fileWrite, f);
275
    delete ff;
269
    delete ff;
276
    g_free(contents);
277
    fclose(f);
278
279
    g_file_get_contents(temp_name, (gchar **)&contents, &length, NULL);
280
    unlink(temp_name);
281
    g_free(temp_name);
282
270
283
    gff = gpdf_font_face_download((const guchar *)font_name,
271
    gff = gpdf_font_face_download((const guchar *)font_name,
284
				  (const guchar *)"",
272
				  (const guchar *)"",
Lines 324-351 Link Here
324
    break;
312
    break;
325
  }
313
  }
326
  case fontCIDType2: {
314
  case fontCIDType2: {
327
    FoFiTrueType *ff;
328
    gint fd;
329
    gchar *temp_name;
330
    FILE *f;
331
    gint n_cids;    
315
    gint n_cids;    
332
    gushort *code_to_gid;
316
    gushort *code_to_gid;
333
334
    ff = FoFiTrueType::make((char *)contents, length);
335
    if (!ff)
336
      return getFontFaceFallback(font);
337
338
    fd = g_file_open_tmp("gpdf-ttf-XXXXXX", &temp_name, NULL);
339
    f = fdopen(fd, "wb");
340
    ff->writeTTF(&fileWrite, f);
341
    delete ff;
342
    g_free(contents);
343
    fclose(f);
344
345
    g_file_get_contents(temp_name, (gchar **)&contents, &length, NULL);
346
    unlink(temp_name);
347
    g_free(temp_name);
348
349
    gff = gpdf_font_face_download((const guchar *)font_name,
317
    gff = gpdf_font_face_download((const guchar *)font_name,
350
				  (const guchar *)"",
318
				  (const guchar *)"",
351
				  GNOME_FONT_REGULAR, FALSE,
319
				  GNOME_FONT_REGULAR, FALSE,

Return to bug 100265