Beispiel #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (obj.GetType() != typeof(NativeFontFamily))
            {
                return(false);
            }
            NativeFontFamily other = (NativeFontFamily)obj;

            return(_name == other._name);
        }
        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());
        }
        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());
        }