public static string GetIconFontFamily(FontAwesomeType type = FontAwesomeType.solid)
        {
            var name = "";

            switch (type)
            {
            default:
                IsAndroid(
                    () => name = "fa-solid-900.ttf#Font Awesome 5 Free",
                    () => name = "Font Awesome 5 Free");
                break;

            case FontAwesomeType.solid:
                IsAndroid(
                    () => name = "fa-solid-900.ttf#Font Awesome 5 Free",
                    () => name = "Font Awesome 5 Free");
                break;

            case FontAwesomeType.brand:
                IsAndroid(
                    () => name = "fa-brands-400.ttf#Font Awesome 5 Brands",
                    () => name = "Font Awesome 5 Brands");
                break;
            }

            return(name);
        }
Ejemplo n.º 2
0
        public static string FontFamily(FontAwesomeType Type)
        {
            if (Device.RuntimePlatform == Device.Android)
            {
                switch (Type)
                {
                case FontAwesomeType.Regular:
                    return("fa-regular-400.ttf#Font Awesome 5 Free Regular");

                case FontAwesomeType.Solid:
                    return("fa-solid-900.ttf#Font Awesome 5 Free Solid");

                case FontAwesomeType.Brands:
                    return("fa-brands-400.ttf#Font Awesome 5 Free Regular");

                default:
                    break;
                }
            }
            else if (Device.RuntimePlatform == Device.iOS)
            {
                return("Font Awesome 5 Free");
            }
            return("");
        }