This repository has been archived by the owner on May 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Weather Icons
Elvin (Tharindu) Thudugala edited this page Aug 4, 2019
·
4 revisions
- Download Fonts from https://erikflowers.github.io/weather-icons/
- Install this package into your shared project. There is no need to install it in your platform specific projects.
public partial class App : Application
{
public App()
{
InitializeComponent();
GlyphRegister.Current.Init(typeof(Plugin.Glypher.WeatherIcons.GlyphList));
MainPage = new NavigationPage(new MainPage());
}
}
- 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());
}
}
- 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>