/[gzz]/gzz/gfx/libtext/Text.cxx
ViewVC logotype

Diff of /gzz/gfx/libtext/Text.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by tjl, Wed Aug 21 07:12:43 2002 UTC revision 1.5 by tjl, Sun Oct 6 17:37:46 2002 UTC
# Line 46  namespace Text { Line 46  namespace Text {
46          FT_GlyphSlot slot = face->glyph;          FT_GlyphSlot slot = face->glyph;
47          FT_Bitmap *bitmap = &(slot->bitmap);          FT_Bitmap *bitmap = &(slot->bitmap);
48    
49          return Glyph(GlyphInfo(-slot->bitmap_top, slot->bitmap_left,          float ps = this->pixsize;
50                              bitmap->width, bitmap->rows,  
51                              slot->advance.x >> 6),          return Glyph(GlyphInfo(
52                              Raster<Mosaic::Format::Alpha>(bitmap->width, bitmap->rows,                      -slot->bitmap_top / ps, slot->bitmap_left / ps,
53                                  vector<GLubyte>(                              bitmap->width / ps, bitmap->rows / ps,
54                                  bitmap->buffer, bitmap->buffer + bitmap->width * bitmap->rows)                              (slot->advance.x >> 6) / ps,
55                                1/ps,
56                                bitmap->width, bitmap->rows
57                                ),
58                    Raster<Mosaic::Format::Alpha>(bitmap->width, bitmap->rows,
59                    vector<GLubyte>(
60                    bitmap->buffer, bitmap->buffer + bitmap->width * bitmap->rows)
61                              ));                              ));
62      }      }
63    
64      int FTFont::getLineHeight() {      int FTFont::getLineHeight() {
65          return face->size->metrics.height >> 6;          return (face->size->metrics.height >> 6) / (float)pixsize;
66      }      }
67      int FTFont::getLineOffset() {      int FTFont::getLineOffset() {
68          return face->size->metrics.ascender >> 6;          return (face->size->metrics.ascender >> 6) / (float)pixsize;
69      }      }
70    
71    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26