Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 58 lines (39 sloc) 1.962 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
//
// DTCoreTextFontDescriptor.h
// CoreTextExtensions
//
// Created by Oliver Drobnik on 1/26/11.
// Copyright 2011 Drobnik.com. All rights reserved.
//

@interface DTCoreTextFontDescriptor : NSObject <NSCopying, NSCoding>

// sets the font face name to use for a specific font family
+ (void)setSmallCapsFontName:(NSString *)fontName forFontFamily:(NSString *)fontFamily bold:(BOOL)bold italic:(BOOL)italic;
+ (NSString *)smallCapsFontNameforFontFamily:(NSString *)fontFamily bold:(BOOL)bold italic:(BOOL)italic;

// overriding typefaces for families
+ (void)setOverrideFontName:(NSString *)fontName forFontFamily:(NSString *)fontFamily bold:(BOOL)bold italic:(BOOL)italic;
+ (NSString *)overrideFontNameforFontFamily:(NSString *)fontFamily bold:(BOOL)bold italic:(BOOL)italic;

+ (DTCoreTextFontDescriptor *)fontDescriptorWithFontAttributes:(NSDictionary *)attributes;
+ (DTCoreTextFontDescriptor *)fontDescriptorForCTFont:(CTFontRef)ctFont;

- (id)initWithFontAttributes:(NSDictionary *)attributes;
- (id)initWithCTFontDescriptor:(CTFontDescriptorRef)ctFontDescriptor;
- (id)initWithCTFont:(CTFontRef)ctFont;

- (void)setFontAttributes:(NSDictionary *)newAttributes;

- (CTFontSymbolicTraits)symbolicTraits;
- (NSDictionary *)fontAttributes;

- (CTFontRef)newMatchingFont;

- (BOOL)supportsNativeSmallCaps;

- (NSString *)cssStyleRepresentation;

@property (nonatomic, copy) NSString *fontFamily;
@property (nonatomic, copy) NSString *fontName;

@property (nonatomic) CGFloat pointSize;

@property (nonatomic) BOOL boldTrait;
@property (nonatomic) BOOL italicTrait;
@property (nonatomic) BOOL expandedTrait;
@property (nonatomic) BOOL condensedTrait;
@property (nonatomic) BOOL monospaceTrait;
@property (nonatomic) BOOL verticalTrait;
@property (nonatomic) BOOL UIoptimizedTrait;

@property (nonatomic) CTFontSymbolicTraits symbolicTraits;

@property (nonatomic) CTFontStylisticClass stylisticClass;

@property (nonatomic) BOOL smallCapsFeature;


@end
Something went wrong with that request. Please try again.