BsFontManager.cpp 872 B

12345678910111213141516171819202122232425
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #include "BsFontManager.h"
  5. #include "BsFont.h"
  6. namespace BansheeEngine
  7. {
  8. FontPtr FontManager::create(const Vector<FontData>& fontData) const
  9. {
  10. FontPtr newFont = bs_core_ptr<Font, PoolAlloc>(new (bs_alloc<Font, PoolAlloc>()) Font());
  11. newFont->_setThisPtr(newFont);
  12. newFont->initialize(fontData);
  13. return newFont;
  14. }
  15. FontPtr FontManager::_createEmpty() const
  16. {
  17. FontPtr newFont = bs_core_ptr<Font, PoolAlloc>(new (bs_alloc<Font, PoolAlloc>()) Font());
  18. newFont->_setThisPtr(newFont);
  19. return newFont;
  20. }
  21. }