More font rendering cleanup
This commit is contained in:
@@ -11,11 +11,6 @@
|
||||
|
||||
namespace OpenVulkano::Scene
|
||||
{
|
||||
void BitmapFontAtlasGenerator::GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset)
|
||||
{
|
||||
GenerateAtlas(Utils::ReadFile(fontFile), charset);
|
||||
}
|
||||
|
||||
void BitmapFontAtlasGenerator::GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset)
|
||||
{
|
||||
Generate(fontData.AsBytes(), charset);
|
||||
@@ -88,7 +83,7 @@ namespace OpenVulkano::Scene
|
||||
// 2) render glyph in FillGlyphsInfo with FT_LOAD_RENDER | FT_LOAD_TARGET_LCD mode;
|
||||
// 3) take into account all mentioned things above for proper mapping.
|
||||
FT_GlyphSlot slot = face->glyph;
|
||||
GlyphForPacking& glyph = allGlyphs.emplace_back(codepoint, ScaleGlyphSize(slot->bitmap.width, slot->bitmap.rows));
|
||||
allGlyphs.emplace_back(codepoint, ScaleGlyphSize(slot->bitmap.width, slot->bitmap.rows));
|
||||
area += slot->bitmap.rows * slot->bitmap.width;
|
||||
}
|
||||
std::sort(allGlyphs.begin(), allGlyphs.end(),
|
||||
|
||||
Reference in New Issue
Block a user