예제 #1
0
 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();
 }
예제 #5
0
 public CsharpMarkupTests()
 {
     Xamarin.Forms.Mocks.MockForms.Init();
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font);
 }
예제 #6
0
 private void RegisterTestIcons()
 {
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(new EmbeddedMappedFont("TestFontFamily", "test", typeof(MockFontAMapping)));
 }
예제 #7
0
 public CsharpMarkupTests(ITestOutputHelper testOutputHelper, FontRegistrySetup setup)
     : base(testOutputHelper, setup)
 {
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font);
 }