dmuratshin 9 years ago
parent
commit
e3fbffec60

+ 0 - 17
oxygine/src/res/ResFont.cpp

@@ -1,26 +1,9 @@
 #include "ResFont.h"
 #include "ResFont.h"
 namespace oxygine
 namespace oxygine
 {
 {
-
-    void ResFont::alignSize(float worldScale, int styleFontSize, float& resScale, int& resFontSize) const
-    {
-        resFontSize = styleFontSize;
-        resScale = worldScale;
-
-        /*
-        if (fontSize)
-            resScale = _font->getSize() / float(fontSize);
-        else
-        {
-            resFontSize = _font->getScale();
-            resScale = _font->getScale();
-        }*/
-    }
-
     const oxygine::Font* ResFont::getClosestFont(float worldScale, int styleFontSize, float& resScale) const
     const oxygine::Font* ResFont::getClosestFont(float worldScale, int styleFontSize, float& resScale) const
     {
     {
         resScale = 1.0f;
         resScale = 1.0f;
         return getFont(0, styleFontSize);
         return getFont(0, styleFontSize);
     }
     }
-
 }
 }

+ 0 - 1
oxygine/src/res/ResFont.h

@@ -15,7 +15,6 @@ namespace oxygine
         virtual bool isSDF(int& size) const { size = 0; return false; }
         virtual bool isSDF(int& size) const { size = 0; return false; }
         int getSize() const { return _size; }
         int getSize() const { return _size; }
 
 
-        virtual void alignSize(float worldScale, int styleFontSize, float& resScale, int& resFontSize) const;
         virtual const Font* getClosestFont(float worldScale, int styleFontSize, float& resScale) const;
         virtual const Font* getClosestFont(float worldScale, int styleFontSize, float& resScale) const;
     protected:
     protected:
         int _size;
         int _size;

+ 2 - 15
oxygine/src/res/ResFontBM.cpp

@@ -72,25 +72,12 @@ namespace oxygine
         return _sdf;
         return _sdf;
     }
     }
 
 
-    void ResFontBM::alignSize(float worldScale, int styleFontSize, float& resScale, int& resFontSize) const
+    const oxygine::Font* ResFontBM::getClosestFont(float worldScale, int styleFontSize, float& resScale) const
     {
     {
-        resFontSize = styleFontSize;
-        resScale = worldScale;
-
         if (styleFontSize)
         if (styleFontSize)
-            resScale = _font->getSize() / float(styleFontSize);
+            resScale = _size / float(styleFontSize);
         else
         else
-        {
-            resFontSize = _font->getScale();
             resScale = _font->getScale();
             resScale = _font->getScale();
-        }
-    }
-
-    const oxygine::Font* ResFontBM::getClosestFont(float worldScale, int styleFontSize, float& resScale) const
-    {
-        if (!styleFontSize)
-            styleFontSize = _size;
-        resScale = _size / float(styleFontSize);
 
 
         return _font;
         return _font;
     }
     }

+ 0 - 1
oxygine/src/res/ResFontBM.h

@@ -26,7 +26,6 @@ namespace oxygine
 
 
         bool isSDF(int& size) const OVERRIDE;
         bool isSDF(int& size) const OVERRIDE;
 
 
-        void alignSize(float scale, int fontSize, float& resScale, int& resFontSize) const OVERRIDE;
         const Font* getClosestFont(float worldScale, int styleFontSize, float& resScale) const OVERRIDE;
         const Font* getClosestFont(float worldScale, int styleFontSize, float& resScale) const OVERRIDE;
 
 
     private:
     private: