diff --git a/tools/GlyphFieldsGenerator/GlyphFieldsFontAwesome5Pro/Program.cs b/tools/GlyphFieldsGenerator/GlyphFieldsFontAwesome5Pro/Program.cs index 73d375e..aa5f3c4 100644 --- a/tools/GlyphFieldsGenerator/GlyphFieldsFontAwesome5Pro/Program.cs +++ b/tools/GlyphFieldsGenerator/GlyphFieldsFontAwesome5Pro/Program.cs @@ -32,13 +32,13 @@ private static void Main(string[] args) var originalLabel = iconDuotone.Label; iconDuotone.Label = $"{originalLabel}-primary"; - iconDuotoneSecondaryList.Add( - new Icon - { - IconType = iconDuotone.IconType, - Label = $"{originalLabel}-secondary", - Unicode = $"10{iconDuotone.Unicode}" - }); + iconDuotoneSecondaryList.Add(new Icon + { + IconType = iconDuotone.IconType, + Label = $"{originalLabel}-secondary", + UnicodeNumber = int.Parse($"0010{iconDuotone.Unicode}", + System.Globalization.NumberStyles.HexNumber), + }); } iconList.AddRange(iconDuotoneSecondaryList); diff --git a/tools/GlyphFieldsGenerator/GlyphFieldsGenerator/GlyphField.cs b/tools/GlyphFieldsGenerator/GlyphFieldsGenerator/GlyphField.cs index 56831b1..b6e853c 100644 --- a/tools/GlyphFieldsGenerator/GlyphFieldsGenerator/GlyphField.cs +++ b/tools/GlyphFieldsGenerator/GlyphFieldsGenerator/GlyphField.cs @@ -8,6 +8,8 @@ public abstract class GlyphField public virtual string Unicode { get; set; } + public int? UnicodeNumber { get; set; } + protected virtual string FontFamily { get; } protected virtual string Glyph => $"\"\\u{Unicode}\""; @@ -33,7 +35,9 @@ protected virtual string GlyphPropertyName public override string ToString() { - return $" public static readonly GlyphInfo {GlyphPropertyName} = new GlyphInfo {{ Name = {GlyphName}, Glyph = {Glyph}, FontFamily = {FontFamily} }};"; + return UnicodeNumber.HasValue + ? $" public static readonly GlyphInfo {GlyphPropertyName} = new GlyphInfo {{ Name = {GlyphName}, UnicodeNumber = {UnicodeNumber}, FontFamily = {FontFamily} }};" + : $" public static readonly GlyphInfo {GlyphPropertyName} = new GlyphInfo {{ Name = {GlyphName}, Glyph = {Glyph}, FontFamily = {FontFamily} }};"; } } } \ No newline at end of file