aboutsummaryrefslogtreecommitdiff
path: root/libjin/Graphics/Font.h
diff options
context:
space:
mode:
Diffstat (limited to 'libjin/Graphics/Font.h')
-rw-r--r--libjin/Graphics/Font.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/libjin/Graphics/Font.h b/libjin/Graphics/Font.h
index e944b41..b09d393 100644
--- a/libjin/Graphics/Font.h
+++ b/libjin/Graphics/Font.h
@@ -22,9 +22,9 @@ namespace graphics
struct GlyphArrayDrawInfo
{
- GLuint texture;
- unsigned int start;
- unsigned int count;
+ GLuint texture; // atlas
+ unsigned int start; // glyph vertex indecies
+ unsigned int count; // glyph vertex count
};
struct Glyph
@@ -53,15 +53,15 @@ namespace graphics
static Font* createFont(FontData* fontData, unsigned int fontSzie);
- void print(const char* text, int x, int y);
- Page* typeset(const char* text, int x, int y);
+ Page* typeset(const char* text, int x, int y, int lineheight, int spacing);
void render(const Page* page);
+ void print(const char* text, int x, int y, int lineheight, int spacing);
+ //Bitmap* bake(const char* text);
#if defined(font_debug)
void drawAtlas();
#endif
private:
- /* font atlas levels */
static const int TEXTURE_SIZE_LEVELS_COUNT = 7;
static const int TEXTURE_SIZE_LEVEL_MAX = TEXTURE_SIZE_LEVELS_COUNT - 1;
static const int TEXTURE_WIDTHS[TEXTURE_SIZE_LEVELS_COUNT];
@@ -71,7 +71,7 @@ namespace graphics
~Font();
void estimateSize();
- bool createAtlas();
+ GLuint createAtlas();
Glyph* bakeGlyph(Codepoint character);
Glyph* findGlyph(Codepoint character);