~ubuntu-branches/debian/stretch/gource/stretch

« back to all changes in this revision

Viewing changes to src/core/fxfont.h

  • Committer: Package Import Robot
  • Author(s): Andrew Caudwell
  • Date: 2013-05-13 09:58:33 UTC
  • mfrom: (1.2.14)
  • Revision ID: package-import@ubuntu.com-20130513095833-1r8t89oflvhqxwny
Tags: 0.40-1
* New upstream release.
* Added dpkg-buildflags.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
 
77
77
class FXGlyphPage {
78
78
    GLubyte* texture_data;
79
 
    bool needs_update;
80
 
    int page_width;
81
 
    int page_height;
 
79
    bool     needs_update;
 
80
    int      page_width;
 
81
    int      page_height;
82
82
public:
83
83
    TextureResource* texture;
84
84
 
99
99
    vec2 dims;
100
100
    vec2 corner;
101
101
    vec2 advance;
 
102
    int  height;
102
103
public:
103
104
    vec2 vertex_positions[4];
104
105
    vec2 vertex_texcoords[4];
114
115
    const vec2& getCorner() const { return corner; };
115
116
    const vec2& getDimensions() const { return dims; };
116
117
 
 
118
    int getHeight() const { return height; };
 
119
 
117
120
    void setPage(FXGlyphPage* page, const vec4& texcoords);
118
121
 
119
122
    void drawToVBO(quadbuf& buffer, const vec2& offset, const vec4& colour) const;
124
127
    FT_Library freetype;
125
128
    FT_Face ftface;
126
129
    std::string fontfile;
 
130
    int max_height;
127
131
    int size;
128
132
    int dpi;
 
133
    float tab_width;
129
134
 
130
135
    bool pre_caching;
131
136
 
147
152
 
148
153
    float getWidth(const std::string& text);
149
154
 
150
 
    float getMaxWidth() const;
 
155
    float getAscender() const;
 
156
 
 
157
    float getMaxWidth()  const;
151
158
    float getMaxHeight() const;
152
159
 
153
160
    int getSize() const { return size; };
186
193
 
187
194
    float getWidth(const std::string& text) const;
188
195
 
 
196
    float getAscender() const;
 
197
 
189
198
    void alignTop(bool top);
190
199
    void alignRight(bool right);
191
200