First phase moving from STBTT to FreeType

This commit is contained in:
2023-05-22 11:25:59 -07:00
parent 6069c71384
commit fd6d6ab677
22 changed files with 332 additions and 21 deletions

View File

@ -6,6 +6,7 @@
# Sources
target_sources(${DAWN_TARGET_NAME}
PRIVATE
FontManager.cpp
BitmapFont.cpp
ExampleFont.cpp
TrueTypeFont.cpp

View 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();
}
}

View 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();
};
}