iOS UIFont 初识

    UIFont *font = [UIFont systemFontOfSize:32];

    CGFloat pointSize = font.pointSize; 
    CGFloat capHeight = font.capHeight; 
    CGFloat xHeight = font.xHeight;
    CGFloat lineHeight = font.lineHeight;
    CGFloat leading = font.leading;
    CGFloat ascender = font.ascender;
    
    NSLog(@"pointSize = %@", @(pointSize)); <span style="white-space:pre">	</span>//32
    NSLog(@"ascender = %@", @(ascender)); 	//30.464
    NSLog(@"capHeight = %@", @(capHeight));	//22.848
    NSLog(@"xHeight = %@", @(xHeight));		//16.544
    NSLog(@"lineHeight = %@", @(lineHeight));<span style="white-space:pre">	</span>//38.176
    NSLog(@"leading = %@", @(leading));		//38.176

你可能感兴趣的:(ios)