Show
Ignore:
Timestamp:
03/21/12 18:36:20 (3 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/freetype/FreeTypeFont.cpp

    r12827 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    231231            // not dangling pointers remain 
    232232            freeTypeLibrary->removeFontImplmentation(this); 
    233          
     233 
    234234            // free the freetype font face itself 
    235235            FT_Done_Face(_face); 
     
    272272    { 
    273273        OSG_WARN<<"Warning: FreeTypeFont::setSize("<<width<<","<<height<<") sizes too large,"<<std::endl; 
    274      
     274 
    275275        width = _facade->getTextureWidthHint()-2*margin; 
    276276        height = _facade->getTextureHeightHint()-2*margin; 
     
    303303 
    304304    // 
    305     // GT: fix for symbol fonts (i.e. the Webdings font) as the wrong character are being   
    306     // returned, for symbol fonts in windows (FT_ENCONDING_MS_SYMBOL in freetype) the correct  
    307     // values are from 0xF000 to 0xF0FF not from 0x000 to 0x00FF (0 to 255) as you would expect.   
     305    // GT: fix for symbol fonts (i.e. the Webdings font) as the wrong character are being 
     306    // returned, for symbol fonts in windows (FT_ENCONDING_MS_SYMBOL in freetype) the correct 
     307    // values are from 0xF000 to 0xF0FF not from 0x000 to 0x00FF (0 to 255) as you would expect. 
    308308    // Microsoft uses a private field for its symbol fonts 
    309309    // 
     
    332332    unsigned int sourceWidth = glyphslot->bitmap.width;; 
    333333    unsigned int sourceHeight = glyphslot->bitmap.rows; 
    334      
     334 
    335335    unsigned int width = sourceWidth; 
    336336    unsigned int height = sourceHeight; 
    337337 
    338338    osg::ref_ptr<osgText::Glyph> glyph = new osgText::Glyph(_facade, charcode); 
    339      
     339 
    340340    unsigned int dataSize = width*height; 
    341341    unsigned char* data = new unsigned char[dataSize]; 
    342      
     342 
    343343 
    344344    // clear the image to zeros. 
     
    354354    glyph->setInternalTextureFormat(GL_ALPHA); 
    355355 
    356     // copy image across to osgText::Glyph image.      
     356    // copy image across to osgText::Glyph image. 
    357357    switch(glyphslot->bitmap.pixel_mode) 
    358358    { 
     
    368368            break; 
    369369 
    370          
     370 
    371371        case FT_PIXEL_MODE_GRAY: 
    372372            for(int r=sourceHeight-1;r>=0;--r) 
     
    379379            } 
    380380            break; 
    381              
     381 
    382382        default: 
    383383            OSG_WARN << "FT_Load_Char(...) returned bitmap with unknown pixel_mode " << glyphslot->bitmap.pixel_mode << std::endl; 
     
    405405    OSG_NOTICE<<"   _face->units_per_EM = "<<_face->units_per_EM<<", scale="<<1.0f/float(_face->units_per_EM)<<std::endl; 
    406406#endif 
    407      
     407 
    408408//    cout << "      in getGlyph() implementation="<<this<<"  "<<_filename<<"  facade="<<_facade<<endl; 
    409409 
     
    525525    FT_UInt left = FT_Get_Char_Index( _face, leftcharcode ); 
    526526    FT_UInt right = FT_Get_Char_Index( _face, rightcharcode ); 
    527      
    528     // get the kerning distances.    
     527 
     528    // get the kerning distances. 
    529529    FT_Vector  kerning; 
    530530 
     
    573573    return true; 
    574574#endif 
    575 }  
     575} 
    576576 
    577577float FreeTypeFont::getCoordScale() const