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

Add Freetype font support to PutText() #1200

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Conversation

swdee
Copy link
Contributor

@swdee swdee commented Aug 15, 2024

This PR is an update to #873 which adds Freetype font support to PutText().

The original work was done by @lz1998 back in 2021 but the PR has became stale due to build issues with freetype fonts on Windows. I have modified the original PR to limit building to Linux only as the build issues on Windows should not block this important feature which supports text for non ascii characters.

This PR stops the need for workarounds as discussed in #749 to support Chinese text or at #1150.

Merging of this PR should close off #873 and #874.

Windows

OpenCV may have now fixed the build issues on Windows here microsoft/vcpkg#27343 so any Windows users who require this feature can confirm that and submit another PR.

To remove the Linux only build restrictions.

  1. Edit contrib/freetype.cpp and remove the #ifndef _WIN32 at the top of the file and #endif // _WIN32 at the bottom.
  2. Edit contrib/freetype.go and contrib/freetype_test.go files and remove the Go build tag //go:build linux at the top of each file.

@deadprogram
Copy link
Member

This is great work @swdee thank you very much! Now merging.

@deadprogram deadprogram merged commit b93df51 into hybridgroup:dev Aug 15, 2024
2 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
Development

Successfully merging this pull request may close these issues.

2 participants