Platforms to show: All Mac Windows Linux Cross-Platform

Back to CoreTextMBS class.

Next items

CoreTextMBS.AutoActivationSetting(BundleID as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The auto-activation setting for the specified bundle identifier.

bundleID: The bundle identifier used to specify a particular application bundle. If "", the current application bundle is used. If kCTFontManagerBundleIdentifier is specified, sets global auto-activation.
(Read and Write computed property)

CoreTextMBS.AvailableFontFamilyNames as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array of visible font family names sorted for user interface display.

Some examples using this method:

CoreTextMBS.AvailableFontURLs as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an array of font URLs.

CoreTextMBS.AvailablePostScriptNames as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array of unique PostScript font names for the fonts.

Some examples using this method:

CoreTextMBS.CompareFontFamilyNames(name1 as string, name2 as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A comparator function to compare font family names and sort them according to Apple guidelines.

family1: The first localized font family name to compare, as a string.
family2: The second localized font family name to compare, as a string.

Returns a CFComparisonResult value indicating the sort order for the two family names. kCFComparisonResultGreatherThan (1) if family1 is greater than family2, kCFComparisonResultLessThan (-1) if family1 is less than family2, and kCFComparisonResultEqualTo (0) if they are equal.

This CFComparatorFunction function compares font family names and sorts them in the Apple preferred order, accounting for foundry prefix. Family names with recognized prefixes are sorted after the unprefixed names in prefix order.

CoreTextMBS.CoreTextVersion as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the version of the CoreText framework.

This function returns a number indicating the version of the CoreText framework. Note that framework version is not always an accurate indicator of feature availability. The recommended way to use this function is first to check that the function pointer is non nil (plugin will do and raise exceptions), followed by calling it and comparing its result to a defined constant (or constants).
Returns the version number. This value is for comparison with the constants beginning with kCTVersionNumber.

CoreTextMBS.CreateFontDescriptorFromData(data as memoryblock) 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 font descriptor representing the font in the supplied data.

Note: the font descriptor is not available through font descriptor matching.

data: A memoryblock containing font data.

Returns a font descriptor created from the data, or nil on error.

See also:

CoreTextMBS.CreateFontDescriptorFromData(data 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 font descriptor representing the font in the supplied data.

Note: the font descriptor is not available through font descriptor matching.

data: A string containing font data.

Returns a font descriptor created from the data, or nil on error.

See also:

CoreTextMBS.CreateFontDescriptorsFromFile(file as folderitem) 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 an array of font descriptors representing each of the fonts in the specified file.
Example
dim file as FolderItem = SpecialFolder.Desktop.Child("Didot.ttc")

dim descriptor() as CTFontDescriptorMBS
dim result() as string

descriptor = CoreTextMBS.CreateFontDescriptorsFromFile(file)

for i as Integer = 0 to descriptor.Ubound
result.append descriptor(i).Displayname
next

MsgBox Join(result, EndOfLine)

file: A folderitem referencing a valid font file.

CoreTextMBS.CreateFontDescriptorsFromURL(URL 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 an array of font descriptors representing each of the fonts in the specified URL.

URL: A file system URL referencing a valid font file.

CoreTextMBS.EnableFontDescriptors(descriptors() as CTFontDescriptorMBS, enable as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Enables or disables the matching font descriptors for font descriptor matching.

descriptors: Array of font descriptors.
enable: Boolean value indicating whether the fonts matching descriptors should be enabled for font descriptor matching.

CoreTextMBS.GetScopeForFile(file as folderitem) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the registration scope of the specified folderitem.

The registration scope of the specified file or kCTFontManagerScopeNone if not currently registered.
Available in OS X v10.6 and later.

CoreTextMBS.GetScopeForURL(URL as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the registration scope of the specified URL.

The registration scope of the specified URL or kCTFontManagerScopeNone if not currently registered.
Available in OS X v10.6 and later.

CoreTextMBS.IsSupportedFontFile(file as folderitem) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Determines whether the referenced font data is supported on the current platform.

Returns true if the folderitem refers to a valid font that can be used on the current platform; false otherwise.

CoreTextMBS.IsSupportedFontURL(URL as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Determines whether the referenced font data (usually by file URL) is supported on the current platform.

Returns true if the URL refers to a valid font that can be used on the current platform; false otherwise.

CoreTextMBS.kCTBaselineClassAttributeName 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 baseline class override.

Value must be one of the kCTBaselineClass constants. Normally, glyphs on the line will be assigned baseline classes according to the 'bsln' or 'BASE' table in the font. This attribute may be used to change this assignment.

see also: kCTBaselineClassRoman, kCTBaselineClassIdeographicCentered, kCTBaselineClassIdeographicLow, kCTBaselineClassIdeographicHigh, kCTBaselineClassHanging, kCTBaselineClassMath.

CoreTextMBS.kCTBaselineInfoAttributeName 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 baseline info dictionary.

Value must be a CFDictionaryRef. Normally, baseline offsets will be assigned based on the 'bsln' or 'BASE' table in the font. This attribute may be used to assign different offsets. Each key in the dictionary is one of the kCTBaselineClass constants and the value is a number of the baseline offset in points. You only need to specify the offsets you wish to change.

CoreTextMBS.kCTBaselineReferenceInfoAttributeName 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 baseline info dictionary for the reference baseline.

Value must be a Dictionary. All glyphs in a run are assigned a baseline class and then aligned to the offset for that class in the reference baseline baseline info. See the discussion of kCTBaselineInfoAttributeName for information about the contents of the dictionary. You can also use the kCTBaselineReferenceFont key to specify that the baseline offsets of a particular CTFontMBS should be used as the reference offsets.

CoreTextMBS.kCTCharacterShapeAttributeName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Controls glyph selection.

Value must be a number. Default is value is 0 (disabled). A non-zero value is interpreted as an SFNT kCharacterShapeType selector + 1; see SFNTLayoutTypes.h for selectors. For example, an attribute value of 1 corresponds to kTraditionalCharactersSelector.

CoreTextMBS.kCTFontAttributeName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The key for the font.

Value must be a CTFontMBS. Default is Helvetica 12.

Some examples using this method:

CoreTextMBS.kCTFontManagerBundleIdentifier as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
CTFontManage bundle identifier.

The CTFontManager bundle identifier to be used with get or set global auto-activation settings.

CoreTextMBS.kCTFontManagerErrorDomain as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The error domain for CoreText.

CFError objects with this domain have error codes corresponding to one of the CTFontManagerError errors listed in "Font Registration Errors" and "Font Unregistration Errors."

CoreTextMBS.kCTFontManagerErrorFontURLsKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
User info key to be used with CFError references returned from registration functions.

The value associated with this key in the user info dictionary of a CFError object is a CFArray of font URLs that failed with the given error.

CoreTextMBS.kCTFontManagerRegisteredFontsChangedNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Notification name for font registry changes.

This is the string to use as the notification name when subscribing to Core Text Font Manager notifications. This notification is posted when fonts are added to the font registry. The client is responsible for registered with the distributed notification center to receive notifications for changes to the session or user scopes, and with a local notification center for changes to the process scope.

CoreTextMBS.kCTFontSlantTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Dictionary key to access the slant trait value.

Use this key to access the normalized slant angle from the font traits dictionary. The value returned is a number representing a float value between -1.0 and 1.0 for normalized slant angle. The value or 0.0 corresponds to 0 degree clockwise rotation from the vertical and 1.0 corresponds to 30 degrees clockwise rotation.

CoreTextMBS.kCTFontSymbolicTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Dictionary key to access the symbolic traits value.

Use this key to access the symbolic traits value from the font traits dictionary. The value is returned as a number.

CoreTextMBS.kCTFontWeightTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Dictionary key to access the weight trait value.

Use this key to access the normalized weight trait from the font traits dictionary. The value returned is a number representing a float value between -1.0 and 1.0 for normalized weight. The value of 0.0 corresponds to the regular or medium font weight.

CoreTextMBS.kCTFontWidthTrait as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Dictionary key to access the width (condense/expand) trait value.

Use this key to access the normalized proportion trait from the font traits dictionary. This value corresponds to the relative inter-glyph spacing for a given font. The value returned is a number representing a float between -1.0 and 1.0. The value of 0.0 corresponds to regular glyph spacing while negative values represent condensed glyph spacing.

CoreTextMBS.kCTForegroundColorAttributeName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The key for the foreground color..

Value must be a CGColorMBS. Default value is black.

Some examples using this method:

CoreTextMBS.kCTForegroundColorFromContextAttributeName 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 font attributes.

Never set a foreground color in the CGContext; use what is set as the context's fill color.

Value must be a boolean. Default is false. The reason why this exists is because an NSAttributedString defaults to a black color if no color attribute is set. This forces CoreText to set the color in the context. This will allow developers to sidestep this, making CoreText set nothing but font information in the CGContext. If set, this attribute also determines the color used by kCTUnderlineStyleAttributeName, in which case it overrides the foreground color.

CoreTextMBS.kCTGlyphInfoAttributeName 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 font attributes.

Allows the use of unencoded glyphs.
Value must be a CTGlyphInfoMBS. The glyph specified by this CTGlyphInfo object is assigned to the entire attribute range, provided that its contents match the specified base string and that the specified glyph is available in the font specified by kCTFontAttributeName.

CoreTextMBS.kCTKernAttributeName 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 font attributes.

A kerning adjustment.
Value must be a float. Default is standard kerning. The kerning attribute indicate how many points the following character should be shifted from its default offset as defined by the current character's font in points; a positive kern indicates a shift farther along and a negative kern indicates a shift closer to the current character. If this attribute is not present, standard kerning will be used. If this attribute is set to 0.0, no kerning will be done at all.

CoreTextMBS.kCTLanguageAttributeName 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 font attributes.

Specifies text language.

Value must be a String containing a locale identifier. Default is unset. When this attribute is set to a valid identifier, it will be used to select localized glyphs (if supported by the font) and locale-specific line breaking rules.

CoreTextMBS.kCTLigatureAttributeName 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 font attributes.

Controls ligature formation.

Value must be a number. Default is int value 1. The ligature attribute determines what kinds of ligatures should be used when displaying the string. A value of 0 indicates that only ligatures essential for proper rendering of text should be used, 1 indicates that standard ligatures should be used, and 2 indicates that all available ligatures should be used. Which ligatures are standard depends on the script and possibly the font. Arabic text, for example, requires ligatures for many character sequences, but has a rich set of additional ligatures that combine characters. English text has no essential ligatures, and typically has only two standard ligatures, those for "fi" and "fl" -- all others being considered more advanced or fancy.

On iOS releases prior to 6.0 essential ligatures are applied if the font contains glyphs for any of U+FB00 through U+FB04 and the font lacks AAT or OpenType shaping tables, but as of 6.0 shaping tables (or the lack thereof) are treated as definitive. This character-based shaping will still be performed if this attribute is explicitly specified with the default value of 1.

CoreTextMBS.kCTParagraphStyleAttributeName 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 font attributes.

A CTParagraphStyle object which is used to specify things like line alignment, tab rulers, writing direction, etc.
Value must be a CTParagraphStyleMBS. Default is an empty CTParagraphStyle object.

Some examples using this method:

CoreTextMBS.kCTRunDelegateAttributeName 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 font attributes.

Allows customization of certain aspects of a range of text's appearance.

Value must be a CTRunDelegateMBS. The values returned by the embedded object for an attribute range apply to each glyph resulting from the text in that range. Because an embedded object is only a display-time modification, care should be taken to avoid applying this attribute to a range of text with complex behavior, such as a change of writing direction, combining marks, etc. Consequently, it is recommended that this attribute be applied to a range containing the single character U+FFFC.

CoreTextMBS.kCTStrokeColorAttributeName 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 font attributes.

The stroke color.
Value must be a CGColorMBS. Default is the foreground color.

CoreTextMBS.kCTStrokeWidthAttributeName 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 font attributes.

The stroke width.
Value must be a number. Default value is 0.0, or no stroke. This attribute, interpreted as a percentage of font point size, controls the text drawing mode: positive values effect drawing with stroke only; negative values are for stroke and fill. A typical value for outlined text is 3.0.

CoreTextMBS.kCTSuperscriptAttributeName 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 font attributes.

Controls vertical text positioning.
Value must be a number. Default is int value 0. If supported by the specified font, a value of 1 enables superscripting and a value of -1 enables subscripting.

CoreTextMBS.kCTUnderlineColorAttributeName 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 font attributes.

The underline color.
Value must be a CGColorMBS. Default is the foreground color.

CoreTextMBS.kCTUnderlineStyleAttributeName 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 font attributes.

Allows the setting of an underline to be applied at render time.

Value must be a number. Default is kCTUnderlineStyleNone. Set a value of something other than kCTUnderlineStyleNone to draw an underline. In addition, the CTUnderlineStyleModifiers can be used to modify the look of the underline. The underline color will be determined by the text's foreground color.

Some examples using this method:

CoreTextMBS.kCTVerticalFormsAttributeName 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 font attributes.

Controls glyph orientation.

Value must be a boolean. Default is false. A value of false indicates that horizontal glyph forms are to be used, true indicates that vertical glyph forms are to be used.

CoreTextMBS.kCTWritingDirectionAttributeName 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 font attributes.

Specifies a bidirectional override or embedding.

Value must be a CFArray of CFNumberRefs, each of which should have a value of either kCTWritingDirectionLeftToRight or kCTWritingDirectionRightToLeft, plus one of kCTWritingDirectionEmbedding or kCTWritingDirectionOverride. This array represents a sequence of nested bidirectional embeddings or overrides, in order from outermost to innermost, with (kCTWritingDirectionLeftToRight | kCTTextWritingDirectionEmbedding) corresponding to a LRE/PDF pair in plain text or <span dir="ltr"></span> in HTML, (kCTWritingDirectionRightToLeft | kCTTextWritingDirectionEmbedding) corresponding to a RLE/PDF pair in plain text or a <span dir="rtl"></span> in HTML, (kCTWritingDirectionLeftToRight | kCTTextWritingDirectionOverride) corresponding to a LRO/PDF pair in plain text or <bdo dir="ltr"></span> in HTML, and (kCTWritingDirectionRightToLeft | kCTTextWritingDirectionOverride) corresponding to a RLO/PDF pair in plain text or <bdo dir="rtl"></span> in HTML.

CoreTextMBS.MatchFontDescriptorsWithProgressHandler(descriptors() as CTFontDescriptorMBS, mandatoryAttributes() as string, tag as Variant = nil) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Matches font descriptors in background.

This function returns immediately, but can potentially take long time to process. The progress is notified via progress evnet.

descriptors: An array of descriptors to process.
mandatoryAttributes: some mandatory attributes.
Returns false if it couldn't start the work.

CoreTextMBS.RegisterFontsForFile(file as folderitem, scope as Integer, byref error as CFErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Registers fonts from the specified font URL with the Font Manager. Registered fonts are discoverable through font descriptor matching.

fontURL: The font URL.
scope: Scope constant defining the availability and lifetime of the registration. See "Font Registration Scope" for values to pass for this parameter.
error: a CFError object which, in case of failed registration, contains error information.

Returns true if registration of the fonts was successful, otherwise false.

CoreTextMBS.RegisterFontsForFiles(files() as folderitem, scope as Integer, errors() as CFErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Registers fonts from the specified array of font URLs with the Font Manager. Registered fonts are discoverable through font descriptor matching.

files: Array of font files.
scope: Scope constant defining the availability and lifetime of the registration. See "Font Registration Scope" for values to pass for this parameter.
errors: An array of CFError objects which, in case of failed registration, contain error information. Each error contains a CFArray of font URLs corresponding to kCTFontManagerErrorFontURLsKey. These URLs represent the font files that caused the error and were not successfully registered. The array must be released by the caller. Can be nil.

Returns true if registration of all font URLs was successful, otherwise false.

CoreTextMBS.RegisterFontsForURL(URL as string, scope as Integer, byref error as CFErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Registers fonts from the specified font URL with the Font Manager. Registered fonts are discoverable through font descriptor matching.

fontURL: The font URL.
scope: Scope constant defining the availability and lifetime of the registration. See "Font Registration Scope" for values to pass for this parameter.
error: a CFError object which, in case of failed registration, contains error information.

Returns true if registration of the fonts was successful, otherwise false.

See also:

CoreTextMBS.RegisterFontsForURL(URLs() as string, scope as Integer, errors() as CFErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Registers fonts from the specified array of font URLs with the Font Manager. Registered fonts are discoverable through font descriptor matching.

URLs: Array of font URLs.
scope: Scope constant defining the availability and lifetime of the registration. See "Font Registration Scope" for values to pass for this parameter.
errors: Array of CFError objects which, in case of failed registration, contain error information. Each error contains a CFArray of font URLs corresponding to kCTFontManagerErrorFontURLsKey. These URLs represent the font files that caused the error and were not successfully registered. The array must be released by the caller. Can be nil.

Returns true if registration of all font URLs was successful, otherwise false.

See also:

CoreTextMBS.RegisterGraphicsFont(font as CGFontMBS, byref error as CFErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Registers the specified graphics font with the font manager.

font: The graphics font to be registered.
error: Returns by indirection an error object in the case of failed registration.

Returns true if registration of the font was successful, otherwise false.

Registered fonts are discoverable through font descriptor matching. Any attempt to register a font that is either already registered or contains the same Postscript of an already registered font will fail. This behavior is useful for fonts that may be embedded in documents or constructed in memory. A graphics font is obtained by calling CGFontMBS.CreateWithDataProvider. Fonts that are backed by files should be registered using CoreTextMBS.RegisterFontsForURL.

Next items

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


The biggest plugin in space...