Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Weather Icons

Elvin (Tharindu) Thudugala edited this page Aug 4, 2019 · 4 revisions

Plugin.Glypher.WeatherIcons

.NET Standard Projest

  • Reference Plugin.Glypher.WeatherIcons NuGet
public partial class App : Application
{
    public App()
    {
        InitializeComponent();
        
        GlyphRegister.Current.Init(typeof(Plugin.Glypher.WeatherIcons.GlyphList));

        MainPage = new NavigationPage(new MainPage());
    }
}

Android Project

  • Add fonts to Assets folder,
  • Font name must be "weathericons-regular-webfont.ttf"
  • You can change font name
public partial class App : Application
{
    public App()
    {
        InitializeComponent();

        var glyphFont = Plugin.Glypher.WeatherIcons.GlyphFont.Current;
        switch (Device.RuntimePlatform)
        {
            case Device.Android:
                WI = "font name.ttf#Weather Icons Regular";
                break;
        };
        GlyphRegister.Current.Init(typeof(Plugin.Glypher.WeatherIcons.GlyphList));

        MainPage = new NavigationPage(new MainPage());
    }
}

iOS Project

  • Add fonts to Resources folder,
  • Font name must be "weathericons-regular-webfont.ttf"
  • Modify Info.plist by add below code.
<key>UIAppFonts</key>
<array>
  <string>weathericons-regular-webfont.ttf</string>
</array>
  • You can change font name
<key>UIAppFonts</key>
<array>
  <string>font name.ttf</string>
</arra>

font map

Clone this wiki locally