diff --git a/extras/freetype_windows/FreeType.zip b/extras/freetype_windows/FreeType.zip new file mode 100644 index 000000000..7da84e3ac Binary files /dev/null and b/extras/freetype_windows/FreeType.zip differ diff --git a/extras/freetype_windows/freetype.zip b/extras/freetype_windows/freetype.zip deleted file mode 100644 index 1c26f6312..000000000 Binary files a/extras/freetype_windows/freetype.zip and /dev/null differ diff --git a/extras/freetype_windows/readme.txt b/extras/freetype_windows/readme.txt index d56ed51ba..5fe101e12 100644 --- a/extras/freetype_windows/readme.txt +++ b/extras/freetype_windows/readme.txt @@ -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. diff --git a/src/corelib/render/software/agg_2D.pas b/src/corelib/render/software/agg_2D.pas index 109ae06fd..a322af7d1 100644 --- a/src/corelib/render/software/agg_2D.pas +++ b/src/corelib/render/software/agg_2D.pas @@ -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 , @@ -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 , @@ -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 @@ -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 ); diff --git a/src/corelib/render/software/agg_font_freetype_lib.pas b/src/corelib/render/software/agg_font_freetype_lib.pas index cd6d05bd0..7bb20d020 100644 --- a/src/corelib/render/software/agg_font_freetype_lib.pas +++ b/src/corelib/render/software/agg_font_freetype_lib.pas @@ -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.