Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGS: Implementation of Freetype 2.1.3 autohinter module #5299

Merged
merged 25 commits into from Sep 3, 2023

Conversation

tag2015
Copy link
Contributor

@tag2015 tag2015 commented Aug 27, 2023

Following @elasota's work and after testing on various games, this is a minimalistic implementation of AGS's
freetype 2.1.3, including just the autohinter module and the glyph loader (and a couple helpers).
The hinting is applied by default in alfont, unless NO_FT213_AUTOHINT is defined, which bypasses the new implementation.

This supersedes PR #5188
Tested on Windows and on BE linux, should be ready for merge (but additional testing is always appreciated 馃槃 )

@antoniou79
Copy link
Contributor

I've tested on a couple of games where I had spotted issues with the current ScummVM master branch code (Zniw Adventure and Dreams in the Witch House).

Those seem to work fine/ identical with when running standalone (ie. without ScummVM).

So, this looks good to me.

/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
/* be used, modified, and distributed under the terms of the Catharon */
Copy link
Member

@sev- sev- Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fun coincidence:

Freetype Project License (#freetype)
This is a free software license, and compatible with GPLv3. It has some attribution requirements which make it incompatible with GPLv2.

E.g. if we still sit on GPLv2, this would not be possible to merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FreeType website says:

FreeType comes with two licenses from which you can choose the one which fits your needs best.

The FreeType License (FTL) is the most commonly used one. It is a BSD-style license with a credit clause and thus compatible with the GNU Public License (GPL) version 3, but not with the GPL version 2.

The GNU General Public License (GPL), version 2. Use it for all projects which use the GPLv2 also, or which need a license compatible to the GPLv2.

/***************************************************************************/


#include <ft2build.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm.... This means, that the now must mark the engine as requiring freetype2. Could you please add it to the configure.engine file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The freetype functions are used only in alfont that already provides a fallback, so i changed the makefile, please check

/* This file is part of the Catharon Typography Project and shall only */
/* be used, modified, and distributed under the terms of the Catharon */
/* Open Source License that should come with this file under the name */
/* `CatharonLicense.txt'. By continuing to use, modify, or distribute */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this CatharonLicense.txt file to the LICENSES/ dir and ensure it is enlisted with other licenses for adding to the distribution packages. E.g. git grep COPYING.ISC will show you all the places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost :) Please name the file as "CatharonLicense.txt". Yes. it will be a different naming schema, but the license text is quite specific here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃憤 Renamed



#include <ft2build.h>
#include "engines/ags/lib/freetype-2.1.3/autohint/ahangles.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excessive, please specify just "ags/lib/freetype-2.1.3/autohint/ahangles.h", e.g. without "engines/" prefix. Please do it in all the occurrences.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@sev-
Copy link
Member

sev- commented Sep 3, 2023

Thank you, merging

@sev- sev- merged commit d117a48 into scummvm:master Sep 3, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants