Platforms to show: All Mac Windows Linux Cross-Platform
Back to CTFontDescriptorMBS class.
CTFontDescriptorMBS.AttributeValue(key as string) as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
key: The requested attribute.
Returns a attribute value, or nil if the requested attribute is not present.
CTFontDescriptorMBS.AttributeValues as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The font descriptor attributes dictionary. This dictionary contains the minimum number of attributes to specify fully this particular font descriptor.
CTFontDescriptorMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CTFontDescriptorMBS.CopyWithAttributes(attributeValues as Dictionary) as CTFontDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
attributes: A dictionary containing arbitrary attributes.
Returns a new copy of the original font descriptor with attributes augmented by those specified. If there are conflicts between attributes, the new attributes replace existing ones.
CTFontDescriptorMBS.CopyWithFamily(family as String) as CTFontDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.CopyWithFeature(featureTypeIdentifier as Integer, featureSelectorIdentifier as Integer) as CTFontDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
featureTypeIdentifier: The feature type identifier.
featureSelectorIdentifier: The feature selector identifier.
Returns a copy of the original font descriptor modified with the given feature settings.
This is a convenience method to toggle more easily the state of individual features.
CTFontDescriptorMBS.CopyWithSymbolicTraits(symTraitValue as Integer, symTraitMask as Integer) as CTFontDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
CTFontDescriptorMBS.CopyWithVariation(variationIdentifier as Integer, variationValue as Double) as CTFontDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
variationIdentifier: The variation axis identifier. This is the four-character code of the variation axis as a number.
variationValue: The value corresponding with the variation instance.
Returns a copy of the original font descriptor with a new variation instance.
This is a convenience method for easily creating new variation font instances.
CTFontDescriptorMBS.LocalizedAttributeValue(key as string, byref lang as string) as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
key: The requested font attribute.
lang: On output, contains a reference to the matched language. The language identifier will conform to the RFC 3066bis standard.
Returns a localized attribute value based on the global language list.
This function passes back the matched language in language. If localization is not possible for the attribute, the behavior matches the value returned from AttributeValue. Generally, localization of attributes is applicable to name attributes of only a normalized font descriptor.
CTFontDescriptorMBS.MatchingFontDescriptor(mandatoryAttributes() as String) as CTFontDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
mandatoryAttributes: A set of attribute keys which must be identically matched in any returned font descriptors.
Returns a normalized font descriptor matching the attributes present in descriptor.
The original descriptor may be returned in normalized form. In the context of font descriptors, normalized infers that the input values were matched up with actual existing fonts, and the descriptors for those existing fonts are the returned normalized descriptors.
CTFontDescriptorMBS.MatchingFontDescriptors(mandatoryAttributes() as String) as CTFontDescriptorMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
mandatoryAttributes: A set of attribute keys that must be identically matched in any returned font descriptors.
Returns an array of normalized font descriptors matching the attributes present in descriptor.
If descriptor itself is normalized, then the array will contain only one item: the original descriptor. In the context of font descriptors, normalized infers that the input values were matched up with actual existing fonts, and the descriptors for those existing fonts are the returned normalized descriptors.
The items on this page are in the following plugins: MBS MacCG Plugin.