zoukankan      html  css  js  c++  java
  • 获取系统所有字体和当前字体

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    + (NSArray*)getAllSystemFonts;
    {
        NSMutableArray *array = [[[NSMutableArray alloc] init] autorelease];
        NSArray* familys = [UIFont familyNames];
     
        for (id obj in familys) {
            NSArray* fonts = [UIFont fontNamesForFamilyName:obj];
            for (id font in fonts)    
            {
                [array addObject:font];
            }
        }
        return array;
    }
     
    + (UIFont*)getCurrentFont
    {
        //判断系统字体的size,返回使用的字体。
        UIFont *font = [UIFont systemFontOfSize:[UIFont systemFontSize]];
        return font;
    }
  • 相关阅读:
    HDU 2717 Catch That Cow
    补题列表
    Codeforces 862C 异或!
    HDU 2084
    HDU 2037
    Codeforces 492B
    POJ 2262
    Codeforces 1037A
    HDU 1276
    itertools — Functions creating iterators for efficient looping
  • 原文地址:https://www.cnblogs.com/ranger-jlu/p/3877862.html
Copyright © 2011-2022 走看看