gocv icon indicating copy to clipboard operation
gocv copied to clipboard

Update to Support Additional Fonts from HersheyFont

Open htahaozlu opened this issue 4 months ago • 1 comments

Description

In the current version of the library, there seems to be a limitation on font support from HersheyFont, as stated in the documentation: "Only a subset of the available Hershey fonts are supported by OpenCV." However, with the release of OpenCV 4.1.1, there have been updates related to fonts, such as the addition of loadFontData. This function enables users to load additional font data, which could be particularly useful for cases like mine where Turkish words need to be rendered accurately.

I would like to request the inclusion of support for loading fonts using the loadFontData function, as it would greatly enhance the capabilities of the library, especially for users dealing with non-standard fonts or languages.

Steps to Reproduce

  1. Refer to the OpenCV 4.1.1 documentation regarding the loadFontData function: OpenCV FreeType2 Documentation 2.Attempt to use custom fonts or render text in languages with unique character sets using the current version of the library. 3.Observe the limitations and inaccuracies in font rendering. 4.Recognize the potential benefit of incorporating the loadFontData function to overcome these limitations.

Your Environment

  • Operating System and version: macOS Sonoma version 14.3.1
  • OpenCV version used: 4.9.0
  • How did you install OpenCV? with brew
  • GoCV version used: v0.35.0
  • Go version: go 1.20
  • Did you run the env.sh or env.cmd script before trying to go run or go build?

htahaozlu avatar Feb 19 '24 19:02 htahaozlu