[fpc-devel] ftfont and FreeType

Michael Van Canneyt michael at freepascal.org
Sat Jul 18 12:15:11 CEST 2020



On Sat, 18 Jul 2020, Werner Pamler wrote:

> Am 17.07.2020 um 23:29 schrieb Michael Van Canneyt via fpc-devel:
>> First you'll have to explain something:
>> Why does it break existing code according to you ?
>> The default library name is the same in both units.
> Compile and run the noguidemo in the Lazarus folder 
> components/tachart/demo/nogui. It creates a chart without a gui and 
> saves it as a png file. Compiling with fpc 3.0.4 this occurs immediately 
> and flawlessly. Compiling with fpc 3.2.0 or fpc trunk, however, there is 
> an error message that the freetype.dll is not found.
>
> So, the changes in ftfont.pp are "breaking", because a program which 
> used to work correctly had stopped working. I do agree, though, that my 
> phrasing "code-breaking" was not correct, strictly speaking, because no 
> changes in code are required to make the program run: the user only must 
> provide the freetype.dll (of the correct bitness).
>
> I do not have a problem with this change when I know that there was good 
> reason behind it and it  was not made by incidence or error (such things 
> happen...). But in any case, a breaking change should be mentioned in 
> the official wiki pages.

The name was changed to conform to the names in the releases here:
https://github.com/ubawurinna/freetype-windows-binaries/tree/master/win32

For such open-source projects, the lack of unified naming is a problem.
To make things worse, the programmer can rename DLLs to avoid conflicts etc.

That's why I believe making the libraries dynamically loadable is a better
approach, and as such the default name becomes less important and IMHO is
not a 'breaking change'.

But if you think it is, please change the wiki.

Michael.


More information about the fpc-devel mailing list