Class FontFace
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
TrueType font face used by the FontFace-based PutText(InputOutputArray, string, Point, Scalar, FontFace, int, int, PutTextFlags, Range?) and GetTextSize(Size, string, Point, FontFace, int, int, PutTextFlags, Range?) (OpenCV 5).
public class FontFace : CvObject, IDisposable
- Inheritance
-
FontFace
- Implements
- Inherited Members
Constructors
FontFace()
Loads the default embedded font.
public FontFace()
FontFace(string)
Loads the font at the specified path or with the specified embedded name.
public FontFace(string fontPathOrName)
Parameters
fontPathOrNamestringEither a path to a custom font or the name of an embedded font ("sans", "italic" or "uni"). An empty string means the default embedded font.
Properties
Name
Gets the current font name.
public string Name { get; }
Property Value
Methods
GetInstance(out int[])
Gets the current variable-font instance parameters.
public bool GetInstance(out int[] @params)
Parameters
paramsint[]Output list of key/value pairs.
Returns
- bool
True on success.
Set(string)
Loads a new font face.
public bool Set(string fontPathOrName)
Parameters
fontPathOrNamestringEither a path to a custom font or the name of an embedded font.
Returns
- bool
True on success.
SetInstance(int[])
Sets the current variable-font instance.
public bool SetInstance(int[] @params)
Parameters
paramsint[]The list of pairs key1, value1, key2, value2, ... Values are in 16.16 fixed-point format (integer values must be shifted left by 16, i.e. multiplied by 65536).
Returns
- bool
True on success.