MagnumFontConverter class
MagnumFont converter plugin.
Expects filename prefix, creates two files, prefix.conf and prefix.tga. See MagnumFont for more information about the font. The plugin requires the passed AbstractGlyphCache to be 2D, have a format compatible with the TgaImageConverter plugin and either not have GlyphCacheFeature::
Usage
This plugin depends on the Text library and the TgaImageConverter plugin. It is built if MAGNUM_WITH_MAGNUMFONTCONVERTER is enabled when building Magnum. To use as a dynamic plugin, load "MagnumFontConverter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, do the following:
set(MAGNUM_WITH_MAGNUMFONTCONVERTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app Magnum::MagnumFontConverter)
To use as a static plugin or as a dependency of another plugin with CMake, you need to request the MagnumFontConverter component of the Magnum package and link to the Magnum::MagnumFontConverter target:
find_package(Magnum REQUIRED MagnumFontConverter) # ... target_link_libraries(your-app PRIVATE Magnum::MagnumFontConverter)
Because the plugin needs access to Trade::
PluginManager::Manager<Trade::AbstractImageConverter> imageConverterManager; PluginManager::Manager<Text::AbstractFontConverter> fontConverterManager; fontConverterManager.registerExternalManager(imageConverterManager);
See Downloading and building, Usage with CMake and Loading and using plugins for more information.
Base classes
- class AbstractFontConverter
- Base for font converter plugins.
Constructors, destructors, conversion operators
- MagnumFontConverter() explicit
- Default constructor.
-
MagnumFontConverter(PluginManager::
AbstractManager& manager, const std:: string& plugin) explicit - Plugin manager constructor.