BLFontData Class Referencefinal [¶]
Font data [C++ API].
! !
! Type of font face that this data describes. ! ! It doesn't matter if the content is a single font or a collection. In any case the face_type()
would always ! return the type of the font face that will be created by BLFontFace::create_from_data(). [[nodiscard]] inline BLFontFaceType face_type() const noexcept { return BLFontFaceType(_impl()->face_type); }
! Returns the number of faces of this font data. ! ! If the data is not initialized the result would be always zero. If the data is initialized to a single font it ! would be 1, and if the data is initialized to a font collection then the return would correspond to the number ! of font faces within that collection. ! !
You should not use face_count()
to check whether the font is a collection as it's possible to have a ! font-collection with just a single font. Using is_collection()
is more reliable and would always return the ! right value. [[nodiscard]] inline uint32_t face_count() const noexcept { return _impl()->face_count; }
! Returns font data flags. [[nodiscard]] inline BLFontDataFlags flags() const noexcept { return BLFontDataFlags(_impl()->flags); }
! Tests whether this font data is a font-collection. [[nodiscard]] inline bool is_collection() const noexcept { return (_impl()->flags & BL_FONT_DATA_FLAG_COLLECTION) != 0; }
! Populates dst
array with all table tags provided by font face at the given face_index
.
Tests whether the font data is a built-in null instance.
Tests whether the font data is empty, which is the same as !is_valid()
.