Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSFontDescriptorMBS class.

NSFontDescriptorMBS.fontDescriptorWithFontAttributes(AttributesDic as Dictionary) as NSFontDescriptorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a font descriptor with a dictionary of attributes.
Example
// ask for monospace font trait
Dim traitsAttributes As New Dictionary
traitsAttributes.Value(NSFontDescriptorMBS.NSFontSymbolicTrait) = NSFontDescriptorMBS.NSFontMonoSpaceTrait

// ask for traits
Dim fontAttributes As New Dictionary
fontAttributes.Value(NSFontDescriptorMBS.NSFontTraitsAttribute) = traitsAttributes

// now make a font descriptor for this
Dim fd As NSFontDescriptorMBS = NSFontDescriptorMBS.fontDescriptorWithFontAttributes(fontAttributes)

// and ask font manager for matching fonts
Dim fontManager As New NSFontManagerMBS
Dim fonts() As String = fontManager.availableFontNamesMatchingFontDescriptor(fd)

// finds e.g. AndaleMono, CourierNewPSMT, CourierNewPS-ItalicMT, CourierNewPS-BoldMT, CourierNewPS-BoldItalicMT,
// FZLTXHB--B51-0, FZLTZHB--B51-0, FZLTTHB--B51-0, Menlo-Regular, Menlo-Italic, Menlo-Bold, Menlo-BoldItalic,
// Monaco, Osaka-Mono, JCsmPC, PTMono-Regular, PTMono-Bold

attributes: The attributes for the font descriptor. If nil, the font descriptor's dictionary will be empty.

Returns the new font descriptor.

NSFontDescriptorMBS.fontDescriptorWithName(fontName as string, matrix as Variant) as NSFontDescriptorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a font descriptor with the NSFontNameAttribute and NSFontMatrixAttribute dictionary attributes set to the given values.

fontName: The value for NSFontNameAttribute.
matrix: The value for NSFontMatrixAttribute. Must be a NSAffineTransformMBS object or nil!

Returns the new font descriptor.
Available in Mac OS X v10.4 and later.

See also:

NSFontDescriptorMBS.fontDescriptorWithName(fontName as string, size as Double) as NSFontDescriptorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a font descriptor with the NSFontNameAttribute and NSFontSizeAttribute dictionary attributes set to the given values.

fontName: The value for NSFontNameAttribute.
size: The value for NSFontSizeAttribute.

Returns the new font descriptor.
Available in Mac OS X v10.3 and later.

See also:

NSFontDescriptorMBS.NSFontCascadeListAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An array with sub-descriptors.
The default value is the system default cascading list for user's locale.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontCharacterSetAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An NSCharacterSetMBS instance that represents the set of Unicode characters covered by the font.
The default value is supplied by the font.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontColorAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An optional memoryblock that specifies the font color.
(Deprecated. Use NSForegroundColorAttributeName instead.)
Available in Mac OS X v10.3 and later.
Deprecated in Mac OS X v10.4.

NSFontDescriptorMBS.NSFontFaceAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An optional string that specifies the font face.

NSFontDescriptorMBS.NSFontFamilyAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An optional string that specifies the font family.

NSFontDescriptorMBS.NSFontFeatureSelectorIdentifierKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for font descriptor attributes.

A number specifying a font feature selector such as common ligature off, traditional character shape, and so on. See "Font Features" in ATSUI Programming Guide for predefined feature selectors.
Available in Mac OS X v10.5 and later.

NSFontDescriptorMBS.NSFontFeatureTypeIdentifierKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for font descriptor attributes.

A number specifying a font feature type such as ligature, character shape, and so on. See "Font Features" in ATSUI Programming Guide for predefined feature types.
Available in Mac OS X v10.5 and later.

NSFontDescriptorMBS.NSFontFixedAdvanceAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

A number containing a float value that overrides the glyph advancement specified by the font.
The default value is 0.0.

NSFontDescriptorMBS.NSFontMatrixAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An NSAffineTransformMBS instance that specifies the font's transformation matrix.
The default value is the identity matrix.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontNameAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An optional string that specifies the font name.

NSFontDescriptorMBS.NSFontSizeAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An optional string, containing a float value, that specifies the font size.

NSFontDescriptorMBS.NSFontSlantTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its trait dictionary.

The relative slant angle value as a number.
The valid value range is from -1.0 to 1.0. The value of 0.0 corresponds to 0 degree clockwise rotation from the vertical and 1.0 corresponds to 30 degrees clockwise rotation.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontSymbolicTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its trait dictionary.

The symbolic traits value as a number.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontTraitsAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

A Dictionary instance instance fully describing font traits.
The default value is supplied by the font. See "Font traits dictionary keys" for dictionary keys.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontVariationAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

A dictionary instance that describes the font's variation axis.
The default value is supplied by the font. See "Font variation axis dictionary keys" for dictionary keys.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontVariationAxisDefaultValueKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its variation axis dictionary.

The default axis value as a number.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontVariationAxisIdentifierKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its variation axis dictionary.

The axis identifier value as a number.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontVariationAxisMaximumValueKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its variation axis dictionary.

The maximum axis value as a number.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontVariationAxisMinimumValueKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its variation axis dictionary.

The minimum axis value as a number.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontVariationAxisNameKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its variation axis dictionary.

The localized variation axis name.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontVisibleNameAttribute as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the attribute keys.

An optional string that specifies the font's visible name.

NSFontDescriptorMBS.NSFontWeightTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its trait dictionary.

The normalized weight value as a number.
The valid value range is from -1.0 to 1.0. The value of 0.0 corresponds to the regular or medium font weight.
Available in Mac OS X v10.4 and later.

NSFontDescriptorMBS.NSFontWidthTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys to retrieve information about a font descriptor from its trait dictionary.

The relative inter-glyph spacing value as a number.
The valid value range is from -1.0 to 1.0. The value of 0.0 corresponds to the regular glyph spacing.
Available in Mac OS X v10.4 and later.

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


The biggest plugin in space...