implement multiline text rendering
This commit is contained in:
@@ -55,7 +55,8 @@ namespace OpenVulkano::Scene
|
||||
return;
|
||||
}
|
||||
std::fstream fs(outputFile.c_str(), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc);
|
||||
for (const auto& [key, val] : m_symbols)
|
||||
fs.write(reinterpret_cast<const char*>(&m_meta), sizeof(AtlasMetadata));
|
||||
for (const auto& [key, val] : m_symbols)
|
||||
{
|
||||
fs.write(reinterpret_cast<const char*>(&key), sizeof(uint32_t));
|
||||
fs.write(reinterpret_cast<const char*>(&val), sizeof(GlyphInfo));
|
||||
@@ -92,7 +93,9 @@ namespace OpenVulkano::Scene
|
||||
m_atlasTex.textureBuffer = (msdfgen::byte*) storage.pixels;
|
||||
m_atlasTex.format = OpenVulkano::DataFormat::R8_UNORM;
|
||||
m_atlasTex.size = storage.width * storage.height * 1; // 1 channel
|
||||
|
||||
|
||||
m_meta.lineHeight = fontGeometry.getMetrics().lineHeight;
|
||||
|
||||
struct Bbox
|
||||
{
|
||||
double l = 0, r = 0, t = 0, b = 0;
|
||||
|
||||
Reference in New Issue
Block a user