Changeset c57bd20 in git


Ignore:
Timestamp:
15/06/10 09:03:31 (9 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/survex-1_1, svn/tags/1.1.14, svn/tags/1.1.15, svn/tags/1.1.16, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/tags/v1_1_13, svn/trunk, travis-osx
Children:
381bf27
Parents:
d133b65
Message:

src/fnt.cc: Use font size from txf file rather than trying to
calculate it from the texture fragment sizes.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3414 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rd133b65 rc57bd20  
     1Tue Jun 15 07:59:09 GMT 2010  Olly Betts <olly@survex.com>
     2
     3        * src/fnt.cc: Use font size from txf file rather than trying to
     4          calculate it from the texture fragment sizes.
     5
    16Tue Jun 15 07:48:13 GMT 2010  Olly Betts <olly@survex.com>
    27
  • src/fnt.cc

    rd133b65 rc57bd20  
    8888    int tex_width   = fnt_readInt(fd);
    8989    int tex_height  = fnt_readInt(fd);
    90     /* int max_height = */ fnt_readInt(fd);
     90    fnt_size = fnt_readInt(fd);
     91    fnt_size += fnt_size >> 2;
    9192    /* int unknown = */ fnt_readInt(fd);
    9293    int num_glyphs  = fnt_readInt(fd);
     
    171172    float H = 1.0f / (float)tex_height;
    172173    unsigned char max_w = 0;
    173     int u = 0, d = 0;
    174174    for (i = 0; i < num_glyphs; ++i) {
    175175        unsigned short ch = fnt_readShort(fd);
     
    208208        glTranslated(widths[ch], 0, 0);
    209209        glEndList();
    210         if (vtx_bot < d) d = vtx_bot;
    211         if (vtx_top > u) u = vtx_top;
    212     }
    213     fnt_size = u - d;
     210    }
    214211
    215212    if (widths[(int)' '] == -1) {
Note: See TracChangeset for help on using the changeset viewer.