Show
Ignore:
Timestamp:
07/04/08 03:46:13 (5 months ago)
Author:
krobillard
Message:

Thune

  • Implemented date!. Added ur_arrayExpand(), save.

ThuneGL

  • Added line-edit widget, blit, move-glyphs.
  • Can now make font from texture & binary.
  • Optimized renderGlyphXY() a bit.
  • twidget close event handler works again.
  • Updated thune-gl.spec for renamed glv RPM.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/gl/TexFont.c

    r533 r540  
    132132        it = (uint16_t*) KERN(tf); 
    133133        swap16( it, it + tf->kern_size ); 
     134    } 
     135} 
     136 
     137 
     138/** 
     139  Change the texture position of all glyphs. 
     140*/ 
     141void txf_moveGlyphs( TexFont* tf, int dx, int dy ) 
     142{ 
     143    TexFontGlyph* tgi = GLYPHS(tf); 
     144    TexFontGlyph* end = tgi + tf->glyph_count; 
     145    while( tgi != end ) 
     146    { 
     147        tgi->x += dx; 
     148        tgi->y += dy; 
     149        ++tgi; 
    134150    } 
    135151} 
     
    352368    // Most glyphs have no kerning adjustment, and those with it have only 
    353369    // a handful (at least at small font sizes). 
    354     kern_space = count * 5;     // 5 = 2 glyphs + terminator 
     370    kern_space = count * 7;     // 7 = 3 glyphs + terminator 
    355371 
    356372    txf = (TexFont*) malloc(  sizeof(TexFont) + 
     
    437453        tgi->advance = FT_PIXELS(glyph->metrics.horiAdvance); 
    438454        tgi->x       = x /*+ tgi->xoffset*/; 
     455#if 0 
    439456        tgi->y       = img->height - y + tgi->yoffset; 
     457#else 
     458        tgi->y       = y - tgi->yoffset; 
     459#endif 
    440460 
    441461#ifdef DUMP