예제 #1
0
파일: font.hpp 프로젝트: greyhill/libghp
 /** \brief mutable glyph access.  If a glyph is requested does
   not exist, it is created, added to the bitmap_font, and returned.  */
 inline glyph_type& operator()(const K &k) {
     typename std::map<K, boost::shared_ptr<glyph_type> >::iterator
     it = glyphs_.find(k);
     if(it == glyphs_.end()) {
         boost::shared_ptr<glyph_type> new_glyph(new glyph_type());
         glyphs_[k] = new_glyph;
         return *new_glyph;
     } else {
         return *(it->second);
     }
 }
예제 #2
0
파일: glyph.cpp 프로젝트: dvhart/libstk
 glyph::ptr glyph::create(const FT_GlyphSlot g, unsigned int indx)
 {
     glyph::ptr new_glyph(new glyph(g, indx));
     return new_glyph;
 }