/libs/FontLabel/FontLabel.h
C Header | 44 lines | 17 code | 3 blank | 24 comment | 0 complexity | 66d304a3435ceff4595b33ba4fcfcc1c MD5 | raw file
Possible License(s): Apache-2.0
1// 2// FontLabel.h 3// FontLabel 4// 5// Created by Kevin Ballard on 5/8/09. 6// Copyright Š 2009 Zynga Game Networks 7// 8// 9// Licensed under the Apache License, Version 2.0 (the "License"); 10// you may not use this file except in compliance with the License. 11// You may obtain a copy of the License at 12// 13// http://www.apache.org/licenses/LICENSE-2.0 14// 15// Unless required by applicable law or agreed to in writing, software 16// distributed under the License is distributed on an "AS IS" BASIS, 17// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18// See the License for the specific language governing permissions and 19// limitations under the License. 20// 21 22#import <Foundation/Foundation.h> 23#import <UIKit/UIKit.h> 24 25@class ZFont; 26@class ZAttributedString; 27 28@interface FontLabel : UILabel { 29 void *reserved; // works around a bug in UILabel 30 ZFont *zFont; 31 ZAttributedString *zAttributedText; 32} 33@property (nonatomic, setter=setCGFont:) CGFontRef cgFont __AVAILABILITY_INTERNAL_DEPRECATED; 34@property (nonatomic, assign) CGFloat pointSize __AVAILABILITY_INTERNAL_DEPRECATED; 35@property (nonatomic, retain, setter=setZFont:) ZFont *zFont; 36// if attributedText is nil, fall back on using the inherited UILabel properties 37// if attributedText is non-nil, the font/text/textColor 38// in addition, adjustsFontSizeToFitWidth does not work with attributed text 39@property (nonatomic, copy) ZAttributedString *zAttributedText; 40// -initWithFrame:fontName:pointSize: uses FontManager to look up the font name 41- (id)initWithFrame:(CGRect)frame fontName:(NSString *)fontName pointSize:(CGFloat)pointSize; 42- (id)initWithFrame:(CGRect)frame zFont:(ZFont *)font; 43- (id)initWithFrame:(CGRect)frame font:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; 44@end