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;
|
using namespace Crafter;
|
||||||
|
|
||||||
Font::Font(const std::filesystem::path& fontFilePath) {
|
Font::Font(const std::filesystem::path& fontFilePath) {
|
||||||
std::cout << "Tes3t" << std::endl;
|
|
||||||
// 1. Load the font file into memory
|
// 1. Load the font file into memory
|
||||||
std::ifstream fontFile("inter.ttf", std::ios::binary | std::ios::ate);
|
std::ifstream fontFile("inter.ttf", std::ios::binary | std::ios::ate);
|
||||||
if (!fontFile.is_open()) {
|
if (!fontFile.is_open()) {
|
||||||
std::cerr << "Failed to open font file\n";
|
std::cerr << "Failed to open font file\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Test" << std::endl;
|
|
||||||
std::streamsize size = fontFile.tellg();
|
std::streamsize size = fontFile.tellg();
|
||||||
fontFile.seekg(0, std::ios::beg);
|
fontFile.seekg(0, std::ios::beg);
|
||||||
fontBuffer.resize(size);
|
fontBuffer.resize(size);
|
||||||
if (!fontFile.read((char*)fontBuffer.data(), size)) {
|
if (!fontFile.read((char*)fontBuffer.data(), size)) {
|
||||||
std::cerr << "Failed to read font file\n";
|
std::cerr << "Failed to read font file\n";
|
||||||
}
|
}
|
||||||
std::cout << size << std::endl;
|
|
||||||
|
|
||||||
// 2. Initialize the font
|
// 2. Initialize the font
|
||||||
if (!stbtt_InitFont(&font, fontBuffer.data(), stbtt_GetFontOffsetForIndex(fontBuffer.data(), 0))) {
|
if (!stbtt_InitFont(&font, fontBuffer.data(), stbtt_GetFontOffsetForIndex(fontBuffer.data(), 0))) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue