Fixed Font Asset System

This commit is contained in:
OusmBlueNinja 2025-05-08 23:34:13 -05:00
parent 89beda4591
commit 834fa54e6e
2 changed files with 832 additions and 425 deletions

File diff suppressed because it is too large Load Diff

View File

@ -703,23 +703,13 @@ FontAssetInfo::FontAssetInfo()
void FontAssetInfo::Save(YAML::Emitter& out) const
{
out << YAML::BeginMap;
out << YAML::Key << "Path" << YAML::Value << path;
out << YAML::Key << "Filename" << YAML::Value << filename;
out << YAML::Key << "Filetype" << YAML::Value << filetype;
out << YAML::Key << "LastModified" << YAML::Value << lastModified;
out << YAML::Key << "AtlasTextureID" << YAML::Value << atlasTextureID;
out << YAML::Key << "AtlasSize" << YAML::Flow << YAML::Value
<< YAML::BeginSeq << atlasWidth << atlasHeight << YAML::EndSeq;
out << YAML::EndMap;
}
void FontAssetInfo::Load(const YAML::Node& node)
{
if (node["Path"]) path = node["Path"].as<std::string>();
if (node["Filename"]) filename = node["Filename"].as<std::string>();
if (node["Filetype"]) filetype = node["Filetype"].as<std::string>();
if (node["LastModified"]) lastModified = node["LastModified"].as<std::time_t>();
if (node["AtlasTextureID"]) atlasTextureID = node["AtlasTextureID"].as<GLuint>();
if (node["AtlasSize"]) {
auto seq = node["AtlasSize"];