Platforms to show: All Mac Windows Linux Cross-Platform

Back to CTFontDescriptorMBS class.

CTFontDescriptorMBS.Available as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether this class is available.

Returns true in OS X v10.5 and later.

CTFontDescriptorMBS.CreateCopyWithFamily(orignal as CTFontDescriptorMBS, family as String) as CTFontDescriptorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new font descriptor in the specified family based on the traits of the original descriptor.

original: The original font descriptor reference.
family: The name of the desired family.

Returns a new font reference with the original traits in the given family, or nil if none found in the system.

CTFontDescriptorMBS.CreateCopyWithSymbolicTraits(orignal as CTFontDescriptorMBS, symTraitValue as Integer, symTraitMask as Integer) as CTFontDescriptorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new font descriptor based on the original descriptor having the specified symbolic traits.
Example
// find PostScript names for a font
const nameOfAFont = "Arial"

dim FontName as string
dim FontFamilyName as string
dim FontPostscriptName as string
dim FontPostscriptNameBold as string
dim FontPostscriptNameItalic as string

dim f as CTFontMBS = CTFontMBS.CreateWithName(nameOfAFont, 13)

if f <> nil then
FontName = f.FullName
FontFamilyName = f.FamilyName
FontPostscriptName = f.PostScriptName

dim d as CTFontDescriptorMBS = f.FontDescriptor

dim db as CTFontDescriptorMBS = CTFontDescriptorMBS.CreateCopyWithSymbolicTraits(d, CoreTextMBS.kCTFontTraitBold, CoreTextMBS.kCTFontTraitBold)
dim di as CTFontDescriptorMBS = CTFontDescriptorMBS.CreateCopyWithSymbolicTraits(d, CoreTextMBS.kCTFontTraitItalic, CoreTextMBS.kCTFontTraitItalic)

dim fb as CTFontMBS = f.CreateCopyWithAttributes(f.Size, nil, db)
dim fi as CTFontMBS = f.CreateCopyWithAttributes(f.Size, nil, di)

FontPostscriptNameBold = fb.PostScriptName
FontPostscriptNameItalic = fi.PostScriptName

end if

Break // read names in debugger

original: The original font descriptor reference.
symTraitValue: The value of the symbolic traits. This bitfield is used to indicate the desired value for the traits specified by the symTraitMask parameter. Used in conjunction, they can allow for trait removal as well as addition.
symTraitMask: The mask bits of the symbolic traits. This bitfield is used to indicate the traits that should be changed.

Returns a new font descriptor reference in the same family with the given symbolic traits, or nil if none found in the system.

Requires Mac OS X 10.9 or newer.

CTFontDescriptorMBS.CreateWithAttributes(attributeValues as Dictionary) as CTFontDescriptorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a new font descriptor reference from a dictionary of attributes.

The provided attribute dictionary can contain arbitrary attributes that are preserved; however, unrecognized attributes are ignored on font creation and and may not be preserved over the round trip from descriptor to font and back to descriptor.

CTFontDescriptorMBS.CreateWithNameAndSize(Name as string, Size as Double = 0.0) as CTFontDescriptorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a new font descriptor with the provided PostScript name and size.
Example
dim c as CTFontDescriptorMBS = CTFontDescriptorMBS.CreateWithNameAndSize("Times", 12)
MsgBox c.AttributeValue(c.kCTFontFamilyNameAttribute)

name: The PostScript name to be used for the font descriptor as a string.
size: The point size. If 0.0, the font size attribute (kCTFontSizeAttribute) is omitted from the returned font descriptor.

Return sa new font descriptor reference with the given PostScript name and point size.

CTFontDescriptorMBS.kCTFontBaselineAdjustAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the baseline adjustment for a font reference. This is primarily used when defining font descriptors for a cascade list to keep the baseline of all fonts even. The value associated with this is a float represented as a number.

CTFontDescriptorMBS.kCTFontCascadeListAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the cascade list used for a font reference. The cascade list is a array containing CTFontDescriptorMBS elements. If unspecified, the global cascade list is used.

CTFontDescriptorMBS.kCTFontCharacterSetAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the Unicode character coverage set for a font reference. The value for this key is a CharacterSetMBS object. If specified, this attribute can be used to restrict the font to a subset of its actual character set. If unspecified, this attribute is ignored and the actual character set is used.

CTFontDescriptorMBS.kCTFontDescriptorMatchingCurrentAssetSize as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

A number. Total downloaded byte size. Valid during Downloading state.

CTFontDescriptorMBS.kCTFontDescriptorMatchingDescriptors as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

Array of descriptors to be queried.
Valid while downloading or when state is kCTFontDescriptorMatchingWillBeginQuerying.

CTFontDescriptorMBS.kCTFontDescriptorMatchingError as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

A CFErrorMBS; Valid when state kCTFontDescriptorMatchingDidFailWithError.

CTFontDescriptorMBS.kCTFontDescriptorMatchingPercentage as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

A Number; Download progress in 0 - 100. Valid during Downloading state.

CTFontDescriptorMBS.kCTFontDescriptorMatchingResult as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

Array of matched font descriptors.
Valid when state is kCTFontDescriptorMatchingDidMatch or CTFontDescriptorMatchingEnd.

CTFontDescriptorMBS.kCTFontDescriptorMatchingSourceDescriptor as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

A CTFontDescriptorMBS; The current font descriptor.
Valid when state is kCTFontDescriptorMatchingDidMatch.

CTFontDescriptorMBS.kCTFontDescriptorMatchingTotalAssetSize as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

A Number; Total byte size to download.
Always valid, but may be Zero when information is not available.

CTFontDescriptorMBS.kCTFontDescriptorMatchingTotalDownloadedSize as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for progressParameter dictionary.

A Number; Total downloaded byte size. Valid during Downloading state.

CTFontDescriptorMBS.kCTFontDisplayNameAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key for accessing the name used to display the font. Most commonly this is the full name. The value associated with this key is a string. If the value is unspecified, it defaults to Helvetica, and if that font is unavailable, it falls back to the global font cascade list.

CTFontDescriptorMBS.kCTFontDownloadableAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

The font downloadable state.
The value associated with this key is a Boolean. If it is true, CoreText attempts to download a font if necessary when matching a descriptor.

CTFontDescriptorMBS.kCTFontEnabledAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to obtain the font enabled state. The returned value is an integer represented as a number representing a Boolean value. Unregistered font descriptors return nil, which is equivalent to false.
Available in OS X v10.6 and later.

CTFontDescriptorMBS.kCTFontFamilyNameAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key for accessing the font family name from the font descriptor. The value associated with this key is a string.

CTFontDescriptorMBS.kCTFontFeaturesAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the font features for a font reference. The value associated with this key is a array containing font feature dictionaries. This feature list contains the feature information from the 'feat' table of the font. For more information, see Features.
Available in OS X v10.5 and later.

CTFontDescriptorMBS.kCTFontFeatureSettingsAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the font features settings for a font reference. The value associated with this key is a CFArrayRef object containing font feature-setting dictionaries. A feature-setting dictionary contains a tuple of a kCTFontFeatureTypeIdentifierKey key-value pair and a kCTFontFeatureSelectorIdentifierKey key-value pair. Each setting dictionary indicates which setting should be turned on. In the case of duplicate or conflicting setting, the last setting in the list takes precedence. It is the caller's responsibility to handle exclusive and nonexclusive settings as necessary.
Available in OS X v10.5 and later.

CTFontDescriptorMBS.kCTFontFixedAdvanceAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify a fixed advance to be used for a font reference. If present and specified, this attribute is used to specify a constant advance to override any font values. The value associated with this key is a float represented as a number.
Available in OS X v10.5 and later.

CTFontDescriptorMBS.kCTFontFormatAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the recognized format of the font. The value associated with this key is an integer represented as a number containing one of the constants in "Font Format Constants."
Available in OS X v10.6 and later.

CTFontDescriptorMBS.kCTFontLanguagesAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain a list of covered languages for a font reference. The value for this key is an array containing string elements. If specified, this attribute restricts the search to matching fonts that support the specified languages. The language identifier string should conform to the RFC 3066bis standard. If unspecified, this attribute is ignored.
Available in OS X v10.5 and later.

CTFontDescriptorMBS.kCTFontMacintoshEncodingsAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the Macintosh encodings for a font reference. The value associated with this key is a number containing a bit field of the Macintosh encodings. This attribute is provided for legacy compatibility.
Available in OS X v10.5 and later.

CTFontDescriptorMBS.kCTFontMatrixAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify the font transformation matrix when creating a font. If unspecified it defaults to the unit matrix. The value for this key is a Memoryblock object containing a CGAffineTransform.

CTFontDescriptorMBS.kCTFontNameAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key for accessing the PostScript name from the font descriptor. The value associated with this key is a string. If the value is unspecified, it defaults to Helvetica, and if that font is unavailable, it falls back to the global font cascade list.

CTFontDescriptorMBS.kCTFontOrientationAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify a particular orientation for the glyphs of the font. The value associated with this key is an integer represented as a number containing one of the constants in "Font Orientation Constants." If you want to receive vertical metrics from a font for vertical rendering, specify kCTFontVerticalOrientation. If unspecified, the font uses its native orientation.

CTFontDescriptorMBS.kCTFontPriorityAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the font priority used by font descriptors when resolving duplicates and sorting match results. The value associated with this key is an integer represented as a CFNumberRef object containing one of the values enumerated in "Font Priority Constants." The higher the value, the higher the priority of the font. Only registered fonts have a priority. Unregistered font descriptors return nil.
Available in OS X v10.6 and later.

CTFontDescriptorMBS.kCTFontRegistrationScopeAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to specify or obtain the font descriptor's registration scope. The value associated with this key is an integer represented as a number containing one of the CTFontManagerScope enumerated values. A value of nil can be returned for font descriptors that are not registered.
Available in OS X v10.6 and later.

CTFontDescriptorMBS.kCTFontSizeAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to obtain or specify the font point size. Creating a font with this unspecified will default to a point size of 12.0. The value for this key is represented as a number.

CTFontDescriptorMBS.kCTFontStyleNameAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key for accessing the style name of the font. This name represents the designer's description of the font's style. The value associated with this key is a string.

CTFontDescriptorMBS.kCTFontTraitsAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key for accessing the dictionary of font traits for stylistic information. See "Font Traits" for the list of font traits. The value associated with this key is a dictionary.

CTFontDescriptorMBS.kCTFontURLAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key for accessing the font URL from the font descriptor. The value associated with this key is an URL string.
Available in OS X v10.6 and later.

CTFontDescriptorMBS.kCTFontVariationAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants keys for accessing font attributes from a font descriptor.

Key to obtain the font variation dictionary instance as a dictionary object. If specified in a font descriptor, fonts with the specified axes are primary match candidates; if no such fonts exist, this attribute is ignored.

The items on this page are in the following plugins: MBS MacCG Plugin.


The biggest plugin in space...