dmuratshin 9 년 전
부모
커밋
e3fbffec60
4개의 변경된 파일2개의 추가작업 그리고 34개의 파일을 삭제
  1. 0 17
      oxygine/src/res/ResFont.cpp
  2. 0 1
      oxygine/src/res/ResFont.h
  3. 2 15
      oxygine/src/res/ResFontBM.cpp
  4. 0 1
      oxygine/src/res/ResFontBM.h

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

@@ -1,26 +1,9 @@
 #include "ResFont.h"
 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
     {
         resScale = 1.0f;
         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; }
         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;
     protected:
         int _size;

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

@@ -72,25 +72,12 @@ namespace oxygine
         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)
-            resScale = _font->getSize() / float(styleFontSize);
+            resScale = _size / float(styleFontSize);
         else
-        {
-            resFontSize = _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;
     }

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

@@ -26,7 +26,6 @@ namespace oxygine
 
         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;
 
     private: