アットウィキロゴ

CTFontDescriptor

CTFontDescriptor


Creating Font Descriptors
CTFontDescriptor::Create(name, size)
CTFontDescriptor::Create(attributes)
CTFontDescriptor::CreateCopy(attributes)
CTFontDescriptor::CreateCopy(variation)
CTFontDescriptor::CreateCopy(feature)
CTFontDescriptor::CreateMatchingFontDescriptors
CTFontDescriptor::CreateMatchingFontDescriptor
Getting Attributes
CTFontDescriptor::CopyAttributes
CTFontDescriptor::CopyAttribute
CTFontDescriptor::CopyLocalizedAttribute
Getting the Font Descriptor Type
CTFontDescriptor::GetTypeID

 class CTFontDescriptor < Hash
   # 
   def copy_attribute(descriptor, attribute)
   end
   # 
   def copy_attributes(descriptor)
   end
   # 
   def copy_localized_attribute(descriptor, attribute, language)
   end
   # 
   def create_copy_with_attributes
   end
   # 
   def create_copy_with_feature
   end
   # 
   def create_copy_with_variation
   end
   # 
   def create_matching_font_descriptor
   end
   # 
   def create_matching_font_descriptors
   end
   # 
   def create_with_attributes
   end
   # 
   def create_with_name_and_size
   end
   # 
   def get_type_id
   end
 end

 class [[CTFont]]
   # Constants
   ## Font Attributes
   URLAttribute, NameAttribute, DisplayNameAttribute, FamilyNameAttribute,
   StyleNameAttribute, TraitsAttribute, VariationAttribute, SizeAttribute,
   MatrixAttribute, CascadeListAttribute, CharacterSetAttribute, LanguagesAttribute,
   BaseLineAdjustAttribute, MacintoshEncodingsAttribute, FeaturesAttribute,
   FeatureSettingsAttribute, FixedAdvanceAttribute, OrientationAttribute, FormatAttribute,
   RegistrationScopeAttribute, PriorityAttribute, EnabledAttribute# =
   # 0, 1, 2, 3, 4
   
   # rendering orientation
   class Orientation
     Default, Horizontal, Vertical = 0, 1, 2
   end
   
   # Recognized format
   class Format
     Unrecognized, OpenTypePostScript, OpenTypeTrueType,
     TrueType, PostScript, Bitmap = 0, 1, 2, 3, 4, 5
   end
   
   # Priority of font descriptors
   class Priority
     System, Network, Computer, User, Dynamic, Process =
     10000, 20000, 30000, 40000, 50000, 60000
   end
   
   # 
   class StylisticClass
     
   end
   
   # 
   ClassMaskShift = 28
   UnknownClass, OldStyleSerifsClass, TransitionalSerifsClass, ModernSerifsClass, 
   ClarendonSerifsClass, SlabSerifsClass, FreeformSerifsClass, SansSerifClass, 
   OrnamentalsClass, ScriptsClass, SymbolicClass =
   class SymbolicTraits
   end
   ItalicTrait, BoldTrait, ExpandedTrait, CondensedTrait, MonoSpaceTrait, 
   VerticalTrait, UIOptimizedTrait, ClassMaskTrait = 
   ClassMaskShift =
   SlantTrait, WeightTrait,  = 
   class WeightTrait
   end
   class SlantTrait
   end
   class WidthTrait
   end
   
 end

 ## 使い方
 # フォントデスクリプタからアトリビュートを取り出す
 url_attribute = font_descriptor[CTFont::URLAttribute]
 
 # フォントデスクリプタにアトリビュートを設定する
 font_descriptor[CTFont::OrientationAttribute] = CTFont::Orientation::Vertical

See also


Link

タグ:

+ タグ編集
  • タグ:
最終更新:2010年06月12日 13:16
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。