IndexTextBLFontFace

BLFontFace Class Referencefinal [¶]

Font face [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Common Functionality
Properties

! !

! Returns font weight (returns default weight in case this is a variable font). [[nodiscard]] inline uint32_t weight() const noexcept { return _impl()->weight; }

! Returns font stretch (returns default weight in case this is a variable font). [[nodiscard]] inline uint32_t stretch() const noexcept { return _impl()->stretch; }

! Returns font style. [[nodiscard]] inline uint32_t style() const noexcept { return _impl()->style; }

! Returns font face information as BLFontFaceInfo. [[nodiscard]] inline const BLFontFaceInfo& face_info() const noexcept { return _impl()->face_info; }

! Returns the font face type. [[nodiscard]] inline BLFontFaceType face_type() const noexcept { return (BLFontFaceType)_impl()->face_info.face_type; }

! Returns the font face type. [[nodiscard]] inline BLFontOutlineType outline_type() const noexcept { return (BLFontOutlineType)_impl()->face_info.outline_type; }

! Returns the number of glyphs this font face provides. [[nodiscard]] inline uint32_t glyph_count() const noexcept { return _impl()->face_info.glyph_count; }

! Returns a zero-based index of this font face. ! !

Note

Face index does only make sense if this face is part of a TrueType or OpenType font collection. In that ! case the returned value would be the index of this face in that collection. If the face is not part of a ! collection then the returned value would always be zero. [[nodiscard]] inline uint32_t face_index() const noexcept { return _impl()->face_info.face_index; }

! Returns font face flags. [[nodiscard]] inline BLFontFaceFlags face_flags() const noexcept { return (BLFontFaceFlags)_impl()->face_info.face_flags; }

! Tests whether the font face has a given flag set. [[nodiscard]] inline bool has_face_flag(BLFontFaceFlags flag) const noexcept { return (_impl()->face_info.face_flags & flag) != 0; }

! Tests whether the font face uses typographic family and subfamily names. [[nodiscard]] inline bool has_typographic_names() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_TYPOGRAPHIC_NAMES); }

! Tests whether the font face uses typographic metrics. [[nodiscard]] inline bool has_typographic_metrics() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_TYPOGRAPHIC_METRICS); }

! Tests whether the font face provides character to glyph mapping. [[nodiscard]] inline bool has_char_to_glyph_mapping() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_CHAR_TO_GLYPH_MAPPING); }

! Tests whether the font face has horizontal glyph metrics (advances, side bearings). [[nodiscard]] inline bool has_horizontal_metrics() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_HORIZONTAL_METRICS); }

! Tests whether the font face has vertical glyph metrics (advances, side bearings). [[nodiscard]] inline bool has_vertical_metrics() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_VERTICAL_METRICS); }

! Tests whether the font face has a legacy horizontal kerning feature ('kern' table with horizontal kerning data). [[nodiscard]] inline bool has_horizontal_kerning() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_HORIZONTAL_KERNING); }

! Tests whether the font face has a legacy vertical kerning feature ('kern' table with vertical kerning data). [[nodiscard]] inline bool has_vertical_kerning() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_VERTICAL_KERNING); }

! Tests whether the font face has OpenType features (GDEF, GPOS, GSUB). [[nodiscard]] inline bool has_open_type_features() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_OPENTYPE_FEATURES); }

! Tests whether the font face has panose classification. [[nodiscard]] inline bool has_panose_info() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_PANOSE_INFO); }

! Tests whether the font face has unicode coverage information (this is reported by the font-face itself, not calculated). [[nodiscard]] inline bool has_coverage_info() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_COVERAGE_INFO); }

! Tests whether the font face's baseline equals 0. [[nodiscard]] inline bool has_baseline_y_at_0() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_BASELINE_Y_EQUALS_0); }

! Tests whether the font face's left sidebearing point at x equals 0. [[nodiscard]] inline bool has_lsb_point_x_at_0() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_LSB_POINT_X_EQUALS_0); }

! Tests whether the font face has unicode variation sequences feature. [[nodiscard]] inline bool has_variation_sequences() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_VARIATION_SEQUENCES); }

! Tests whether the font face has OpenType Font Variations feature. [[nodiscard]] inline bool has_open_type_variations() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_OPENTYPE_VARIATIONS); }

! This is a symbol font. [[nodiscard]] inline bool is_symbol_font() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_SYMBOL_FONT); }

! This is a last resort font. [[nodiscard]] inline bool is_last_resort_font() const noexcept { return has_face_flag(BL_FONT_FACE_FLAG_LAST_RESORT_FONT); }

! Returns font face diagnostics flags. [[nodiscard]] inline BLFontFaceDiagFlags diag_flags() const noexcept { return BLFontFaceDiagFlags(_impl()->face_info.diag_flags); }

! Returns a unique identifier describing this BLFontFace. [[nodiscard]] inline BLUniqueId unique_id() const noexcept { return _impl()->unique_id; }

! Returns BLFontData associated with this font face. [[nodiscard]] inline const BLFontData& data() const noexcept { return _impl()->data.dcast(); }

! Returns a full of the font. [[nodiscard]] inline const BLString& full_name() const noexcept { return _impl()->full_name.dcast(); }

! Returns a family name of the font. [[nodiscard]] inline const BLString& family_name() const noexcept { return _impl()->family_name.dcast(); }

! Returns a subfamily name of the font. [[nodiscard]] inline const BLString& subfamily_name() const noexcept { return _impl()->subfamily_name.dcast(); }

! Returns a PostScript name of the font. [[nodiscard]] inline const BLString& post_script_name() const noexcept { return _impl()->post_script_name.dcast(); }

! Returns design metrics of this BLFontFace. [[nodiscard]] inline const BLFontDesignMetrics& design_metrics() const noexcept { return _impl()->design_metrics; }

! Returns units per em, which are part of font's design metrics. [[nodiscard]] inline int units_per_em() const noexcept { return _impl()->design_metrics.units_per_em; }

! Returns PANOSE classification of this BLFontFace. [[nodiscard]] inline const BLFontPanoseInfo& panose_info() const noexcept { return _impl()->panose_info; }

! Returns unicode coverage of this BLFontFace. ! !

Note

The returned unicode-coverage is not calculated by Blend2D so in general the value doesn't have to be ! correct. Consider get_character_coverage() to get a coverage calculated by Blend2D at character granularity. [[nodiscard]] inline const BLFontCoverageInfo& coverage_info() const noexcept { return _impl()->coverage_info; }

! Calculates the character coverage of this BLFontFace. ! ! Each unicode character is represented by a single bit in the given BitSet. inline BLResult get_character_coverage(BLBitSetCore* out) const noexcept { return bl_font_face_get_character_coverage(this, out); }

! Tests whether the font face provides the given OpenType script_tag. [[nodiscard]] inline bool has_script_tag(BLTag script_tag) const noexcept { return bl_font_face_has_script_tag(this, script_tag); }

! Tests whether the font face provides the given OpenType feature_tag. [[nodiscard]] inline bool has_feature_tag(BLTag feature_tag) const noexcept { return bl_font_face_has_feature_tag(this, feature_tag); }

! Tests whether the font face provides the given OpenType variation_tag.

Additional Inherited Members

Public Attributes inherited from BLObjectCore

bool BLFontFace::is_valid() constnodiscardnoexcept[¶]

Tests whether the font face is valid.

bool BLFontFace::is_empty() constnodiscardnoexcept[¶]

Tests whether the font face is empty, which is the same as !is_valid().

BLResult BLFontFace::get_script_tags() constnoexcept[¶]

Retrieves OpenType script tags provided by this BLFontFace.

Each script tag is represented by 4 characters encoded in BLTag.

BLResult BLFontFace::get_feature_tags() constnoexcept[¶]

Retrieves OpenType feature tags provided by this BLFontFace.

Each feature tag is represented by 4 characters encoded in BLTag.

Feature tag registry:

BLResult BLFontFace::get_variation_tags() constnoexcept[¶]

Retrieves OpenType variation tags provided by this BLFontFace.

Each variation tag is represented by 4 characters encoded in BLTag.

Variation tag registry: