drop unwise glyph_info caching - reverts 99a46f6910
- re-opens #2334
This commit is contained in:
parent
d4f0d51a91
commit
eabdf46118
2 changed files with 1 additions and 13 deletions
|
@ -47,7 +47,6 @@ namespace mapnik
|
|||
class font_face : mapnik::noncopyable
|
||||
{
|
||||
public:
|
||||
using glyph_info_cache_type = std::unordered_map<glyph_index_t, glyph_info>;
|
||||
font_face(FT_Face face);
|
||||
|
||||
std::string family_name() const
|
||||
|
@ -74,7 +73,6 @@ public:
|
|||
|
||||
private:
|
||||
FT_Face face_;
|
||||
mutable glyph_info_cache_type glyph_info_cache_;
|
||||
};
|
||||
using face_ptr = std::shared_ptr<font_face>;
|
||||
|
||||
|
|
|
@ -32,8 +32,7 @@ namespace mapnik
|
|||
{
|
||||
|
||||
font_face::font_face(FT_Face face)
|
||||
: face_(face),
|
||||
glyph_info_cache_() {}
|
||||
: face_(face) {}
|
||||
|
||||
bool font_face::set_character_sizes(double size)
|
||||
{
|
||||
|
@ -47,14 +46,6 @@ bool font_face::set_unscaled_character_sizes()
|
|||
|
||||
bool font_face::glyph_dimensions(glyph_info & glyph) const
|
||||
{
|
||||
// Check if glyph is already in cache
|
||||
glyph_info_cache_type::const_iterator itr;
|
||||
itr = glyph_info_cache_.find(glyph.glyph_index);
|
||||
if (itr != glyph_info_cache_.end()) {
|
||||
glyph = itr->second;
|
||||
return true;
|
||||
}
|
||||
|
||||
FT_Vector pen;
|
||||
pen.x = 0;
|
||||
pen.y = 0;
|
||||
|
@ -78,7 +69,6 @@ bool font_face::glyph_dimensions(glyph_info & glyph) const
|
|||
glyph.unscaled_ymax = glyph_bbox.yMax;
|
||||
glyph.unscaled_advance = face_->glyph->advance.x;
|
||||
glyph.unscaled_line_height = face_->size->metrics.height;
|
||||
glyph_info_cache_.emplace(glyph.glyph_index, glyph);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue