コード例 #1
0
 public NativeFontStyle(NativeFontFamily family, string id, string name, string fullName, int weight, FontStyleType styleType)
 {
     _family   = family;
     Id        = id;
     Name      = name;
     FullName  = fullName;
     Weight    = weight;
     StyleType = styleType;
 }
コード例 #2
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);
        }
コード例 #3
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());
        }
コード例 #4
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());
        }