BsFontManager.cpp 758 B

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