1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #pragma once |
4 | |
5 | #include "BsFontPrerequisites.h" |
6 | #include "Importer/BsSpecificImporter.h" |
7 | #include "Importer/BsImporter.h" |
8 | |
9 | namespace bs |
10 | { |
11 | /** @addtogroup Font |
12 | * @{ |
13 | */ |
14 | |
15 | /** Importer implementation that handles font import by using the FreeType library. */ |
16 | class FontImporter : public SpecificImporter |
17 | { |
18 | public: |
19 | FontImporter(); |
20 | virtual ~FontImporter() = default; |
21 | |
22 | /** @copydoc SpecificImporter::isExtensionSupported */ |
23 | bool isExtensionSupported(const String& ext) const override; |
24 | |
25 | /** @copydoc SpecificImporter::isMagicNumberSupported */ |
26 | bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const override; |
27 | |
28 | /** @copydoc SpecificImporter::import */ |
29 | SPtr<Resource> import(const Path& filePath, SPtr<const ImportOptions> importOptions) override; |
30 | |
31 | /** @copydoc SpecificImporter::createImportOptions */ |
32 | SPtr<ImportOptions> createImportOptions() const override; |
33 | private: |
34 | Vector<String> mExtensions; |
35 | |
36 | const static int MAXIMUM_TEXTURE_SIZE = 2048; |
37 | }; |
38 | |
39 | /** @} */ |
40 | } |