Show
Ignore:
Timestamp:
07/25/08 19:26:02 (6 months ago)
Author:
tom
Message:

Make the cairo renderer build again, with font fallback support now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/include/mapnik/font_engine_freetype.hpp

    r713 r715  
    6060namespace mapnik 
    6161{ 
     62    class font_face; 
     63        
     64    typedef boost::shared_ptr<font_face> face_ptr; 
     65 
    6266    class MAPNIK_DECL font_glyph : private boost::noncopyable 
    6367    { 
    6468    public: 
    65         font_glyph(FT_Face face, unsigned index) 
    66             : face_(face), index_(index) {} 
    67  
    68         FT_Face get_face() const 
     69        font_glyph(face_ptr face, unsigned index) 
     70           : face_(face), index_(index) {} 
     71 
     72        face_ptr get_face() const 
    6973        { 
    7074            return face_; 
     
    7680        } 
    7781    private: 
    78         FT_Face face_; 
     82        face_ptr face_; 
    7983        unsigned index_; 
    8084    }; 
     
    8690    public: 
    8791        font_face(FT_Face face) 
    88             : face_(face) {} 
     92           : face_(face) {} 
    8993         
    9094        std::string  family_name() const 
     
    133137        FT_Face face_; 
    134138    }; 
    135      
    136     typedef boost::shared_ptr<font_face> face_ptr; 
    137139 
    138140    class MAPNIK_DECL font_face_set : private boost::noncopyable 
     
    158160            for (std::vector<face_ptr>::const_iterator face = faces_.begin(); face != faces_.end(); ++face) 
    159161            { 
    160                FT_Face f = (*face)->get_face(); 
    161162               FT_UInt g = (*face)->get_char(c); 
    162163 
    163                if (g) return glyph_ptr(new font_glyph(f, g)); 
     164               if (g) return glyph_ptr(new font_glyph(*face, g)); 
    164165            } 
    165166 
     
    180181 
    181182            glyph_ptr glyph = get_glyph(c); 
    182             FT_Face face = glyph->get_face(); 
     183            FT_Face face = glyph->get_face()->get_face(); 
    183184 
    184185            matrix.xx = (FT_Fixed)( 1 * 0x10000L );  
     
    442443                 
    443444                glyph_ptr glyph = faces_->get_glyph(unsigned(c)); 
    444                 FT_Face face = glyph->get_face(); 
     445                FT_Face face = glyph->get_face()->get_face(); 
    445446 
    446447                matrix.xx = (FT_Fixed)( cos( angle ) * 0x10000L );