First phase moving from STBTT to FreeType
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
# Sources
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
FontManager.cpp
|
||||
BitmapFont.cpp
|
||||
ExampleFont.cpp
|
||||
TrueTypeFont.cpp
|
||||
|
15
src/dawn/display/font/FontManager.cpp
Normal file
15
src/dawn/display/font/FontManager.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "FontManager.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
void FontManager::init() {
|
||||
if(FT_Init_FreeType(&fontLibrary)) {
|
||||
std::cout << "ERROR::FREETYPE: Could not init FreeType Library" << std::endl;
|
||||
assertUnreachable();
|
||||
}
|
||||
}
|
19
src/dawn/display/font/FontManager.hpp
Normal file
19
src/dawn/display/font/FontManager.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "dawnlibs.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class FontManager {
|
||||
protected:
|
||||
|
||||
public:
|
||||
FT_Library fontLibrary;
|
||||
|
||||
void init();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user