BsFontManager.cpp 746 B

123456789101112131415161718192021222324
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #include "Text/BsFontManager.h"
  4. #include "Text/BsFont.h"
  5. namespace bs
  6. {
  7. SPtr<Font> FontManager::create(const Vector<SPtr<FontBitmap>>& fontData) const
  8. {
  9. SPtr<Font> newFont = bs_core_ptr<Font>(new (bs_alloc<Font>()) Font());
  10. newFont->_setThisPtr(newFont);
  11. newFont->initialize(fontData);
  12. return newFont;
  13. }
  14. SPtr<Font> FontManager::_createEmpty() const
  15. {
  16. SPtr<Font> newFont = bs_core_ptr<Font>(new (bs_alloc<Font>()) Font());
  17. newFont->_setThisPtr(newFont);
  18. return newFont;
  19. }
  20. }