Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
tbuifontrenderer.h
Go to the documentation of this file.
1
// ================================================================================
2
// == This file is a part of Turbo Badger. (C) 2011-2014, Emil Segerås ==
3
// == See tb_core.h for more information. ==
4
// ================================================================================
5
6
#include <math.h>
7
#include "tb_font_renderer.h"
8
#include "tb_renderer.h"
9
#include "platform/tb_system_interface.h"
10
#include "tb_tempbuffer.h"
11
12
namespace
TBUI
13
{
15
16
class
TBUISTBFontRenderer
:
public
tb::TBFontRenderer
17
{
18
public
:
19
TBUISTBFontRenderer
();
20
~TBUISTBFontRenderer
();
21
22
bool
Load
(
const
char
* filename,
int
size);
23
24
virtual
tb::TBFontFace*
Create
(tb::TBFontManager* font_manager,
const
char
* filename,
const
tb::TBFontDescription& font_desc);
25
26
virtual
tb::TBFontMetrics
GetMetrics
();
27
virtual
bool
RenderGlyph
(tb::TBFontGlyphData* dst_bitmap, UCS4 cp);
28
virtual
void
GetGlyphMetrics
(tb::TBGlyphMetrics* metrics, UCS4 cp);
29
virtual
int
GetAdvance
(UCS4 cp1, UCS4 cp2);
30
31
private
:
32
stbtt_fontinfo
font
;
33
tb::TBTempBuffer
ttf_buffer
;
34
unsigned
char
*
render_data
;
35
float
scale
;
36
};
37
}
TBUI::TBUISTBFontRenderer::RenderGlyph
virtual bool RenderGlyph(tb::TBFontGlyphData *dst_bitmap, UCS4 cp)
Definition
tbuifontrenderer.cc:40
TBUI::TBUISTBFontRenderer::TBUISTBFontRenderer
TBUISTBFontRenderer()
Definition
tbuifontrenderer.cc:17
TBUI::TBUISTBFontRenderer::ttf_buffer
tb::TBTempBuffer ttf_buffer
Definition
tbuifontrenderer.h:33
TBUI::TBUISTBFontRenderer::~TBUISTBFontRenderer
~TBUISTBFontRenderer()
Definition
tbuifontrenderer.cc:22
TBUI::TBUISTBFontRenderer::scale
float scale
Definition
tbuifontrenderer.h:35
TBUI::TBUISTBFontRenderer::GetGlyphMetrics
virtual void GetGlyphMetrics(tb::TBGlyphMetrics *metrics, UCS4 cp)
Definition
tbuifontrenderer.cc:51
TBUI::TBUISTBFontRenderer::GetAdvance
virtual int GetAdvance(UCS4 cp1, UCS4 cp2)
Definition
tbuifontrenderer.cc:65
TBUI::TBUISTBFontRenderer::GetMetrics
virtual tb::TBFontMetrics GetMetrics()
Definition
tbuifontrenderer.cc:28
TBUI::TBUISTBFontRenderer::Create
virtual tb::TBFontFace * Create(tb::TBFontManager *font_manager, const char *filename, const tb::TBFontDescription &font_desc)
Definition
tbuifontrenderer.cc:89
TBUI::TBUISTBFontRenderer::render_data
unsigned char * render_data
Definition
tbuifontrenderer.h:34
TBUI::TBUISTBFontRenderer::Load
bool Load(const char *filename, int size)
Definition
tbuifontrenderer.cc:76
TBUI::TBUISTBFontRenderer::font
stbtt_fontinfo font
Definition
tbuifontrenderer.h:32
TBUI
Turbobadger UI Batch.
Definition
tbuibatch.h:18
code
addons
tbui
backend
tbuifontrenderer.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.