Skip to content

Commit

Permalink
pdf: latin text must use character codes in the toUnicode CMap, not g…
Browse files Browse the repository at this point in the history
…lyph indices
  • Loading branch information
Adrian Johnson committed Sep 9, 2011
1 parent 80fc566 commit 166be70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cairo-pdf-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -4159,7 +4159,9 @@ _cairo_pdf_surface_emit_to_unicode_stream (cairo_pdf_surface_t *surface,
"%d beginbfchar\n",
num_bfchar - i > 100 ? 100 : num_bfchar - i);
}
if (font_subset->is_composite && !font_subset->is_latin)
if (font_subset->is_latin)
_cairo_output_stream_printf (surface->output, "<%02x> ", font_subset->to_latin_char[i + 1]);
else if (font_subset->is_composite)
_cairo_output_stream_printf (surface->output, "<%04x> ", i + 1);
else
_cairo_output_stream_printf (surface->output, "<%02x> ", i + 1);
Expand Down

0 comments on commit 166be70

Please sign in to comment.