Esempio n. 1
0
        public IFontFamily[] InitializeFontFamilies()
        {
            var familyNames = UIFont.FamilyNames;

            var families = new List <IFontFamily>();

            foreach (var familyName in familyNames)
            {
                var family = new NativeFontFamily(familyName);
                if (family.GetFontStyles().Length > 0)
                {
                    families.Add(family);
                }
            }

            families.Sort();
            return(families.ToArray());
        }
Esempio n. 2
0
        public IFontFamily[] InitializeFontFamilies()
        {
            var familyNames = NSFontManager.SharedFontManager.AvailableFontFamilies;

            var families = new List <IFontFamily>();

            for (int i = 0; i < familyNames.Length; i++)
            {
                var familyName = familyNames[i];
                var family     = new NativeFontFamily(familyName);
                if (family.GetFontStyles().Length > 0)
                {
                    families.Add(family);
                }
            }

            families.Sort();
            return(families.ToArray());
        }