ASPiK SDK
iplatformfont.h
1
// This file is part of VSTGUI. It is subject to the license terms
2
// in the LICENSE file found in the top-level directory of this
3
// distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4
5
#ifndef __iplatformfont__
6
#define __iplatformfont__
7
8
#include "../vstguifwd.h"
9
#include <list>
10
11
namespace
VSTGUI
{
12
13
//-----------------------------------------------------------------------------
14
// IFontPainter Declaration
16
//-----------------------------------------------------------------------------
17
class
IFontPainter
18
{
19
public
:
20
virtual
~
IFontPainter
() noexcept =
default
;
21
22
virtual
void
drawString (
CDrawContext
* context, IPlatformString*
string
,
const
CPoint
& p,
bool
antialias =
true
)
const
= 0;
23
virtual
CCoord getStringWidth (
CDrawContext
* context, IPlatformString*
string
,
bool
antialias =
true
)
const
= 0;
24
};
25
26
//-----------------------------------------------------------------------------
27
// IPlatformFont declaration
31
//-----------------------------------------------------------------------------
32
class
IPlatformFont
:
public
AtomicReferenceCounted
33
{
34
public
:
35
static
SharedPointer<IPlatformFont>
create (
const
UTF8String
& name,
const
CCoord& size,
const
int32_t& style);
36
static
bool
getAllPlatformFontFamilies (std::list<std::string>& fontFamilyNames);
37
38
virtual
double
getAscent
()
const
= 0;
39
virtual
double
getDescent
()
const
= 0;
40
virtual
double
getLeading
()
const
= 0;
41
virtual
double
getCapHeight
()
const
= 0;
42
43
virtual
const
IFontPainter
* getPainter ()
const
= 0;
44
};
45
46
}
47
48
#endif // __iplatformfont__
VSTGUI::IPlatformFont::getCapHeight
virtual double getCapHeight() const =0
returns the height of the highest capital letter for this font. If not supported returns -1 ...
VSTGUI::SharedPointer< IPlatformFont >
VSTGUI::CDrawContext
A drawing context encapsulates the drawing context of the underlying OS.
Definition:
cdrawcontext.h:29
VSTGUI::IPlatformFont::getLeading
virtual double getLeading() const =0
returns the space between lines for this font. If not supported returns -1
VSTGUI::IPlatformFont::getDescent
virtual double getDescent() const =0
returns the descent line offset of the baseline of this font. If not supported returns -1 ...
VSTGUI
Definition:
customcontrols.cpp:8
VSTGUI::IPlatformFont
platform font class
Definition:
iplatformfont.h:32
VSTGUI::IPlatformFont::getAscent
virtual double getAscent() const =0
returns the ascent line offset of the baseline of this font. If not supported returns -1 ...
VSTGUI::ReferenceCounted
Definition:
vstguibase.h:247
VSTGUI::IFontPainter
font paint interface
Definition:
iplatformfont.h:17
VSTGUI::UTF8String
holds an UTF8 encoded string and a platform representation of it
Definition:
cstring.h:56
VSTGUI::CPoint
Point structure.
Definition:
cpoint.h:17
vstgui4
vstgui
lib
platform
iplatformfont.h
Generated by
1.8.14