Platforms to show: All Mac Windows Linux Cross-Platform
CTFontDescriptorMBS 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 |
A font descriptor can be an incomplete specification, in which case the system chooses the most appropriate font to match the given attributes.
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.
- 7 properties
- property DisplayName as String
- property FamilyName as String
- property File as FolderItem
- property FontSize as Double
- property Name as String
- property StyleName as String
- property URL as String
- 11 methods
- method AttributeValue(key as string) as Variant
- method AttributeValues as Dictionary
- method Constructor Private
- method CopyWithAttributes(attributeValues as Dictionary) as CTFontDescriptorMBS
- method CopyWithFamily(family as String) as CTFontDescriptorMBS
- method CopyWithFeature(featureTypeIdentifier as Integer, featureSelectorIdentifier as Integer) as CTFontDescriptorMBS
- method CopyWithSymbolicTraits(symTraitValue as Integer, symTraitMask as Integer) as CTFontDescriptorMBS
- method CopyWithVariation(variationIdentifier as Integer, variationValue as Double) as CTFontDescriptorMBS
- method LocalizedAttributeValue(key as string, byref lang as string) as Variant
- method MatchingFontDescriptor(mandatoryAttributes() as String) as CTFontDescriptorMBS
- method MatchingFontDescriptors(mandatoryAttributes() as String) as CTFontDescriptorMBS()
- 36 shared methods
- shared method Available as boolean
- shared method CreateCopyWithFamily(orignal as CTFontDescriptorMBS, family as String) as CTFontDescriptorMBS
- shared method CreateCopyWithSymbolicTraits(orignal as CTFontDescriptorMBS, symTraitValue as Integer, symTraitMask as Integer) as CTFontDescriptorMBS
- shared method CreateWithAttributes(attributeValues as Dictionary) as CTFontDescriptorMBS
- shared method CreateWithNameAndSize(Name as string, Size as Double = 0.0) as CTFontDescriptorMBS
- shared method kCTFontBaselineAdjustAttribute as string
- shared method kCTFontCascadeListAttribute as string
- shared method kCTFontCharacterSetAttribute as string
- shared method kCTFontDescriptorMatchingCurrentAssetSize as string
- shared method kCTFontDescriptorMatchingDescriptors as string
- shared method kCTFontDescriptorMatchingError as string
- shared method kCTFontDescriptorMatchingPercentage as string
- shared method kCTFontDescriptorMatchingResult as string
- shared method kCTFontDescriptorMatchingSourceDescriptor as string
- shared method kCTFontDescriptorMatchingTotalAssetSize as string
- shared method kCTFontDescriptorMatchingTotalDownloadedSize as string
- shared method kCTFontDisplayNameAttribute as string
- shared method kCTFontDownloadableAttribute as string
- shared method kCTFontEnabledAttribute as string
- shared method kCTFontFamilyNameAttribute as string
- shared method kCTFontFeaturesAttribute as string
- shared method kCTFontFeatureSettingsAttribute as string
- shared method kCTFontFixedAdvanceAttribute as string
- shared method kCTFontFormatAttribute as string
- shared method kCTFontLanguagesAttribute as string
- shared method kCTFontMacintoshEncodingsAttribute as string
- shared method kCTFontMatrixAttribute as string
- shared method kCTFontNameAttribute as string
- shared method kCTFontOrientationAttribute as string
- shared method kCTFontPriorityAttribute as string
- shared method kCTFontRegistrationScopeAttribute as string
- shared method kCTFontSizeAttribute as string
- shared method kCTFontStyleNameAttribute as string
- shared method kCTFontTraitsAttribute as string
- shared method kCTFontURLAttribute as string
- shared method kCTFontVariationAttribute as string
- 24 constants
Font Matching State
Constant | Value | Description |
---|---|---|
kCTFontDescriptorMatchingDidBegin | 0 |
called once at the beginning. |
kCTFontDescriptorMatchingDidFailWithError | 8 |
called when an error occurred. (may be called multiple times.) |
kCTFontDescriptorMatchingDidFinish | 1 |
called once at the end. |
kCTFontDescriptorMatchingDidFinishDownloading | 6 |
Finished downloading a descriptor. |
kCTFontDescriptorMatchingDidMatch | 7 |
called when font descriptor is matched. |
kCTFontDescriptorMatchingDownloading | 5 |
Downloading a descriptor. |
kCTFontDescriptorMatchingStalled | 3 |
called when stalled. (e.g. while waiting for server response.) |
kCTFontDescriptorMatchingWillBeginDownloading | 4 |
Starts downloading a descriptor. Downloading part may be skipped if all the assets are already downloaded |
kCTFontDescriptorMatchingWillBeginQuerying | 2 |
called once before talking to the server. Skipped if not necessary. |
Formats
Constant | Value | Description |
---|---|---|
kCTFontFormatBitmap | 5 |
The font is a bitmap only format. |
kCTFontFormatOpenTypePostScript | 1 |
The font is an OpenType format containing PostScript data |
kCTFontFormatOpenTypeTrueType | 2 |
The font is an OpenType format containing TrueType data. |
kCTFontFormatPostScript | 4 |
The font is a recognized PostScript format. |
kCTFontFormatTrueType | 3 |
The font is a recognized TrueType format. |
kCTFontFormatUnrecognized | 0 |
The font is not a recognized format |
Orientations
Constant | Value | Description |
---|---|---|
kCTFontOrientationDefault | 0 |
Default |
kCTFontOrientationHorizontal | 1 |
Horizontal |
kCTFontOrientationVertical | 2 |
Vertical |
Priorities
Constant | Value | Description |
---|---|---|
kCTFontPriorityComputer | 30000 |
Priority of computer local fonts (located in /Library/Fonts). |
kCTFontPriorityDynamic | 50000 |
Priority of fonts registered dynamically, not located in a standard location (either kCTFontManagerScopeUser, or kCTFontManagerScopeSession). |
kCTFontPriorityNetwork | 20000 |
Priority of network fonts (located in /Network/Library/Fonts). |
kCTFontPriorityProcess | 60000 |
Priority of fonts registered for the process (kCTFontManagerScopeProcess). |
kCTFontPrioritySystem | 10000 |
Priority of system fonts (located in /System/Library/Fonts). |
kCTFontPriorityUser | 40000 |
Priority of local fonts (located in user's Library/Fonts). |
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:
- CoreTextMBS.CreateFontDescriptorFromData(data as memoryblock) as CTFontDescriptorMBS
- CoreTextMBS.CreateFontDescriptorFromData(data as string) as CTFontDescriptorMBS
- CoreTextMBS.CreateFontDescriptorsFromFile(file as folderitem) as CTFontDescriptorMBS()
- CoreTextMBS.CreateFontDescriptorsFromURL(URL as string) as CTFontDescriptorMBS()
- CoreTextMBS.EnableFontDescriptors(descriptors() as CTFontDescriptorMBS, enable as boolean)
- CTFontCollectionMBS.CopyWithFontDescriptors(queryDescriptors() as CTFontDescriptorMBS, options as dictionary) as CTFontCollectionMBS
- CTFontCollectionMBS.MatchingFontDescriptors(options as dictionary = nil) as CTFontDescriptorMBS()
- CTFontCollectionMBS.MatchingFontDescriptorsForFamily(familyName as string, options as dictionary = nil) as CTFontDescriptorMBS()
- CTFontCollectionMBS.MatchingFontDescriptorsSorted(tag as Variant) as CTFontDescriptorMBS()
- CTFontMBS.GraphicsFont(byref fontAttributes as CTFontDescriptorMBS) as CGFontMBS
Some properties using for this class:
- CTFontMBS.FontDescriptor as CTFontDescriptorMBS
Some events using this class:
- CoreTextMBS.FontCollectionSortDescriptors(first as CTFontDescriptorMBS, second as CTFontDescriptorMBS, tag as Variant) as Integer
Blog Entries
The items on this page are in the following plugins: MBS MacCF Plugin, MBS MacCG Plugin.
CTFontCollectionMBS - CTFontMBS