Instance Property


The string encoding that works best with the font.


@property(readonly) NSStringEncoding mostCompatibleStringEncoding;


The string encoding in this property is the encoding with the fewest unmatched characters and glyphs in the font. If this value is NSASCIIStringEncoding, the font could not determine the correct encoding; you should assume the font can render only ASCII characters. The font uses heuristically well-known font encodings to determine the value of this property, so for nonstandard encodings the property may not contain the optimal string encoding.

You can use the dataUsingEncoding: or dataUsingEncoding:allowLossyConversion: methods of NSString to convert strings to this encoding.

See Also

Getting Font Metrics and Information


The point size of the font.


The character set containing all of the nominal characters that the font can render.


The font descriptor object for the font.


A Boolean value indicating whether all glyphs in the font have the same advancement.

Advanced Font Metrics

Retrieve details about ascender and descender heights, glyph bounding rectangles, glyph advancements, and more.