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

Already on GitHub? Sign in to your account

build embedded freetype lib with color font support? #123

Open
anthrotype opened this issue May 19, 2020 · 3 comments
Open

build embedded freetype lib with color font support? #123

anthrotype opened this issue May 19, 2020 · 3 comments

Comments

@anthrotype
Copy link
Collaborator

anthrotype commented May 19, 2020

Currently the freetype2 embedded library that freetype-py includes is built without PNG support so loading emoji fonts doesn't work. One has to build their own freetype2 library with color support and have freetype-py load from that.

the setup-build-freetype.py script is configured to disable external dependencies, for good reasons since we want to make sure the compiled library is standalone and portable:

"-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE -DFT_WITH_HARFBUZZ=OFF "
"-DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE "
"-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE "
"-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE "

Maybe we could see if we can also build the other external dependencies (zlib, png, perhaps even harfbuzz) and statically link them into the shared library that we are embedding in the freetype-py distribution.

@anthrotype
Copy link
Collaborator Author

correction sorry we already support harbuzz in the setup-build-freetype.py script:

print("\n# Lastly, rebuild FreeType, this time with Harfbuzz support.")

@rougier
Copy link
Owner

rougier commented May 19, 2020

Stupid question: do we need the "official" png library of can freetype uses something like https://github.com/nothings/stb/blob/master/stb_image.h ?

@HinTak
Copy link
Collaborator

HinTak commented May 19, 2020

Freetype uses the official libpng.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants