- Timestamp:
- Oct 13, 2005, 12:45:03 AM (19 years ago)
- Location:
- trunk/src/lib/graphics/text_engine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/font.cc
r5369 r5370 477 477 SDL_FreeSurface(glyphSurf); 478 478 479 tmpRect.x += (int)(tmpGlyph->advance*this->renderSize) ;479 tmpRect.x += (int)(tmpGlyph->advance*this->renderSize)+1; 480 480 481 481 // Outputting Glyphs to BMP-files. … … 578 578 if (y + maxLineHeight + 1 > size) 579 579 break; 580 x += (int)(tmpGlyph->advance*this->renderSize) ;580 x += (int)(tmpGlyph->advance*this->renderSize)+1; 581 581 582 582 } -
trunk/src/lib/graphics/text_engine/text.cc
r5369 r5370 243 243 { 244 244 Glyph* tmpGlyph; 245 float posX = 0.0f; 245 246 while (likely(*tmpText != '\0')) 246 247 { … … 249 250 glBegin(GL_QUADS); 250 251 glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]); 251 glVertex2d( 0, - tmpGlyph->bearingY * this->size);252 glVertex2d(posX, - tmpGlyph->bearingY * this->size); 252 253 glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]); 253 glVertex2d( 0, (tmpGlyph->height - tmpGlyph->bearingY)*this->size);254 glVertex2d(posX, (tmpGlyph->height - tmpGlyph->bearingY)*this->size); 254 255 glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]); 255 glVertex2d( tmpGlyph->width*this->size, (tmpGlyph->height - tmpGlyph->bearingY)*this->size);256 glVertex2d(posX+tmpGlyph->width*this->size, (tmpGlyph->height - tmpGlyph->bearingY)*this->size); 256 257 glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]); 257 glVertex2d( tmpGlyph->width*this->size, - tmpGlyph->bearingY*this->size);258 glVertex2d(posX+tmpGlyph->width*this->size, - tmpGlyph->bearingY*this->size); 258 259 glEnd(); 259 260 glEndList(); 260 glTranslatef(glyphArray[*tmpText]->width*this->size, 0, 0);261 posX += tmpGlyph->width*this->size; 261 262 } 262 263 tmpText++;
Note: See TracChangeset
for help on using the changeset viewer.