emscripten-ports / FreeType

6 stars 6 forks source link

update port to newer FreeType #4

Open ericoporto opened 3 years ago

ericoporto commented 3 years ago

FreeType has been changing a lot from this version: https://gitlab.freedesktop.org/freetype/freetype

It would be good to either update the version here or get upstream to care about Emscripten, otherwise apps that follow upstream will start to break with this version.

I opened a somewhat similar issue on FreeType repository - FreeType has a really complex codebase I can't seem to make progress understanding it, so while I need it, I can't help much. https://gitlab.freedesktop.org/freetype/freetype/-/issues/1052

ericoporto commented 3 years ago

I discovered that the latest FreeType builds fine using emcmake cmake with their latest CMakeLists.txt file, so I switched to using that in my workflow. It would be nice to update the port though so it doesn't cause troubles for people finding it.

kripken commented 3 years ago

I agree it would be good to update the port. That would also run it through the emscripten test suite, which has a few regression tests for freetype. If those all pass we should be ok.

HCLJason commented 3 years ago

I have a PR for this, as well as a matching tools/ports/freetype.py update almost ready to go for the emscripten-core/emscripten repo.

I did have trouble compiling it if we named the release anything but version_1. When I checked for a hard-coded version_1, grep turned up empty.

We need to merge the PR, create a new release, then add the sha512 into the tools/ports/freetype.py file.

ericoporto commented 3 years ago

This is a different project doing different things, but the list of files for building FreeType on Emscripten ports when using 2.10.4 is probably similar to the list I have here: https://github.com/ericoporto/ags/commit/70b3435fa67fcd080f04ec462daf60fa4b9d499f or here: Makefile-defs.freetype., attention too to the macro FT2_BUILD_LIBRARY.

albertvaka commented 1 year ago

This might also (maybe) be the fix for https://github.com/emscripten-ports/FreeType/issues/3

HinTak commented 1 year ago

@albertvaka the color font issue is likely not version related but libpng related.