Class FontFace
java.lang.Object
org.opencv.imgproc.FontFace
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FontFace__fromPtr__(long addr) booleangetInstance(MatOfInt params) getName()longbooleanloads new font facebooleansetInstance(MatOfInt params) sets the current variable font instance.
-
Field Details
-
nativeObj
protected final long nativeObj
-
-
Constructor Details
-
FontFace
protected FontFace(long addr) -
FontFace
public FontFace()loads default font -
FontFace
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.
-
-
Method Details
-
getNativeObjAddr
public long getNativeObjAddr() -
__fromPtr__
-
set
loads new font face- Parameters:
fontPathOrName- automatically generated- Returns:
- automatically generated
-
getName
-
setInstance
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).- Returns:
- automatically generated
-
getInstance
-