UIFont from UIFontDescriptor
UIFontDescriptor
UIFontDescriptor is font setting parameter box.
How to use
UIFontDescriptor *helveticaNeueFamily = [UIFontDescriptor fontDescriptorWithFontAttributes: @{UIFontDescriptorFamilyAttribute: @"Helvetica Neue"}]; helveticaNeueFamily = [helveticaNeueFamily fontDescriptorWithSize:15.0]; helveticaNeueFamily = [helveticaNeueFamilyfontDescriptorWithSymbolicTraits:UIFontDescriptorTraitBold]; UIFont *helveticaBoldFont = [UIFont fontWithDescriptor:helveticaNeueFamily size:0.0]; // Use in UILabel self.label = [[UILabel alloc] init]; self.label.font = helveticaBoldFont; [self.label setText:@"Test"];
If set size less than fontDescriptorWithSize. fontDescriptorWithSize will be set.
Ref
Font List 24/7 twenty-four seven Twitter