BsFontImportOptions.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #include "Text/BsFontImportOptions.h"
  4. #include "RTTI/BsFontImportOptionsRTTI.h"
  5. namespace bs
  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. SPtr<FontImportOptions> FontImportOptions::create()
  22. {
  23. return bs_shared_ptr_new<FontImportOptions>();
  24. }
  25. /************************************************************************/
  26. /* SERIALIZATION */
  27. /************************************************************************/
  28. RTTITypeBase* FontImportOptions::getRTTIStatic()
  29. {
  30. return FontImportOptionsRTTI::instance();
  31. }
  32. RTTITypeBase* FontImportOptions::getRTTI() const
  33. {
  34. return FontImportOptions::getRTTIStatic();
  35. }
  36. }