class
HarfBuzzFontHarfBuzz font plugin.
Contents
Improves FreeTypeFont with HarfBuzz text layouting capabilities, such as kerning, ligatures etc.
This plugin depends on the Text and HarfBuzz libraries and the FreeTypeFont plugin. It is built if WITH_HARFBUZZFONT
is enabled when building Magnum Plugins. To use as a dynamic plugin, you need to load the "HarfBuzzFont"
plugin from MAGNUM_PLUGINS_FONT_DIR
. To use as a static plugin or as a dependency of another plugin with CMake, you need to request the HarfBuzzFont
component of the MagnumPlugins
package and link to the MagnumPlugins::HarfBuzzFont
target. See Downloading and building plugins, Plugin usage with CMake and Loading and using plugins for more information.
Base classes
- class FreeTypeFont
- FreeType font plugin.
Public static functions
- static void initialize()
- Initialize the HarfBuzz library.
- static void finalize()
- Finalize the HarfBuzz library.
Constructors, destructors, conversion operators
- HarfBuzzFont() explicit
- Default constructor.
-
HarfBuzzFont(PluginManager::
AbstractManager& manager, const std:: string& plugin) explicit - Plugin manager constructor.
Private functions
- auto doFeatures() const override -> Features virtual
- Implementation for features()
- auto doIsOpened() const override -> bool virtual
- Implementation for isOpened()
-
auto doOpenSingleData(Containers::
ArrayView<const char> data, Float size) override -> Metrics virtual - Implementation for openSingleData()
- void doClose() override virtual
- Implementation for close()
-
auto doLayout(const GlyphCache& cache,
Float size,
const std::
string& text) override -> std:: unique_ptr<AbstractLayouter> virtual - Implementation for layout()
Function documentation
static void Magnum:: Text:: HarfBuzzFont:: initialize()
Initialize the HarfBuzz library.
Empty in order to avoid FreeTypeFont::
static void Magnum:: Text:: HarfBuzzFont:: finalize()
Finalize the HarfBuzz library.
Empty in order to avoid FreeTypeFont::
Metrics Magnum:: Text:: HarfBuzzFont:: doOpenSingleData(Containers:: ArrayView<const char> data,
Float size) override virtual private
Implementation for openSingleData()
Return metrics of opened font on successful opening, zeros otherwise.