You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by John Hewson <jo...@jahewson.com> on 2014/01/04 03:39:27 UTC

CFF Type 2 -> Type 1

Hi All

I’ve been working on the Type1/2 CharString parsing code in connection to https://issues.apache.org/jira/browse/PDFBOX-1691 I’m working on implementing the “seac” command to fix the issue. However, I've noticed that the Type 2 handling code in CharStringRenderer is never used, instead Type 2 char strings are always first converted to Type 1 using CharStringConverter before being passed to CharStringRenderer. In fact, the Type 2 handling code in CharStringRenderer is also broken, attempts to actually use it result in illegal state when drawing to the GeneralPath. 

I’d like to remove the broken Type 2 code from CharStringRenderer so that it handles only Type 1 char strings and then Type 2 char strings would always be converted to Type 1 before processing (as is currently the case, in practice). First I wanted to ask if there was some reason that there are two sets of Type 2 handling code and is this something that there was another plan for?

-- John


Re: CFF Type 2 -> Type 1

Posted by John Hewson <jo...@jahewson.com>.
All done, I’ve created PDFBOX-1831 for my patch adding “seac” and refactoring Type 1 and Type 2 CharStrings.

> BTW, welcome to our small but fine community!

Great to be here!

-- John

On 4 Jan 2014, at 03:59, Andreas Lehmkuehler <an...@lehmi.de> wrote:

> Am 04.01.2014 03:39, schrieb John Hewson:
>> Hi All
>> 
>> I’ve been working on the Type1/2 CharString parsing code in connection to https://issues.apache.org/jira/browse/PDFBOX-1691 I’m working on implementing the “seac” command to fix the issue. However, I've noticed that the Type 2 handling code in CharStringRenderer is never used, instead Type 2 char strings are always first converted to Type 1 using CharStringConverter before being passed to CharStringRenderer. In fact, the Type 2 handling code in CharStringRenderer is also broken, attempts to actually use it result in illegal state when drawing to the GeneralPath.
>> 
>> I’d like to remove the broken Type 2 code from CharStringRenderer so that it handles only Type 1 char strings and then Type 2 char strings would always be converted to Type 1 before processing (as is currently the case, in practice). First I wanted to ask if there was some reason that there are two sets of Type 2 handling code and is this something that there was another plan for?
> I tried to understand the cff parser some time ago, but I didn't got
> every detail. But I guess it is not needed, so feel free to remove it.
> As subversion never forgets, the code won't get lost :-)
> 
>> -- John
> 
> BTW, welcome to our small but fine community!
> 
> BR
> Andreas Lehmkühler
> 


Re: CFF Type 2 -> Type 1

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Am 04.01.2014 03:39, schrieb John Hewson:
> Hi All
>
> I’ve been working on the Type1/2 CharString parsing code in connection to https://issues.apache.org/jira/browse/PDFBOX-1691 I’m working on implementing the “seac” command to fix the issue. However, I've noticed that the Type 2 handling code in CharStringRenderer is never used, instead Type 2 char strings are always first converted to Type 1 using CharStringConverter before being passed to CharStringRenderer. In fact, the Type 2 handling code in CharStringRenderer is also broken, attempts to actually use it result in illegal state when drawing to the GeneralPath.
>
> I’d like to remove the broken Type 2 code from CharStringRenderer so that it handles only Type 1 char strings and then Type 2 char strings would always be converted to Type 1 before processing (as is currently the case, in practice). First I wanted to ask if there was some reason that there are two sets of Type 2 handling code and is this something that there was another plan for?
I tried to understand the cff parser some time ago, but I didn't got
every detail. But I guess it is not needed, so feel free to remove it.
As subversion never forgets, the code won't get lost :-)

> -- John

BTW, welcome to our small but fine community!

BR
Andreas Lehmkühler