BsFontImporter.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsFontPrerequisites.h"
  5. #include "BsSpecificImporter.h"
  6. #include "BsImporter.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup Font
  10. * @{
  11. */
  12. /** Importer implementation that handles font import by using the FreeType library. */
  13. class BS_FONT_EXPORT FontImporter : public SpecificImporter
  14. {
  15. public:
  16. FontImporter();
  17. virtual ~FontImporter();
  18. /** @copydoc SpecificImporter::isExtensionSupported */
  19. virtual bool isExtensionSupported(const WString& ext) const override;
  20. /** @copydoc SpecificImporter::isMagicNumberSupported */
  21. virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const override;
  22. /** @copydoc SpecificImporter::import */
  23. virtual SPtr<Resource> import(const Path& filePath, SPtr<const ImportOptions> importOptions) override;
  24. /** @copydoc SpecificImporter::createImportOptions */
  25. virtual SPtr<ImportOptions> createImportOptions() const override;
  26. private:
  27. Vector<WString> mExtensions;
  28. const static int MAXIMUM_TEXTURE_SIZE = 2048;
  29. };
  30. /** @} */
  31. }