BsFontImportOptions.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #include "BsFontImportOptions.h"
  4. #include "BsFontImportOptionsRTTI.h"
  5. namespace BansheeEngine
  6. {
  7. FontImportOptions::FontImportOptions()
  8. :mDPI(96), mRenderMode(FontRenderMode::HintedSmooth), mBold(false), mItalic(false)
  9. {
  10. mFontSizes.push_back(10);
  11. mCharIndexRanges.push_back(std::make_pair(33, 166)); // Most used ASCII characters
  12. }
  13. void FontImportOptions::addCharIndexRange(UINT32 from, UINT32 to)
  14. {
  15. mCharIndexRanges.push_back(std::make_pair(from, to));
  16. }
  17. void FontImportOptions::clearCharIndexRanges()
  18. {
  19. mCharIndexRanges.clear();
  20. }
  21. /************************************************************************/
  22. /* SERIALIZATION */
  23. /************************************************************************/
  24. RTTITypeBase* FontImportOptions::getRTTIStatic()
  25. {
  26. return FontImportOptionsRTTI::instance();
  27. }
  28. RTTITypeBase* FontImportOptions::getRTTI() const
  29. {
  30. return FontImportOptions::getRTTIStatic();
  31. }
  32. }