removed debug cout
This commit is contained in:
parent
4bb7219ccf
commit
475ecd149b
1 changed files with 0 additions and 3 deletions
|
|
@ -28,21 +28,18 @@ import std;
|
|||
using namespace Crafter;
|
||||
|
||||
Font::Font(const std::filesystem::path& fontFilePath) {
|
||||
std::cout << "Tes3t" << std::endl;
|
||||
// 1. Load the font file into memory
|
||||
std::ifstream fontFile("inter.ttf", std::ios::binary | std::ios::ate);
|
||||
if (!fontFile.is_open()) {
|
||||
std::cerr << "Failed to open font file\n";
|
||||
}
|
||||
|
||||
std::cout << "Test" << std::endl;
|
||||
std::streamsize size = fontFile.tellg();
|
||||
fontFile.seekg(0, std::ios::beg);
|
||||
fontBuffer.resize(size);
|
||||
if (!fontFile.read((char*)fontBuffer.data(), size)) {
|
||||
std::cerr << "Failed to read font file\n";
|
||||
}
|
||||
std::cout << size << std::endl;
|
||||
|
||||
// 2. Initialize the font
|
||||
if (!stbtt_InitFont(&font, fontBuffer.data(), stbtt_GetFontOffsetForIndex(fontBuffer.data(), 0))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue