Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

CoreTextMBS.kCTForegroundColorFromContextAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTGlyphInfoAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTKernAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTLanguageAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTLigatureAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTParagraphStyleAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTRunDelegateAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTStrokeColorAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
The stroke color.
Value must be a CGColorMBS. Default is the foreground color.

Feedback, Comments & Corrections

CoreTextMBS.kCTStrokeWidthAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTSuperscriptAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTUnderlineColorAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
The underline color.
Value must be a CGColorMBS. Default is the foreground color.

Feedback, Comments & Corrections

CoreTextMBS.kCTUnderlineStyleAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTVerticalFormsAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.kCTWritingDirectionAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: One of the keys for font attributes.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.MatchFontDescriptorsWithProgressHandler(descriptors() as CTFontDescriptorMBS, mandatoryAttributes() as string, tag as Variant = nil) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Matches font descriptors in background.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.RegisterFontsForFile(file as folderitem, scope as Integer, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Registers fonts from the specified font URL with the Font Manager. Registered fonts are discoverable through font descriptor matching.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.RegisterFontsForFiles(files() as folderitem, scope as Integer, errors() as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Registers fonts from the specified array of font URLs with the Font Manager. Registered fonts are discoverable through font descriptor matching.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.RegisterFontsForURL(URL as string, scope as Integer, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Registers fonts from the specified font URL with the Font Manager. Registered fonts are discoverable through font descriptor matching.
Notes:
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:

Feedback, Comments & Corrections

CoreTextMBS.RegisterFontsForURL(URLs() as string, scope as Integer, errors() as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Registers fonts from the specified array of font URLs with the Font Manager. Registered fonts are discoverable through font descriptor matching.
Notes:
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:

Feedback, Comments & Corrections

CoreTextMBS.RegisterGraphicsFont(font as CGFontMBS, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Registers the specified graphics font with the font manager.
Notes:
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.

Feedback, Comments & Corrections

CoreTextMBS.UnregisterFontsForFile(file as folderitem, scope as Integer, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Unregisters fonts from the specified font URL with the Font Manager. Unregistered fonts are no longer discoverable through font descriptor matching.
Notes:
URL: 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 unregistration of the fonts was successful, otherwise false.

Feedback, Comments & Corrections

CoreTextMBS.UnregisterFontsForFiles(files() as folderitem, scope as Integer, errors() as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Unregisters fonts from the specified array of font URLs with the Font Manager. Unregistered fonts are no longer discoverable through font descriptor matching.
Notes:
files: Array of font folderitems.
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.

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

Feedback, Comments & Corrections

CoreTextMBS.UnregisterFontsForURL(URL as string, scope as Integer, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Unregisters fonts from the specified font URL with the Font Manager. Unregistered fonts are no longer discoverable through font descriptor matching.
Notes:
URL: 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 unregistration of the fonts was successful, otherwise false.

Feedback, Comments & Corrections

CoreTextMBS.UnregisterFontsForURLs(URLs() as string, scope as Integer, errors() as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Unregisters fonts from the specified array of font URLs with the Font Manager. Unregistered fonts are no longer discoverable through font descriptor matching.
Notes:
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: 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.

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

Feedback, Comments & Corrections

CoreTextMBS.UnregisterGraphicsFont(font as CGFontMBS, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreText MBS MacCG Plugin 14.2 Yes No No Yes, macOS only No
Function: Unregisters the specified graphics font with the font manager.
Notes:
font: The graphics font to be unregistered.
error: Returns by indirection an error object in the case of failed unregistration.

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

Unregistered fonts are no longer discoverable through font descriptor matching. Fonts that are backed by files should be unregistered using CTFontManagerUnregisterFontsForURL.

Feedback, Comments & Corrections

Previous items

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

The biggest plugin in space...




Links
MBS Xojo PDF Plugins