BLFont Class Referencefinal [¶]
Font [C++ API].
! !
inline BLResult shape(BLGlyphBufferCore& gb) const noexcept { return bl_font_shape(this, &gb); }
inline BLResult map_text_to_glyphs(BLGlyphBufferCore& gb) const noexcept { return bl_font_map_text_to_glyphs(this, &gb, nullptr); }
inline BLResult map_text_to_glyphs(BLGlyphBufferCore& gb, BLGlyphMappingState& state_out) const noexcept { return bl_font_map_text_to_glyphs(this, &gb, &state_out); }
inline BLResult position_glyphs(BLGlyphBufferCore& gb) const noexcept { return bl_font_position_glyphs(this, &gb); }
inline BLResult apply_kerning(BLGlyphBufferCore& gb) const noexcept { return bl_font_apply_kerning(this, &gb); }
inline BLResult apply_gsub(BLGlyphBufferCore& gb, const BLBitArrayCore& lookups) const noexcept { return bl_font_apply_gsub(this, &gb, &lookups); }
inline BLResult apply_gpos(BLGlyphBufferCore& gb, const BLBitArrayCore& lookups) const noexcept { return bl_font_apply_gpos(this, &gb, &lookups); }
inline BLResult get_text_metrics(BLGlyphBufferCore& gb, BLTextMetrics& out) const noexcept { return bl_font_get_text_metrics(this, &gb, &out); }
inline BLResult get_glyph_bounds(const uint32_t* glyph_data, intptr_t glyph_advance, BLBoxI* out, size_t count) const noexcept { return bl_font_get_glyph_bounds(this, glyph_data, glyph_advance, out, count); }
inline BLResult get_glyph_advances(const uint32_t* glyph_data, intptr_t glyph_advance, BLGlyphPlacement* out, size_t count) const noexcept { return bl_font_get_glyph_advances(this, glyph_data, glyph_advance, out, count); }
! Retrieves outlines of a single glyph into the out
path. ! ! Optionally, a user can provide a sink
function with user_data
, which will be called periodically by the ! glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a ! large path in out
. inline BLResult get_glyph_outlines(BLGlyphId glyph_id, BLPathCore& out, BLPathSinkFunc sink = nullptr, void* user_data = nullptr) const noexcept { return bl_font_get_glyph_outlines(this, glyph_id, nullptr, &out, sink, user_data); }
! Retrieves outlines of a single glyph into the out
path transformed by user_transform
. ! ! Optionally, a user can provide a sink
function with user_data
, which will be called periodically by the ! glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a ! large path in out
. inline BLResult get_glyph_outlines(BLGlyphId glyph_id, const BLMatrix2D& user_transform, BLPathCore& out, BLPathSinkFunc sink = nullptr, void* user_data = nullptr) const noexcept { return bl_font_get_glyph_outlines(this, glyph_id, &user_transform, &out, sink, user_data); }
! Retrieves outlines of a glyph run into the out
path. ! ! Optionally, a user can provide a sink
function with user_data
, which will be called periodically by the ! glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a ! large path in out
. inline BLResult get_glyph_run_outlines(const BLGlyphRun& glyph_run, BLPathCore& out, BLPathSinkFunc sink = nullptr, void* user_data = nullptr) const noexcept { return bl_font_get_glyph_run_outlines(this, &glyph_run, nullptr, &out, sink, user_data); }
! Retrieves outlines of a glyph run into the out
path transformed by user_transform
. ! ! Optionally, a user can provide a sink
function with user_data
, which will be called periodically by the ! glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a ! large path in out
.
Creates a default initialized font
A default initialized font is not a valid font that could be used for rendering. It can be considered an empty or null font, which has no family, no glyphs, no tables, it's essentially empty.
Move constructor moves the underlying representation of the other
font into this newly created instance and resets the other
font to a default constructed state.
Copy constructor makes a weak copy of the underlying representation of the other
font.
Destroys the font.
Returns whether the font is valid, which means that it was constructed from a valid BLFontFace.
Resets the font to a default constructed state.
This operation always succeeds and returns BL_SUCCESS.
Swaps the underlying representation of this font with the other
font.
Copy assignment creates a weak copy of the underlying representation of the other
font and stores it in this font.
Move assignment moves the underlying representation of the other
font into this font and then resets the other
font to a default constructed state.
Tests whether the font is a valid instance.
Tests whether the font is empty, which is the same as !is_valid()
.
Tests whether this and other
fonts are equal.