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

freetype2: Fix comments in freetype.hpp and README.md #2776

Merged
merged 5 commits into from
Dec 7, 2020

Conversation

Kumataro
Copy link
Contributor

@Kumataro Kumataro commented Dec 6, 2020

Fix #2771 and related small problems about documentation.

  1. freetype.hpp is fixed.
  • putText() is supported for only 8UC3 image with only 8UC3 color.
  1. README.md is fixed.
  • Use correct markdown format.
  • Change document title from "freetype module" to "freetype wrapper module".
    • This module title was "freetype module".
    • FText primitive in GAPI uses `freetype library".
    • Generally "module" and "library" in the computer world are similar.
    • So that, I think this module title should be changed to not confuse it.
  • Installation is replaced as Requested external libraries
  • Usage is update to it can be compile in real.
  • Future work is removed.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution.

Please take a look on comments below.

@param text Text string to be drawn.
@param org Bottom-left/Top-left corner of the text string in the image.
@param fontHeight Drawing font size by pixel unit.
@param color Text color.
@param color Text color.(Only 3ch 8bit Scalar is supported.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8bit

Scalar values are doubles by design.
I believe we should mention used range, like 0-255, here instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

Because freetype2 wrapper module requests that img is 8UC3, I reconsider this limitation of color is very clear.

  • first 3 channels of 'color' are used, 4th channel of it is not.
  • The range of element are 0-255.

This change is not necessary. I cancel adding comment.

Installation
-----------
Requested external libraries.
------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove dots from the Headers

Please align number of === / --- symbols on the next line (as markdown requested)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much ! I'll fix it.

- Remove dots from the Headers
- Align number of === / --- symbols on the next line
@alalek alalek merged commit 9b5a801 into opencv:master Dec 7, 2020
@alalek alalek mentioned this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: documentation Documentation fix or update, does not affect code category: freetype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FreeType/TTF putText crashes with CV_32FC3 (low priority)
2 participants