/libs/FontLabel/FontLabel.h

http://github.com/kstenerud/ObjectAL-for-iPhone · C Header · 44 lines · 17 code · 3 blank · 24 comment · 0 complexity · 66d304a3435ceff4595b33ba4fcfcc1c MD5 · raw file

  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. #import <Foundation/Foundation.h>
  22. #import <UIKit/UIKit.h>
  23. @class ZFont;
  24. @class ZAttributedString;
  25. @interface FontLabel : UILabel {
  26. void *reserved; // works around a bug in UILabel
  27. ZFont *zFont;
  28. ZAttributedString *zAttributedText;
  29. }
  30. @property (nonatomic, setter=setCGFont:) CGFontRef cgFont __AVAILABILITY_INTERNAL_DEPRECATED;
  31. @property (nonatomic, assign) CGFloat pointSize __AVAILABILITY_INTERNAL_DEPRECATED;
  32. @property (nonatomic, retain, setter=setZFont:) ZFont *zFont;
  33. // if attributedText is nil, fall back on using the inherited UILabel properties
  34. // if attributedText is non-nil, the font/text/textColor
  35. // in addition, adjustsFontSizeToFitWidth does not work with attributed text
  36. @property (nonatomic, copy) ZAttributedString *zAttributedText;
  37. // -initWithFrame:fontName:pointSize: uses FontManager to look up the font name
  38. - (id)initWithFrame:(CGRect)frame fontName:(NSString *)fontName pointSize:(CGFloat)pointSize;
  39. - (id)initWithFrame:(CGRect)frame zFont:(ZFont *)font;
  40. - (id)initWithFrame:(CGRect)frame font:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED;
  41. @end