# dlangui.graphics.ftfonts

DLANGUI library.
This file contains FontManager implementation based on FreeType library.
License:
Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com

class FreeTypeFont: dlangui.graphics.fonts.Font;
  Font implementation based on Win32 API system fonts.
  this(FontFileItem item, int size);
    need to call create() after construction to initialize font
  void clear();
    cleanup resources
  bool findGlyph(dchar code, dchar def_char, ref FT_UInt index, ref FreeTypeFontFile file);
    find glyph index for character
  bool create();
    load font files
  void checkpoint();
    clear usage flags for all entries
  void cleanup();
    removes entries not used after last call of checkpoint() or cleanup()
class FreeTypeFontManager: dlangui.graphics.fonts.FontManager;
  FreeType based font manager.
  ref FontRef getFont(int size, int weight, bool italic, FontFamily family, string face);
    get font instance with specified parameters
  void checkpoint();
    clear usage flags for all entries
  void cleanup();
    removes entries not used after last call of checkpoint() or cleanup()
  bool registerFont(string filename, FontFamily family = FontFamily.SansSerif, string face = null, bool italic = false, int weight = 0);
    register freetype font by filename - optinally font properties can be passed if known (e.g. from libfontconfig).

Page generated by Ddoc. Vadim Lopatin, 2014