[Lazarus] PDF generator, try 2
silvioprog
silvioprog at gmail.com
Wed Apr 6 18:43:41 CEST 2016
On Thu, Mar 31, 2016 at 1:17 PM, Michael Van Canneyt <michael at freepascal.org
> wrote:
[...]
> Please, don't do {%H-} etc:
>
> procedure CreateTTFCIDSystemInfo(const {%H-}EmbeddedFontNum:
> integer;{%H-}FontDef: TFontDef);virtual;
>
{$HINTS OFF} instead of it?
> Typecasts like this should also not be done:
>
> + FontDef.FDiffs := WideString(lFontDef.Diffs);
> + FontDef.FCharWidth := WideString(lFontDef.CharWidths);
>
Because the FontDef.FCharWidth is a WideString.
> - Arr.AddIntArray(FontDef.FCharWidth);
> + Arr.AddIntArray(string(FontDef.FCharWidth));
>
Because Arr.AddIntArray() is AnsiString (string) and FontDef.FCharWidth
WideString.
> We need to investigate why you think this typecast is needed.
>
It just stop hints/warnings from compiler.
> The buffer initialization is good, though.
>
> I will not apply this patch, this needs deeper investigation.
It just remove unused variables and apply some cast fixes.
--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160406/c7df7b0a/attachment-0003.html>
More information about the Lazarus
mailing list