[Lazarus] FCL-PDF change

Michael Van Canneyt michael at freepascal.org
Fri Dec 9 16:41:28 CET 2016



On Fri, 9 Dec 2016, Ondrej Pokorny via Lazarus wrote:

> On 09.12.2016 15:28, Michael Van Canneyt via Lazarus wrote:
>> I forgot (again) to commit a file, fixed. Sorry.
>
> No problem. Now it compiles, thanks!
>
> I have a runtime exception, though (the relevant line is in #5):
>
> #0 fpc_raiseexception(0xc9, 0x5ca84a, 0x79cf5c8) at ..\inc\except.inc:158
> #1 RUNERRORTOEXCEPT(201, 0x5ca84a, 0x79cf5c8) at 
> ..\objpas\sysutils\sysutils.inc:441
> #2 HANDLEERRORADDRFRAME(201, 0x5ca84a, 0x79cf5c8) at ..\inc\system.inc:1144
> #3 HANDLEERRORADDRFRAMEIND(201, 0x5ca84a, 0x79cf5c8) at 
> ..\inc\system.inc:1161
> #4 fpc_rangeerror at ..\inc\system.inc:755
> *#5 BUILDCMAPTABLE(0x6790260) at 
> ..\..\..\..\..\..\software\FPC\trunk_src\packages\fcl-pdf\src\fpttfsubsetter.pp:807*
> #6 SAVETOSTREAM(0x6790260, 0x7b061c0) at 
> ..\..\..\..\..\..\software\FPC\trunk_src\packages\fcl-pdf\src\fpttfsubsetter.pp:926
> #7 GENERATESUBSETFONT(0x682d7a8) at 
> ..\..\..\..\..\..\software\FPC\trunk_src\packages\fcl-pdf\src\fppdf.pp:1400
> #8 CREATEFONTENTRIES(0x68351d0) at 
> ..\..\..\..\..\..\software\FPC\trunk_src\packages\fcl-pdf\src\fppdf.pp:5101
> #9 SAVETOSTREAM(0x68351d0, 0x7ad5ed8) at 
> ..\..\..\..\..\..\software\FPC\trunk_src\packages\fcl-pdf\src\fppdf.pp:5141
>
> the idDelta array looks like (from GDB): Len=29: (-31,   -42, -43,   -45, 
> -48,   ...)
> -> as you see all values are negative and you are passing them to a UInt16 
> parameter, which results in range error.

Hmh. Graeme Geldenhuys will have to pull his hair again.

We'll have to pass around the hat to pay for a wig...

Can you tell us which font you are using, and maybe also what text you were trying to write to the PDF ? 
Subset font creation is quite tricky.

Michael.


More information about the Lazarus mailing list