[Lazarus] PDF generator, try 2
Michael Van Canneyt
michael at freepascal.org
Thu Mar 31 18:17:10 CEST 2016
On Thu, 31 Mar 2016, silvioprog wrote:
> On Thu, Mar 31, 2016 at 12:45 PM, silvioprog <silvioprog at gmail.com> wrote:
>
>> On Thu, Mar 31, 2016 at 11:18 AM, silvioprog <silvioprog at gmail.com> wrote:
>>
>>> On Thu, Mar 31, 2016 at 11:02 AM, Michael Van Canneyt <
>>> michael at freepascal.org> wrote:
>>>>
>>>> Hello
>>>>
>>>> In revision 33401 of FPC subversion, a lot of fixes have been committed
>>>> for Font
>>>> handling in the PDF generator: e.g. Unicode fonts should now render
>>>> correctly.
>>>
>>> [...]
>>>
>>> Great news! :-)
>>>
>>> I'm going to re-test it ...
>>>
>>
>> Finally the PDF was succefully generated on Windows! \o/
>>
>
> The attached patch remove some compile hints/warnings.
Please, don't do {%H-} etc:
procedure CreateTTFCIDSystemInfo(const {%H-}EmbeddedFontNum: integer;{%H-}FontDef: TFontDef);virtual;
Typecasts like this should also not be done:
+ FontDef.FDiffs := WideString(lFontDef.Diffs);
+ FontDef.FCharWidth := WideString(lFontDef.CharWidths);
- Arr.AddIntArray(FontDef.FCharWidth);
+ Arr.AddIntArray(string(FontDef.FCharWidth));
We need to investigate why you think this typecast is needed.
The buffer initialization is good, though.
I will not apply this patch, this needs deeper investigation.
Michael.
More information about the Lazarus
mailing list