[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Some PDF embedded CFF fonts loading broken
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Some PDF embedded CFF fonts loading broken |
Date: |
Sun, 04 Jul 2010 23:53:02 +0200 (CEST) |
>> However, the constant `3' is probably wrong. Please try this line
>> instead:
>>
>> if ( ( ip + 1 + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )
>
> Yes that works.. (FWIW the "ip + 3..." is exactly limit in this case)
Thanks for testing. As a final check, could you determine the next
instruction after `hintmask' (or `cntrmask') and its data bytes?
Theoretically, it must be `return'.
Otherwise, it's getting hairy. FreeType always assumes that operators
are atomic. This holds for `hintmask' and `ctrlmask' also; however,
both instructions can have a variable number of bytes *following* the
instruction (contrary to normal instructions which expect its
arguments already on the stack). Adobe's Type 2 technical note
doesn't mention whether it is possible to have, say,
in subroutine:
ctrlmask
return
after returning:
data byte 1 for ctrlmask
data byte 2 for ctrlmask
...
Werner