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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the precompiled FreeType library #799

Closed
LaurentGomila opened this Issue Feb 21, 2015 · 24 comments

Comments

Projects
None yet
5 participants
@LaurentGomila
Member

LaurentGomila commented Feb 21, 2015

The current version shipped with SFML is 2.4.4, the latest stable version is 2.5.5.

Benefits of updating:

  • starting at version 2.5.3, FreeType can be configured to use Harfbuzz for better text layout (see #246)
  • it now comes with CMake files so it's much easier to build
  • quality is better
@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Feb 22, 2015

Member

it now comes with CMake files so it's much easier to build

Doesn't that mean we could setup CMake to download and build it as a dependency when required? Pretty sure I've seen that being done in one or two other projects.

Member

MarioLiebisch commented Feb 22, 2015

it now comes with CMake files so it's much easier to build

Doesn't that mean we could setup CMake to download and build it as a dependency when required? Pretty sure I've seen that being done in one or two other projects.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Feb 22, 2015

Member

I've never seen that before. How would CMake (or we) now where to download it anyway?

Member

LaurentGomila commented Feb 22, 2015

I've never seen that before. How would CMake (or we) now where to download it anyway?

@binary1248

This comment has been minimized.

Show comment
Hide comment
@binary1248

binary1248 Feb 22, 2015

Member

I think he meant git 😉.
git submodules

Member

binary1248 commented Feb 22, 2015

I think he meant git 😉.
git submodules

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Feb 22, 2015

Member

That's really a different thing. And we don't (want to) use submodules anyway, we just provide precompiled versions of our external libs for platforms that don't provide them.

Member

LaurentGomila commented Feb 22, 2015

That's really a different thing. And we don't (want to) use submodules anyway, we just provide precompiled versions of our external libs for platforms that don't provide them.

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Feb 22, 2015

Member

It's an extension module bundled by default.

You could do something like this (e.g. if the dependency isn't found on the system):

include(ExternalProject)
ExternalProject_Add(freetype PREFIX "${CMAKE_CURRENT_BINARY_DIR}/extlibs/freetype" GIT_REPOSITORY http://git.sv.nongnu.org/r/freetype/freetype2.git EXCLUDE_FROM_ALL 1)

This would create a target "freetype". CMake will try to download, compile, and install the dependency. It works out of the box for CMake projects, but needs some further details for non-CMake stuff. Although I haven't figured out how to skip installing the dependency straight away (right now it's installed when building).

But yeah, regarding this specific issue, this is off-topic. :)

Member

MarioLiebisch commented Feb 22, 2015

It's an extension module bundled by default.

You could do something like this (e.g. if the dependency isn't found on the system):

include(ExternalProject)
ExternalProject_Add(freetype PREFIX "${CMAKE_CURRENT_BINARY_DIR}/extlibs/freetype" GIT_REPOSITORY http://git.sv.nongnu.org/r/freetype/freetype2.git EXCLUDE_FROM_ALL 1)

This would create a target "freetype". CMake will try to download, compile, and install the dependency. It works out of the box for CMake projects, but needs some further details for non-CMake stuff. Although I haven't figured out how to skip installing the dependency straight away (right now it's installed when building).

But yeah, regarding this specific issue, this is off-topic. :)

@eXpl0it3r eXpl0it3r self-assigned this Feb 23, 2015

@eXpl0it3r eXpl0it3r added this to the 2.3 milestone Feb 23, 2015

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Feb 23, 2015

Member

I'll take a look into this for Windows (MinGW + VS), but will need probably @mantognini for OS X and @MarioLiebisch for Android.

Member

eXpl0it3r commented Feb 23, 2015

I'll take a look into this for Windows (MinGW + VS), but will need probably @mantognini for OS X and @MarioLiebisch for Android.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Feb 23, 2015

Member

Isn't FreeType a system lib on OS X?

Member

LaurentGomila commented Feb 23, 2015

Isn't FreeType a system lib on OS X?

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Feb 23, 2015

Member

Any extras you set for freetype? Or any specific release/commit? It compiles out of the box on my Windows machine with the new toolchain file. :)

Member

MarioLiebisch commented Feb 23, 2015

Any extras you set for freetype? Or any specific release/commit? It compiles out of the box on my Windows machine with the new toolchain file. :)

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Feb 23, 2015

Member

Isn't FreeType a system lib on OS X?

Nope, unfortunately.

Member

mantognini commented Feb 23, 2015

Isn't FreeType a system lib on OS X?

Nope, unfortunately.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Feb 23, 2015

Member

According to this SO thread the dynamic libs are installed, we just need the headers. And if XCode is installed, you automatically get the dev files for FreeType.

Member

LaurentGomila commented Feb 23, 2015

According to this SO thread the dynamic libs are installed, we just need the headers. And if XCode is installed, you automatically get the dev files for FreeType.

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Feb 23, 2015

Member

I believe the answer is wrong. By default it is not installed on the system (at least not on mine). You can get freetype through xquartz (X11 port for OS X) but I'm not sure the header files are shipped with it (having only Xcode is not enough apparently). Maybe that was the case in 2013...

Member

mantognini commented Feb 23, 2015

I believe the answer is wrong. By default it is not installed on the system (at least not on mine). You can get freetype through xquartz (X11 port for OS X) but I'm not sure the header files are shipped with it (having only Xcode is not enough apparently). Maybe that was the case in 2013...

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Feb 23, 2015

Member

Had some time to do some tests and both HEAD as well as 2.5.5 seem to be working fine on both my Nexus 5 and my Fire TV. Should I push the binaries to a new branch (feature/freetype-2-5-5?) or just put the libs on Dropbox for now? Trying to avoid unnecessary binary file changes.

Member

MarioLiebisch commented Feb 23, 2015

Had some time to do some tests and both HEAD as well as 2.5.5 seem to be working fine on both my Nexus 5 and my Fire TV. Should I push the binaries to a new branch (feature/freetype-2-5-5?) or just put the libs on Dropbox for now? Trying to avoid unnecessary binary file changes.

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Feb 23, 2015

Member

Some dropbox archive would work.

What was the reason for having headers for each platform? Do we still need that with the new version?

Member

eXpl0it3r commented Feb 23, 2015

Some dropbox archive would work.

What was the reason for having headers for each platform? Do we still need that with the new version?

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Feb 23, 2015

Member

I guess there are platform-specific definitions. Would be interesting to check if it still applies.

Member

LaurentGomila commented Feb 23, 2015

I guess there are platform-specific definitions. Would be interesting to check if it still applies.

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Feb 23, 2015

Member

The only differences between the current files is ft2build.h and the only difference within is that some comments and different naming for include guards. I don't think there will be a problem by just using one version of the new headers.

Member

eXpl0it3r commented Feb 23, 2015

The only differences between the current files is ft2build.h and the only difference within is that some comments and different naming for include guards. I don't think there will be a problem by just using one version of the new headers.

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch
Member

MarioLiebisch commented Feb 23, 2015

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Feb 23, 2015

Member

I updated the builds we already had there and used only one version of headers. Would be nice if you could test this branch with Android.

Member

eXpl0it3r commented Feb 23, 2015

I updated the builds we already had there and used only one version of headers. Would be nice if you could test this branch with Android.

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Feb 24, 2015

Member

Working fine for me (armeabi-v7a).

Member

MarioLiebisch commented Feb 24, 2015

Working fine for me (armeabi-v7a).

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Feb 24, 2015

Member

Since 2.5 freetype also adds png as a (optional) dependency. @eXpl0it3r, did you use it to build the binaries?

Member

mantognini commented Feb 24, 2015

Since 2.5 freetype also adds png as a (optional) dependency. @eXpl0it3r, did you use it to build the binaries?

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Feb 24, 2015

Member

No, what advantages does it give? The CMake script only provides options to build as Release/Debug and where to install it.

Member

eXpl0it3r commented Feb 24, 2015

No, what advantages does it give? The CMake script only provides options to build as Release/Debug and where to install it.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Feb 24, 2015

Member
  • Behdad Esfahbod (on behalf of Google) contributed support for
    color embedded bitmaps (eg. color emoji).

    A new load flag, FT_LOAD_COLOR, makes FreeType load color
    embedded-bitmaps, following this draft specification

    https://color-emoji.googlecode.com/git/specification/v1.html

    which defines two new SFNT tables, CBDT' andCBLC' (named and
    modeled after EBDT' andEBLC', respectively). The color
    bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to
    represent BGRA pre-multiplied sRGB images. If PNG support is
    available, PNG color images as defined in the same proposed
    specification are supported also.

Something we are not using at all.

Member

LaurentGomila commented Feb 24, 2015

  • Behdad Esfahbod (on behalf of Google) contributed support for
    color embedded bitmaps (eg. color emoji).

    A new load flag, FT_LOAD_COLOR, makes FreeType load color
    embedded-bitmaps, following this draft specification

    https://color-emoji.googlecode.com/git/specification/v1.html

    which defines two new SFNT tables, CBDT' andCBLC' (named and
    modeled after EBDT' andEBLC', respectively). The color
    bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to
    represent BGRA pre-multiplied sRGB images. If PNG support is
    available, PNG color images as defined in the same proposed
    specification are supported also.

Something we are not using at all.

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Feb 24, 2015

Member

Was about to quote the same thing. :-)

Alright then, will upload my binaries soon.

Member

mantognini commented Feb 24, 2015

Was about to quote the same thing. :-)

Alright then, will upload my binaries soon.

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Feb 24, 2015

Member

Here. http://1drv.ms/1DmrFOA to replace extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype

Member

mantognini commented Feb 24, 2015

Here. http://1drv.ms/1DmrFOA to replace extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Mar 9, 2015

Member

Superseded by #804.

Member

mantognini commented Mar 9, 2015

Superseded by #804.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment