Platforms to show: All Mac Windows Linux Cross-Platform

Back to CTFontMBS class.

CTFontMBS.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.

CTFontMBS.CreateUIFontForLanguage(Type as Integer, size as Double = 0.0, language as string = "") as CTFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the special user-interface font for the given language and user-interface type.

Type: A constant specifying the intended user-interface use for the requested font reference. See Enumerations for possible values.
size: The point size for the font reference. If 0.0 is specified, the default size for the requested user-interface type is used.
language: Language specifier string to select a font for a particular localization. If "" is specified, the current system language is used. The format of the language identifier should conform to the RFC 3066bis standard.

Returns the correct font for various user-interface uses.
The only required parameter is the Type selector; the other parameters have default values.

Some examples using this method:

CTFontMBS.CreateWithFontDescriptor(descriptor as CTFontDescriptorMBS, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, options as Integer = 0) as CTFontMBS

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 reference that best matches the given font descriptor.

descriptor: A font descriptor containing attributes that specify the requested font.
size: The point size for the font reference. If 0.0 is specified, the default font size of 12.0 is used. This parameter is optional.
matrix: The transformation matrix for the font. In most cases, set this parameter to be nil. If nil is specified, the identity matrix is used. This parameter is optional.

Returns a CTFontMBS that best matches the attributes provided with the font descriptor.

The size and matrix parameters override any specified in the font descriptor unless they are unspecified (0.0 for size and NULL for matrix). A best match font is always returned, and default values are used for any unspecified parameters.

CTFontMBS.CreateWithGraphicsFont(graphicsFont as CGFontMBS, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, attributeValues as CTFontDescriptorMBS = nil) as CTFontMBS

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 reference from an existing Core Graphics font reference.

graphicsFont: A valid Core Graphics font reference.
size: The point size for the font reference. If 0.0 is specified the default font size of 12.0 is used.
matrix: The transformation matrix for the font. In most cases, set this parameter to be nil. If nil, the identity matrix is used. Optional.
attributes: Additional attributes that should be matched. Optional.

Returns a new font reference for an existing CGFontRef object with the specified size, matrix, and additional attributes.

CTFontMBS.CreateWithName(name as string, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, options as Integer = 0) as CTFontMBS

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 reference for the given name.
Example
dim c as CTFontMBS = CTFontMBS.CreateWithName("Times", 12)
MsgBox c.FullName

name: The font name for which you wish to create a new font reference. A valid PostScript name is preferred, although other font name types are matched in a fallback manner.
size: The point size for the font reference. If 0.0 is specified, the default font size of 12.0 is used. This parameter is optional.
matrix: The transformation matrix for the font. In most cases, set this parameter to be nil. If nil is specified, the identity matrix is used. This parameter is optional.

Returns a CTFontRef that best matches the name provided with size and matrix attributes.

The name parameter is the only required parameter, and default values are used for unspecified parameters (0.0 for size and nil for matrix). If all parameters cannot be matched identically, a best match is found.

CTFontMBS.CreateWithPlatformFont(ATSFontHandle as Integer, size as Double = 0.0, matrix as CGAffineTransformMBS = nil, attributeValues as CTFontDescriptorMBS = nil) as CTFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a new font reference from an ATS font reference.

ATSFontHandle: A valid ATSFontRef object.
size: The point size for the font reference. If 0.0 is specified the default font size of 12.0 is used.
matrix: The transformation matrix for the font. In most cases, set this parameter to be nil. If nil, the identity matrix is used. Optional.
attributes: A CTFontDescriptorMBS containing additional attributes that should be matched. Optional.

Returns a new font reference for an ATSFontRef with the specified size, matrix, and additional attributes.

CTFontMBS.kCTBaselineClassHanging as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Key to reference the Hanging baseline class.

This key can be used with a baseline info dictionary to offset to the Hanging baseline as a float. It can also be used as the value for kCTBaselineClassAttributeName.

CTFontMBS.kCTBaselineClassIdeographicCentered as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Key to reference the Ideographic Centered baseline class.

This key can be used with a baseline info dictionary to offset to the Ideographic Centered baseline as a float. It can also be used as the value for kCTBaselineClassAttributeName.

CTFontMBS.kCTBaselineClassIdeographicHigh as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Key to reference the Ideographic High baseline class.

This key can be used with a baseline info dictionary to offset to the Ideographic High baseline as a float. It can also be used as the value for kCTBaselineClassAttributeName.

CTFontMBS.kCTBaselineClassIdeographicLow as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Key to reference the Ideographic Low baseline class.

This key can be used with a baseline info dictionary to offset to the Ideographic Low baseline as a float. It can also be used as the value for kCTBaselineClassAttributeName.

CTFontMBS.kCTBaselineClassMath as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Key to reference the Math baseline class.

This key can be used with a baseline info dictionary to offset to the Math baseline as a float. It can also be used as the value for kCTBaselineClassAttributeName.

CTFontMBS.kCTBaselineClassRoman as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Key to reference the Roman baseline class.

This key can be used with a baseline info dictionary to offset to the Roman baseline as a float. It can also be used as the value for kCTBaselineClassAttributeName.

CTFontMBS.kCTBaselineOriginalFont as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Use the original font for setting the reference baseline.

This constant can be used as the value for kCTBaselineReferenceFont to specify that the original font should be used for the reference baseline.

CTFontMBS.kCTBaselineReferenceFont as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Key to reference a font for the reference baseline.

This key can be used to specify a font for the reference baseline. The value is a CTFontMBS or the kCTBaselineOriginalFont constant.

CTFontMBS.kCTFontCopyrightNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the copyright name.

CTFontMBS.kCTFontDescriptionNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the description name.

CTFontMBS.kCTFontDesignerNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the designer name.

CTFontMBS.kCTFontDesignerURLNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the vendor URL name.

CTFontMBS.kCTFontFamilyNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the family name.

CTFontMBS.kCTFontFeatureSelectorDefaultKey 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 to font feature dictionary values.

Key to be used with a selector dictionary to get the default indicator for the selector. This value is a boolean, which if present and true, indicates that this selector is the default setting for the current feature type.

CTFontMBS.kCTFontFeatureSelectorIdentifierKey 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 to font feature dictionary values.

Key to be used with a selector dictionary corresponding to a feature type to obtain the selector identifier value as a number.

CTFontMBS.kCTFontFeatureSelectorNameKey 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 to font feature dictionary values.

Key to be used with a selector dictionary to get the localized name string for the selector as a string.

CTFontMBS.kCTFontFeatureSelectorSettingKey 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 to font feature dictionary values.

Key to be used with a selector dictionary to get or specify the current setting for the selector. This value is a Boolean to indicate whether this selector is on or off. If this key is not present, the default setting is used.

CTFontMBS.kCTFontFeatureTypeExclusiveKey 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 to font feature dictionary values.

Key to get the font feature exclusive setting of the feature as a Boolean. The value associated with this key indicates whether the feature selectors associated with this type should be mutually exclusive.

CTFontMBS.kCTFontFeatureTypeIdentifierKey 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 to font feature dictionary values.

Key to get the font feature type value as a number.

CTFontMBS.kCTFontFeatureTypeNameKey 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 to font feature dictionary values.

Key to get the localized font feature type name as a string.

CTFontMBS.kCTFontFeatureTypeSelectorsKey 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 to font feature dictionary values.

Key to get the the array of font feature selectors as an array. This is an array of selector dictionaries that contain the values for the font feature selector keys listed in this group.

CTFontMBS.kCTFontFullNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the full name.

CTFontMBS.kCTFontLicenseNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the license name.

CTFontMBS.kCTFontLicenseURLNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the license URL name.

CTFontMBS.kCTFontManufacturerNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the manufacturer name.

CTFontMBS.kCTFontPostScriptCIDNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the PostScript character identifier (CID) font name.

CTFontMBS.kCTFontPostScriptNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the PostScript name.

CTFontMBS.kCTFontSampleTextNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the sample text name string.

CTFontMBS.kCTFontStyleNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the style name.

CTFontMBS.kCTFontSubFamilyNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the subfamily name.

CTFontMBS.kCTFontTrademarkNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the trademark name.

CTFontMBS.kCTFontUniqueNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the unique name.

CTFontMBS.kCTFontVariationAxisDefaultValueKey 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 to font variation axis dictionary.

Key to get the variation axis default value as a number.

CTFontMBS.kCTFontVariationAxisIdentifierKey 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 to font variation axis dictionary.

Key to get the variation axis identifier value as a number.

CTFontMBS.kCTFontVariationAxisMaximumValueKey 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 to font variation axis dictionary.

Key to get the variation axis maximum value as a number.

CTFontMBS.kCTFontVariationAxisMinimumValueKey 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 to font variation axis dictionary.

Key to get the variation axis minimum value as a number.

CTFontMBS.kCTFontVariationAxisNameKey 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 to font variation axis dictionary.

Key to get the localized variation axis name string.

CTFontMBS.kCTFontVendorURLNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the vendor URL name.

CTFontMBS.kCTFontVersionNameKey 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 name specifier constants provide access to the different names associated with a font.

The name specifier for the version name.

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


The biggest plugin in space...