Skip to content

Commit

Permalink
Merge pull request #33 from MartinTopfstedt/develop
Browse files Browse the repository at this point in the history
fixed issue #31
  • Loading branch information
Codinion authored May 9, 2021
2 parents 7a3661d + 410e0ee commit 133f665
Show file tree
Hide file tree
Showing 8 changed files with 346 additions and 43 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 2.1.2
- Fixed issue #31
# 2.1.1
- Updated FontAwesome v5.15.3
- Updated UWP Min Target to: 10.0.10240.0
Expand Down
Binary file modified bin/FontAwesome5.Generator/FontAwesome5.Generator.exe
Binary file not shown.
Binary file modified bin/FontAwesome5.Generator/Newtonsoft.Json.dll
Binary file not shown.
330 changes: 295 additions & 35 deletions bin/FontAwesome5.Generator/Newtonsoft.Json.xml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/FontAwesome5/Extensions/EFontAwesomeIconExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ public static class EFontAwesomeIconExtensions
/// </summary>
public static FontAwesomeInformation GetInformation(this EFontAwesomeIcon icon)
{
return FontAwesome.Information.TryGetValue(icon, out var info) ? info : null;
return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info : null;
}

/// <summary>
/// Get the Font Awesome label of an icon
/// </summary>
public static string GetLabel(this EFontAwesomeIcon icon)
{
return FontAwesome.Information.TryGetValue(icon, out var info) ? info.Label : null;
return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info.Label : null;
}

/// <summary>
/// Get the Font Awesome Style of an icon
/// </summary>
public static EFontAwesomeStyle GetStyle(this EFontAwesomeIcon icon)
{
return FontAwesome.Information.TryGetValue(icon, out var info) ? info.Style : EFontAwesomeStyle.None;
return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info.Style : EFontAwesomeStyle.None;
}

/// <summary>
Expand All @@ -41,7 +41,7 @@ public static bool GetSvg(this EFontAwesomeIcon icon, out string path, out int w
path = string.Empty;
width = -1;
height = -1;
if (FontAwesome.Information.TryGetValue(icon, out var info) && info.Svg != null)
if (FontAwesomeInternal.Information.TryGetValue(icon, out var info) && info.Svg != null)
{
path = info.Svg.Path;
width = info.Svg.Width;
Expand All @@ -57,7 +57,7 @@ public static bool GetSvg(this EFontAwesomeIcon icon, out string path, out int w
/// </summary>
public static string GetUnicode(this EFontAwesomeIcon icon)
{
return FontAwesome.Information.TryGetValue(icon, out var info) ? info.Unicode : char.ConvertFromUtf32(0);
return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info.Unicode : char.ConvertFromUtf32(0);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using System.Collections.Generic;
namespace FontAwesome5
{
internal static class FontAwesome
internal static class FontAwesomeInternal
{
public static Dictionary<EFontAwesomeIcon, FontAwesomeInformation> Information = new Dictionary<EFontAwesomeIcon, FontAwesomeInformation>() {
{EFontAwesomeIcon.Solid_Ad, new FontAwesomeInformation("Ad", EFontAwesomeStyle.Solid, "", new FontAwesomeSvgInformation("M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z", 512, 512))},
Expand Down
41 changes: 41 additions & 0 deletions src/Tools/FontAwesome5.Generator/FontAwesome5.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>D:\codinion\repos\FontAwesome5\bin\FontAwesome5.Generator\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>false</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -32,6 +48,18 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>F3A5AD03D7728016CCFF89A40AB816D8C5E6C3E1</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>FontAwesome5.Generator_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand All @@ -52,7 +80,20 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="FontAwesome5.Generator_TemporaryKey.pfx" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
4 changes: 2 additions & 2 deletions src/Tools/FontAwesome5.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void Generate(string inputDirectory)
WriteLine("{");
PushIndent("\t");

WriteLine("internal static class FontAwesome");
WriteLine("internal static class FontAwesomeInternal");
WriteLine("{");
PushIndent("\t");
WriteLine("public static Dictionary<EFontAwesomeIcon, FontAwesomeInformation> Information = new Dictionary<EFontAwesomeIcon, FontAwesomeInformation>() {");
Expand Down Expand Up @@ -178,7 +178,7 @@ static void Generate(string inputDirectory)
PopIndent();
WriteLine("}");

outputFile = Path.Combine(inputDirectory, @"src\FontAwesome5\FontAwesome.cs");
outputFile = Path.Combine(inputDirectory, @"src\FontAwesome5\FontAwesomeInternal.cs");
File.WriteAllText(outputFile, _content.ToString());
}

Expand Down

0 comments on commit 133f665

Please sign in to comment.