Logo
Font.h
1#pragma once
2
3#include "Types.h"
4#include "gfx/Font.h"
5
6namespace SharpKmyGfx
7{
8 ref class Texture;
9
10 public ref class Font
11 {
12 public:
13 kmyGfx::Font * obj = nullptr;
14
15 Font();
16 Font(System::String ^path, int height, float scale, int boldWeight);
17 void Release();
18 SharpKmyMath::Vector2 measureString(cli::array<byte> ^text);
19
20 static Font^ newSystemFont(cli::array<byte> ^faceName, u32 height, bool bold);
21 static Font^ newSystemFont(cli::array<byte> ^faceName, u32 height, float scale, int boldWeight);
22 static Font^ newSystemFontGdi(cli::array<byte> ^faceName, u32 height, float scale);
23
25 void setLeadingOffset(float pos, float line);
26 bool isAvailable() { return obj; }
27
28 private:
29 kmyIO::StreamBase *m_stream;
30 u32 m_fileSize;
31 u8* m_buffer;
32 };
33}
Definition: Font.h:11
void setLeadingOffset(float pos, float line)
Definition: Font.cpp:201
static Font newSystemFontGdi(cli::array< byte > ^faceName, u32 height, float scale)
Definition: Font.cpp:46
static Font newSystemFont(cli::array< byte > ^faceName, u32 height, float scale, int boldWeight)
Texture getTexture()
Definition: Font.cpp:191
bool isAvailable()
Definition: Font.h:26
SharpKmyMath::Vector2 measureString(cli::array< byte > ^text)
Definition: Font.cpp:180
static Font newSystemFont(cli::array< byte > ^faceName, u32 height, bool bold)
Definition: Font.cpp:80
kmyGfx::Font * obj
Definition: Font.h:13
Font()
Definition: Font.cpp:9
void Release()
Definition: Font.cpp:168
Definition: Texture.h:12
Definition: Asset.h:4
Definition: Vector2.h:5