[fpc-pascal] Implementing AggPas with PtcGraph

Stefan V. Pantazi svpantazi at gmail.com
Thu Jun 15 03:55:58 CEST 2017


I think you need to use a global define passing a -d??? parameter 
(-dAGG2D_USE_FREETYPE) to the compiler. Just adding it to a unit only 
defines for that unit and to any file included in that one unit.

On 06/14/2017 09:40 PM, James Richters wrote:
>> The font rendering should all be controlled by compiler defines. You don't need to modify the unit to make it work.
>> Simply add the correct define in your project's Compiler Settings and recompile the code.
>
> That is what I thought should happen, but I put
> {$DEFINE AGG2D_USE_FREETYPE}
>
> In my program under
> {$mode objfpc}{$H+}
>
> I still get:
> FreeType: FALSE  Win32 True Type: TRUE
>
> But if I uncomment
> {$DEFINE AGG2D_USE_FREETYPE}
> In agg_2D.pas
>
> It's the only way I can get
> FreeType: TRUE  Win32 True Type: FALSE
>
> I don't know why the define isn't making it to the unit.  Do I need to do something else?   It's as if it's being un-defined somewhere else but I don't know where.. maybe the same place that is {$DEFINE AGG2D_USE_WINFONTS} because that is defiantly being set somewhere before the agg_2D.Pas unit and the only way to not get an error is for me to have this at the top of agg_2D.pas
>
> {$IFDEF AGG2D_USE_FREETYPE }
>  {$UNDEF AGG2D_USE_WINFONTS}
> {$ENDIF }
>
>> And if you look in the "develop" branch of fpGUI, there is an even later
>> AggPas version - last updated a month ago.
>
> Maybe I should go get this.. maybe some of these things are fixed already
>
> Thank you for the help with this.
>
> James
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>

-- 
_______________________________________________________



More information about the fpc-pascal mailing list