[cairo] Re: [cairo-commit] 4 commits - src/cairo-output-stream.c
brian.ewins at gmail.com
Tue Feb 13 04:17:54 PST 2007
On 13/02/07, Baz <brian.ewins at gmail.com> wrote:
> I tried implementing load_truetype_table for ATSUI; text selection and
> searching in the pdfs started working, but all the glyphs displayed in
> Preview came out as boxes (ie same as glyphid 0).
Adrian: thanks for sending me the file. Its identical to the one I
generated using the ft font backend. I've also opened my broken pdfs
in Acrobat & they're ok; this definitely appears to be the cairo code
working 'as designed' but Preview just has a problem with what's been
I uncompressed the doc with pdftk and looked at the content, what I'm
seeing would be consistent with eg:
0.634115 0 Td <01> Tj
displaying the character <01> unmapped - I see the box for an
unprintable char. The chars in this doc only go up to <1b>, a few more
letters and it'd be obvious, since we'd be into the ascii printable
range. Since the text selection works, I'm guessing ToUnicode is
working fine but the font encoding is being ignored?
I see that the encoding is done using 'Differences', the pdf spec
describes this as 'Optional; not recommended with TrueType fonts'. The
reason its not recommended would be (I presume) that since no base
encoding is specified, its selecting a platform-specific implicit base
encoding from the underlying font. So, maybe I'm getting MacRoman and
you're getting something else? Just guessing wildly here :). I don't
see how that could make the Differences array wrong though, since it's
Interestingly, this thread:
contains a similar test document which was being opened in Preview.
I'll try this out for myself when I get home, along with your
suggestion about using the Type 1 fallback only.
More information about the cairo