Catch up, several fixes and QoL.

This commit is contained in:
Max
2022-12-16 14:22:34 -06:00
parent 619b89d2a9
commit 1a86e670ca
18 changed files with 1137 additions and 1007 deletions

View File

@ -24,7 +24,10 @@ namespace RobloxFiles.Tokens
var styleNode = node["Style"];
Enum.TryParse(styleNode.InnerText, out FontStyle style);
prop.Value = new FontFace(family, weight, style);
var cachedFaceNode = node["CachedFaceId"];
var cachedFaceId = cachedFaceNode?.InnerText;
prop.Value = new FontFace(family, weight, style, cachedFaceId);
return true;
}
catch
@ -77,13 +80,14 @@ namespace RobloxFiles.Tokens
var style = (byte)value.Style;
var family = value.Family;
var writer = attribute.Writer;
var cachedFaceId = value.CachedFaceId;
var writer = attribute.Writer;
writer.Write(weight);
writer.Write(style);
attribute.WriteString(family);
attribute.WriteInt(0); // Reserved
attribute.WriteString(cachedFaceId);
}
}
}