Changeset 24


Ignore:
Timestamp:
05/18/13 10:55:38 (12 years ago)
Author:
melon
Message:

Fixed typos (gylph => glyph)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/gl/texture_font.hh

    r22 r24  
    1717namespace nv
    1818{
    19         struct texture_gylph
     19        struct texture_glyph
    2020        {
    2121            uint16 charcode;
     
    2727                std::unordered_map< uint16, float > kerning;
    2828
    29                 texture_gylph();
     29                texture_glyph();
    3030                float get_kerning( const uint16 charcode );
    3131        };
     
    3535        public:
    3636                texture_font( texture_atlas* atlas, const char * filename, float size );
    37                 const texture_gylph* get_gylph( uint16 charcode ) const;
     37                const texture_glyph* get_glyph( uint16 charcode ) const;
    3838                bool load_glyphs( const std::string& codes );
    3939                ~texture_font();
     
    4141                void generate_kerning();
    4242        private:
    43                 std::unordered_map< uint16, texture_gylph > m_gylphs;
     43                std::unordered_map< uint16, texture_glyph > m_glyphs;
    4444                texture_atlas* m_atlas;
    4545                std::string m_filename;
  • trunk/nv/lib/freetype2.hh

    r20 r24  
    720720#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY         0x0200
    721721
    722   /* ftgylph.h */
     722  /* ftglyph.h */
    723723
    724724  typedef struct FT_Glyph_Class_  FT_Glyph_Class;
  • trunk/src/gl/texture_font.cc

    r23 r24  
    1212using namespace nv;
    1313
    14 texture_gylph::texture_gylph()
     14texture_glyph::texture_glyph()
    1515        : charcode(0), size(0,0), offset(0,0), advance(0.f,0.f), tl(0.f,0.f), br(0.f,0.f)
    1616{
    1717}
    1818
    19 float texture_gylph::get_kerning( const uint16 charcode )
     19float texture_glyph::get_kerning( const uint16 charcode )
    2020{
    2121        auto i = kerning.find( charcode );
     
    6161}
    6262
    63 const texture_gylph* texture_font::get_gylph( uint16 charcode ) const
     63const texture_glyph* texture_font::get_glyph( uint16 charcode ) const
    6464{
    65         auto i = m_gylphs.find( charcode );
    66         if ( i == m_gylphs.end() )
     65        auto i = m_glyphs.find( charcode );
     66        if ( i == m_glyphs.end() )
    6767        {
    6868                return nullptr;
     
    101101                FT_UInt glyph_index = FT_Get_Char_Index( face, c );
    102102                FT_Error error = FT_Load_Glyph( face, glyph_index, flags );
    103                 if ( error ) throw std::runtime_error( "FT_Error while loading gylphs" );
     103                if ( error ) throw std::runtime_error( "FT_Error while loading glyphs" );
    104104
    105105                FT_GlyphSlot slot   = face->glyph;
     
    114114                if ( r.pos.x < 0 )
    115115                {
    116                         throw std::runtime_error( "Atlas full while loading gylphs" );
     116                        throw std::runtime_error( "Atlas full while loading glyphs" );
    117117                }
    118118                r.size.x -= 1;
     
    120120                m_atlas->set_region( r, ft_bitmap.buffer, ft_bitmap.pitch );
    121121
    122                 m_gylphs[ c ] = texture_gylph();
    123                 texture_gylph* g = &(m_gylphs.find( c )->second);
     122                m_glyphs[ c ] = texture_glyph();
     123                texture_glyph* g = &(m_glyphs.find( c )->second);
    124124
    125125                g->charcode = c;
Note: See TracChangeset for help on using the changeset viewer.