BsFontImporter.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include "BsFontPrerequisites.h"
  3. #include "BsSpecificImporter.h"
  4. #include "BsImporter.h"
  5. namespace BansheeEngine
  6. {
  7. /**
  8. * @brief Importer implementation that handles font import
  9. * by using the FreeType library.
  10. */
  11. class BS_FONT_EXPORT FontImporter : public SpecificImporter
  12. {
  13. public:
  14. FontImporter();
  15. virtual ~FontImporter();
  16. /**
  17. * @copydoc SpecificImporter::isExtensionSupported
  18. */
  19. virtual bool isExtensionSupported(const WString& ext) const override;
  20. /**
  21. * @copydoc SpecificImporter::isMagicNumberSupported
  22. */
  23. virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const override;
  24. /**
  25. * @copydoc SpecificImporter::import
  26. */
  27. virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions) override;
  28. /**
  29. * @copydoc SpecificImporter::createImportOptions
  30. */
  31. virtual ImportOptionsPtr createImportOptions() const override;
  32. private:
  33. Vector<WString> mExtensions;
  34. const static int MAXIMUM_TEXTURE_SIZE = 2048;
  35. };
  36. }