Platforms to show: All Mac Windows Linux Cross-Platform
CTFontMBS class
Super class: CFObjectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Font objects represent fonts to an application, providing access to characteristics of the font, such as point size, transform matrix, and other attributes. Fonts provide assistance in laying out glyphs relative to one another and are used to establish the current font when drawing in a graphics context.
Subclass of the CFObjectMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 25 properties
- property Ascent as Double
- property BoundingBox as CGRectMBS
- property CapHeight as Double
- property CharacterSet as Variant
- property Descent as Double
- property DisplayName as String
- property FamilyName as String
- property File as FolderItem
- property FontDescriptor as CTFontDescriptorMBS
- property FullName as String
- property GlyphCount as Integer
- property Leading as Double
- property Matrix as CGAffineTransformMBS
- property PostScriptName as String
- property Size as Double
- property SlantAngle as Double
- property StringEncoding as UInt32
- property SymbolicTraits as UInt32
- property Traits as Dictionary
- property UnderlinePosition as Double
- property UnderlineThickness as Double
- property UnitsPerEm as UInt64
- property URL as String
- property Variation as Dictionary
- property XHeight as Double
- 29 methods
- method AdvancesForGlyphs(orientation as Integer, glyphs() as Integer) as Double
- method AdvancesForGlyphs(orientation as Integer, glyphs() as Integer, boundingRects() as CGSizeMBS) as Double
- method AttributeValue(key as string) as Variant
- method AvailableTables(options as Integer) as String()
- method BoundingRectsForGlyphs(orientation as Integer, glyphs() as Integer) as CGRectMBS
- method BoundingRectsForGlyphs(orientation as Integer, glyphs() as Integer, boundingRects() as CGRectMBS) as CGRectMBS
- method Constructor Private
- method CreateCopyWithAttributes(size as Double, Matrix as CGAffineTransformMBS, fontAttributes as CTFontDescriptorMBS) as CTFontMBS
- method CreateForString(text as string, location as Integer, length as Integer) as CTFontMBS
- method CreatePathForGlyph(glyph as Integer, transform as CGAffineTransformMBS) as CGPathMBS
- method CreateWithFamily(size as Double, Matrix as CGAffineTransformMBS, family as string) as CTFontMBS
- method CreateWithSymbolicTraits(size as Double, Matrix as CGAffineTransformMBS, symTraitValue as Integer, symTraitMask as Integer) as CTFontMBS
- method DefaultCascadeListForLanguages(languagePrefList() as string) as String()
- method Draw(glyphs() as Integer, positions() as CGPointMBS, context as CGContextMBS)
- method Features as Dictionary()
- method FeatureSettings as Dictionary()
- method GlyphsForCharacters(characters() as Integer) as Integer()
- method GlyphWithName(name as string) as Integer
- method GraphicsFont(byref fontAttributes as CTFontDescriptorMBS) as CGFontMBS
- method LigatureCaretPositions(glyph as Integer) as Double()
- method Name(nameKey as string) as String
- method Name(nameKey as string, byref language as string) as String
- method OpticalBoundsForGlyphs(glyphs() as Integer, boundingRects() as CGRectMBS, options as Integer = 0) as CGRectMBS
- method OpticalBoundsForGlyphs(glyphs() as Integer, options as Integer = 0) as CGRectMBS
- method SupportedLanguages as String()
- method Table(table as string, options as Integer) as Memoryblock
- method VariationAxes as Dictionary()
- method VerticalTranslationsForGlyphs(glyphs() as Integer) as CGSizeMBS()
- 45 shared methods
- shared method Available as boolean
- shared method CreateUIFontForLanguage(Type as Integer, size as Double = 0.0, language as string = "") as CTFontMBS
- shared method CreateWithFontDescriptor(descriptor as CTFontDescriptorMBS, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, options as Integer = 0) as CTFontMBS
- shared method CreateWithGraphicsFont(graphicsFont as CGFontMBS, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, attributeValues as CTFontDescriptorMBS = nil) as CTFontMBS
- shared method CreateWithName(name as string, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, options as Integer = 0) as CTFontMBS
- shared method CreateWithPlatformFont(ATSFontHandle as Integer, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, attributeValues as CTFontDescriptorMBS = nil) as CTFontMBS
- shared method kCTBaselineClassHanging as string
- shared method kCTBaselineClassIdeographicCentered as string
- shared method kCTBaselineClassIdeographicHigh as string
- shared method kCTBaselineClassIdeographicLow as string
- shared method kCTBaselineClassMath as string
- shared method kCTBaselineClassRoman as string
- shared method kCTBaselineOriginalFont as string
- shared method kCTBaselineReferenceFont as string
- shared method kCTFontCopyrightNameKey as string
- shared method kCTFontDescriptionNameKey as string
- shared method kCTFontDesignerNameKey as string
- shared method kCTFontDesignerURLNameKey as string
- shared method kCTFontFamilyNameKey as string
- shared method kCTFontFeatureSelectorDefaultKey as string
- shared method kCTFontFeatureSelectorIdentifierKey as string
- shared method kCTFontFeatureSelectorNameKey as string
- shared method kCTFontFeatureSelectorSettingKey as string
- shared method kCTFontFeatureTypeExclusiveKey as string
- shared method kCTFontFeatureTypeIdentifierKey as string
- shared method kCTFontFeatureTypeNameKey as string
- shared method kCTFontFeatureTypeSelectorsKey as string
- shared method kCTFontFullNameKey as string
- shared method kCTFontLicenseNameKey as string
- shared method kCTFontLicenseURLNameKey as string
- shared method kCTFontManufacturerNameKey as string
- shared method kCTFontPostScriptCIDNameKey as string
- shared method kCTFontPostScriptNameKey as string
- shared method kCTFontSampleTextNameKey as string
- shared method kCTFontStyleNameKey as string
- shared method kCTFontSubFamilyNameKey as string
- shared method kCTFontTrademarkNameKey as string
- shared method kCTFontUniqueNameKey as string
- shared method kCTFontVariationAxisDefaultValueKey as string
- shared method kCTFontVariationAxisIdentifierKey as string
- shared method kCTFontVariationAxisMaximumValueKey as string
- shared method kCTFontVariationAxisMinimumValueKey as string
- shared method kCTFontVariationAxisNameKey as string
- shared method kCTFontVendorURLNameKey as string
- shared method kCTFontVersionNameKey as string
- 91 constants
Super class CFObjectMBS
- 5 properties
- property Handle as Integer
- property Hash as Integer
- property Lasterror as Integer
- property Type as Integer
- property TypeDescription as String
- 9 methods
- method close
- method DeepCopy as CFObjectMBS
- method EncodedData as MemoryBlock
- method Equal(o as CFObjectMBS) as boolean
- method ReleaseObject
- method RetainCount as Integer
- method RetainObject
- method XML as CFBinaryDataMBS
- method XMLdata as String
- shared method NewCFObject(handle as Integer) as CFObjectMBS
This class has no sub classes.
Some methods using this class:
- CTGlyphInfoMBS.CreateWithGlyph(glyph as Integer, font as CTFontMBS, baseString as string) as CTGlyphInfoMBS
- CTGlyphInfoMBS.CreateWithGlyphName(glyphName as string, font as CTFontMBS, baseString as string) as CTGlyphInfoMBS
Some examples using this class:
- /MacCG/CoreText/CoreText Dynamic Text Height
- /MacCG/CoreText/CoreText Font Change Notification
- /MacCG/CoreText/CoreText Test
- /MacCG/CoreText/Fonts
- /MacCG/CoreText/Glyphs
Blog Entries
- MBS Xojo Plugins, version 22.5pr1
- MBS Xojo Plugins, version 21.6pr1
- Removing 32-bit Carbon GUI classes
- MBS Xojo / Real Studio Plugins, version 15.0pr11
- CoreText Completed
Release notes
- Version 22.5
- Deprecated PlatformFont method in CTFontMBS class.
- Version 22.0
- Fixed a bug with CTFontMBS not returning file path in older Xojo version.
The items on this page are in the following plugins: MBS MacCF Plugin, MBS MacCG Plugin.
CTFontDescriptorMBS - CTFrameMBS
