View Source Evision.FontFace (Evision v1.0.0)
Summary
Functions
loads default font
loads font at the specified path or with specified name.
getInstance
getName
loads new font face
sets the current variable font instance.
Types
@type t() :: %Evision.FontFace{ref: reference()}
Type that represents an FontFace struct.
ref.
reference()The underlying erlang resource variable.
Functions
loads default font
Return
- self:
Evision.FontFace.t()
Python prototype (for reference only):
FontFace() -> <FontFace object>
@spec fontFace(Keyword.t()) :: any() | {:error, String.t()}
@spec fontFace(binary()) :: t() | {:error, String.t()}
loads font at the specified path or with specified name.
Positional Arguments
fontPathOrName:
String.either path to the custom font or the name of embedded font: "sans", "italic" or "uni". Empty fontPathOrName means the default embedded font.
Return
- self:
Evision.FontFace.t()
Python prototype (for reference only):
FontFace(fontPathOrName) -> <FontFace object>
@spec getInstance(Keyword.t()) :: any() | {:error, String.t()}
@spec getInstance(t()) :: [integer()] | false | {:error, String.t()}
getInstance
Positional Arguments
- self:
Evision.FontFace.t()
Return
- retval:
bool - params:
[integer()]
Python prototype (for reference only):
getInstance() -> retval, params
@spec getName(Keyword.t()) :: any() | {:error, String.t()}
@spec getName(t()) :: binary() | {:error, String.t()}
getName
Positional Arguments
- self:
Evision.FontFace.t()
Return
- retval:
String
Python prototype (for reference only):
getName() -> retval
loads new font face
Positional Arguments
- self:
Evision.FontFace.t() - fontPathOrName:
String
Return
- retval:
bool
Python prototype (for reference only):
set(fontPathOrName) -> retval
sets the current variable font instance.
Positional Arguments
self:
Evision.FontFace.t()params:
[integer()].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).
Return
- retval:
bool
Python prototype (for reference only):
setInstance(params) -> retval