Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added extras/freetype_windows/FreeType.zip
Binary file not shown.
Binary file removed extras/freetype_windows/freetype.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions extras/freetype_windows/readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This directory contains a zipped copy of the freetype.dll file. This is
required if you use the Agg enabled Canvas, and have the FreeType font
engine enabled.
This directory contains a zipped copy of the FreeType32.dll and FreeType64.dll files.
This is required if you use the Agg enabled Canvas, and have the FreeType font
engine enabled. Use 32bit or 64bit to match the platform you compile for.

The FreeType font engine has more functionality and better looking output
than the Win32 font engine.
Expand Down
26 changes: 25 additions & 1 deletion src/corelib/render/software/agg_2D.pas
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ interface
{$UNDEF AGG2D_USE_WINFONTS}
{$ENDIF}

{ With this define you can switch to an experimental version that is more
compatible with freepascal console graphics units such as Graph and ptcgraph

ToDo: red and blue are reversed and need to be fixed
- temporarily patched See notes in agg_color.pas}

{.$Define AGG2D_USE_RGB565}

uses
agg_basics ,
agg_array ,
Expand Down Expand Up @@ -77,6 +85,9 @@ interface
agg_font_engine ,
agg_font_cache_manager ,
agg_pixfmt ,
{$IFDEF AGG2D_USE_RGB565 }
agg_pixfmt_rgb_packed ,
{$ENDIF }
agg_pixfmt_rgba ,
agg_color ,
agg_math_stroke ,
Expand Down Expand Up @@ -347,7 +358,11 @@ Transformations_ = record
m_ifBlackman144 : image_filter_blackman144;

public
{$IFDEF AGG2D_USE_RGB565 }
constructor Construct(pixfmt:define_pixfmt);
{$ELSE }
constructor Construct;
{$ENDIF }
destructor Destruct;

// Setup
Expand Down Expand Up @@ -790,13 +805,22 @@ function Agg2DRasterizerGamma.func_operator_gamma(x : double ) : double;
end;

{ CONSTRUCT }
{$IFDEF AGG2D_USE_RGB565 }
constructor Agg2D.Construct(pixfmt:define_pixfmt);
{$ELSE }
constructor Agg2D.Construct;
{$ENDIF }
begin
m_rbuf.Construct;

{$IFDEF AGG2D_USE_RGB565 }
pixfmt (m_pixFormat ,@m_rbuf );
pixfmt (m_pixFormatPre ,@m_rbuf );
{$ELSE }
pixfmt_rgba32 (m_pixFormat ,@m_rbuf );
pixfmt_custom_blend_rgba(m_pixFormatComp ,@m_rbuf ,@comp_op_adaptor_rgba ,rgba_order );
pixfmt_rgba32 (m_pixFormatPre ,@m_rbuf );
{$ENDIF }
pixfmt_custom_blend_rgba(m_pixFormatComp ,@m_rbuf ,@comp_op_adaptor_rgba ,rgba_order );
pixfmt_custom_blend_rgba(m_pixFormatCompPre ,@m_rbuf ,@comp_op_adaptor_rgba ,rgba_order );

m_renBase.Construct (@m_pixFormat );
Expand Down
6 changes: 5 additions & 1 deletion src/corelib/render/software/agg_font_freetype_lib.pas
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@

const
{$IFDEF WINDOWS }
ft_lib = 'freetype.dll';
{$IFDEF CPU64 }
ft_lib = 'freetype64.dll';
{$Else }
ft_lib = 'freetype32.dll';
{$ENDIF }
{$ENDIF }

// Linux, FreeBSD etc.
Expand Down