8 #include "../../iplatformfont.h" 10 #if WINDOWS && VSTGUI_DIRECT2D_SUPPORT 12 struct IDWriteTextFormat;
13 struct IDWriteTextLayout;
18 class D2DFont :
public IPlatformFont,
public IFontPainter
21 D2DFont (
const UTF8String& name,
const CCoord& size,
const int32_t& style);
23 IDWriteTextLayout* createTextLayout (IPlatformString*
string)
const;
25 static bool getAllPlatformFontFamilies (std::list<std::string>& fontFamilyNames);
30 double getAscent ()
const override {
return ascent; }
31 double getDescent ()
const override {
return descent; }
32 double getLeading ()
const override {
return leading; }
33 double getCapHeight ()
const override {
return capHeight; }
35 const IFontPainter* getPainter ()
const override {
return this; }
37 void drawString (CDrawContext* context, IPlatformString*
string,
const CPoint& p,
bool antialias =
true)
const override;
38 CCoord getStringWidth (CDrawContext* context, IPlatformString*
string,
bool antialias =
true)
const override;
40 IDWriteTextFormat* textFormat;
50 #endif // WINDOWS && VSTGUI_DIRECT2D_SUPPORT Definition: customcontrols.cpp:8