Wrapper on top of a truetype/opentype/etc font, i.e. Freetype's FT_Face.
More...
#include <opencv2/imgproc.hpp>
Wrapper on top of a truetype/opentype/etc font, i.e. Freetype's FT_Face.
The class is used to store the loaded fonts; the font can then be passed to the functions putText and getTextSize.
- Examples
- samples/dnn/classification.cpp, samples/dnn/object_detection.cpp, and samples/dnn/text_detection.cpp.
◆ FontFace() [1/2]
cv::FontFace::FontFace |
( |
| ) |
|
Python: |
---|
| cv.FontFace( | | ) -> | <FontFace object> |
| cv.FontFace( | fontPathOrName | ) -> | <FontFace object> |
◆ FontFace() [2/2]
cv::FontFace::FontFace |
( |
const String & |
fontPathOrName | ) |
|
Python: |
---|
| cv.FontFace( | | ) -> | <FontFace object> |
| cv.FontFace( | fontPathOrName | ) -> | <FontFace object> |
loads font at the specified path or with specified name.
- Parameters
-
fontPathOrName | either path to the custom font or the name of embedded font: "sans", "italic" or "uni". Empty fontPathOrName means the default embedded font. |
◆ ~FontFace()
cv::FontFace::~FontFace |
( |
| ) |
|
◆ getBuiltinFontData()
static bool cv::FontFace::getBuiltinFontData |
( |
const String & |
fontName, |
|
|
const uchar *& |
data, |
|
|
size_t & |
datasize |
|
) |
| |
|
static |
◆ getInstance()
bool cv::FontFace::getInstance |
( |
std::vector< int > & |
params | ) |
const |
Python: |
---|
| cv.FontFace.getInstance( | | ) -> | retval, params |
◆ getName()
String cv::FontFace::getName |
( |
| ) |
const |
Python: |
---|
| cv.FontFace.getName( | | ) -> | retval |
◆ operator->()
Impl * cv::FontFace::operator-> |
( |
| ) |
|
◆ set()
bool cv::FontFace::set |
( |
const String & |
fontPathOrName | ) |
|
Python: |
---|
| cv.FontFace.set( | fontPathOrName | ) -> | retval |
◆ setInstance()
bool cv::FontFace::setInstance |
( |
const std::vector< int > & |
params | ) |
|
Python: |
---|
| cv.FontFace.setInstance( | params | ) -> | retval |
sets the current variable font instance.
- Parameters
-
params | The list of pairs key1, value1, key2, value2, ..., e.g. ‘myfont.setInstance({CV_FOURCC('w’,'g','h','t'), 400<<16, CV_FOURCC('s','l','n','t'), -(15<<16)});` Note that the parameter values are specified in 16.16 fixed-point format, that is, integer values need to be shifted by 16 (or multiplied by 65536). |
◆ impl
Ptr<Impl> cv::FontFace::impl |
|
protected |
The documentation for this class was generated from the following file: