dmuratshin 8 years ago
parent
commit
bcbc34d5a9
2 changed files with 3 additions and 17 deletions
  1. 2 17
      oxygine/src/Font.cpp
  2. 1 0
      oxygine/src/Font.h

+ 2 - 17
oxygine/src/Font.cpp

@@ -3,22 +3,7 @@
 
 namespace oxygine
 {
-    /*
-    int key2hash(int g)
-    {
-        int k = g;
-        if ((g & 0xC0) == 0xC0)
-        {
-            k = k >> 8;
-        }
-        k = k & 0x3f;
-        //log::messageln("key: %d  hash: %d", g, k);
-        return k;
-        //return g;
-    }
-    */
-
-    Font::Font() : _size(0), _baselineDistance(0), _scale(1.0f), _sdf(false)
+    Font::Font() : _size(0), _baselineDistance(0), _scale(1.0f), _sdf(false), _ignoreOptions(true)
     {
     }
 
@@ -53,7 +38,7 @@ namespace oxygine
     {
         glyph g;
         g.ch = code;
-        g.opt = opt;
+        g.opt = _ignoreOptions ? 0 : opt;
         glyphs::const_iterator it = _glyphs.find(g);
         if (it != _glyphs.end())
         {

+ 1 - 0
oxygine/src/Font.h

@@ -74,6 +74,7 @@ namespace oxygine
         typedef std::unordered_set<glyph, GlyphHasher> glyphs;
 #endif
         glyphs _glyphs;
+        bool _ignoreOptions;
 
         float _scale;
         bool _sdf;