Update Font.cs
This commit is contained in:
parent
4a360e4033
commit
2ddae74456
@ -44,17 +44,20 @@ namespace RobloxFiles.Tokens
|
|||||||
string family = font.Family;
|
string family = font.Family;
|
||||||
string familyType = "null";
|
string familyType = "null";
|
||||||
|
|
||||||
|
string cached = font.CachedFaceId;
|
||||||
string cachedType = "null";
|
string cachedType = "null";
|
||||||
string cachedId = font.CachedFaceId;
|
|
||||||
|
|
||||||
if (family.Length > 0)
|
if (family.Length > 0)
|
||||||
familyType = "url";
|
familyType = "url";
|
||||||
|
|
||||||
if (cachedId.Length > 0)
|
if (cached.Length > 0)
|
||||||
cachedType = "url";
|
cachedType = "url";
|
||||||
|
|
||||||
var familyNode = doc.CreateElement("Family");
|
var familyNode = doc.CreateElement("Family");
|
||||||
familyNode.InnerText = $"<{familyType}>{family}</{familyType}>";
|
var familyTypeNode = doc.CreateElement(familyType);
|
||||||
|
|
||||||
|
familyTypeNode.InnerText = family;
|
||||||
|
familyNode.AppendChild(familyTypeNode);
|
||||||
node.AppendChild(familyNode);
|
node.AppendChild(familyNode);
|
||||||
|
|
||||||
var weightNode = doc.CreateElement("Weight");
|
var weightNode = doc.CreateElement("Weight");
|
||||||
@ -65,9 +68,12 @@ namespace RobloxFiles.Tokens
|
|||||||
styleNode.InnerText = $"{font.Style}";
|
styleNode.InnerText = $"{font.Style}";
|
||||||
node.AppendChild(styleNode);
|
node.AppendChild(styleNode);
|
||||||
|
|
||||||
var cacheNode = doc.CreateElement("CachedFaceId");
|
var cachedNode = doc.CreateElement("CachedFaceId");
|
||||||
cacheNode.InnerText = $"<{cachedType}>{cachedId}</{cachedType}>";
|
var cachedTypeNode = doc.CreateElement(cachedType);
|
||||||
node.AppendChild(cacheNode);
|
|
||||||
|
cachedTypeNode.InnerText = cached;
|
||||||
|
cachedNode.AppendChild(cachedTypeNode);
|
||||||
|
node.AppendChild(cachedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FontFace ReadAttribute(RbxAttribute attribute)
|
public FontFace ReadAttribute(RbxAttribute attribute)
|
||||||
|
Loading…
Reference in New Issue
Block a user