public FontImplementation() { FontRegistry.Clear(); Xamarin.Forms.Mocks.MockForms.Init(); FontRegistry.RegisterFonts( DevIcons.Font, FontAwesomeBrands.Font, FontAwesomeRegular.Font, FontAwesomeSolid.Font, MaterialIcons.Font, MaterialIconsOutlined.Font, MaterialIconsRound.Font, MaterialIconsSharp.Font); }
public void LookupFromRegistry(string selector, string expectedGlyph, string fontAlias) { lock (lockobject) { FontRegistry.Clear(); FontRegistry.RegisterFonts(SampleFontAwesomeRegular.Font, SampleFontAwesomeSolid.Font); var font = FontRegistry.LocateFont(selector); Assert.NotNull(font); Assert.Equal(fontAlias, font.Alias); var locatedGlyph = font.GetGlyph(selector); Assert.False(string.IsNullOrWhiteSpace(locatedGlyph)); Assert.Equal(expectedGlyph, locatedGlyph); } }
public FontRegistrySetup() { FontRegistry.Clear(); Xamarin.Forms.Mocks.MockForms.Init(); FontRegistry.RegisterFonts(MockFont.Font); }
public void Dispose() { FontRegistry.Clear(); }
public CsharpMarkupTests() { Xamarin.Forms.Mocks.MockForms.Init(); FontRegistry.Clear(); FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font); }
private void RegisterTestIcons() { FontRegistry.Clear(); FontRegistry.RegisterFonts(new EmbeddedMappedFont("TestFontFamily", "test", typeof(MockFontAMapping))); }
public CsharpMarkupTests(ITestOutputHelper testOutputHelper, FontRegistrySetup setup) : base(testOutputHelper, setup) { FontRegistry.Clear(); FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font); }