char is to short for unicode chars. Replace it with unsigned int. Should fix #746.

This commit is contained in:
Hermann Kraus 2011-04-27 20:28:53 +00:00
parent dffe53036e
commit 6650f999b9
2 changed files with 2 additions and 2 deletions

View file

@ -190,7 +190,7 @@ public:
}
private:
std::vector<face_ptr> faces_;
std::map<char, dimension_t> dimension_cache_;
std::map<unsigned, dimension_t> dimension_cache_;
};
// FT_Stroker wrapper

View file

@ -202,7 +202,7 @@ font_face_set::dimension_t font_face_set::character_dimensions(const unsigned c)
//std::clog << "glyph: " << glyph_index << " x: " << tempx << " y: " << tempy << std::endl;
dimension_t dim(tempx, glyph_bbox.yMax, glyph_bbox.yMin);
//dimension_cache_[c] = dim; would need an default constructor for dimension_t
dimension_cache_.insert(std::pair<char, dimension_t>(c, dim));
dimension_cache_.insert(std::pair<unsigned, dimension_t>(c, dim));
return dim;
}