Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSFontMBS class.

NSFontMBS.ascender as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the top y-coordinate, offset from the baseline, of the receiver's longest ascender.

(Read only property)

NSFontMBS.boundingRectForFont as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the receiver's bounding rectangle, scaled to the font's size.

The bounding rectangle is the union of the bounding rectangles of every glyph in the font.
(Read only property)

NSFontMBS.capHeight as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the receiver's cap height.

(Read only property)

NSFontMBS.coveredCharacterSet as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSCharacterSet object containing all of the nominal characters renderable by the receiver, which is all of the entries mapped in the receiver's ‘cmap' table.
Example
// get the Symbol font
dim n as NSFontMBS = NSFontMBS.fontWithName("Symbol",10)

// what characters are defined for this font?
dim c as NSCharacterSetMBS = n.coveredCharacterSet

// display a string with all the characters
MsgBox c.StringValue

Value is a NSCharacterSetMBS object. Returned as Variant to reduce plugin dependencies.
The number of glyphs supported by a given font is often larger than the number of characters contained in the character set returned by this method.
(Read only property)

NSFontMBS.descender as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the bottom y coordinate, offset from the baseline, of the receiver's longest descender.

Thus, if the longest descender extends 2 points below the baseline, descender will return –2.
(Read only property)

NSFontMBS.description as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.8 ✅ Yes ❌ No ❌ No ✅ Yes All
The description of the font.
Example
dim n as NSFontMBS = NSFontMBS.systemFontOfSize(12)
MsgBox n.description

(Read only property)

NSFontMBS.displayName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The (localized) display name of the font.
Example
dim n as NSFontMBS = NSFontMBS.fontWithName("Monaco", 12)

MsgBox n.displayName // shows "Monaco"

(Read only property)

NSFontMBS.familyName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The family name of the font.
Example
dim n as NSFontMBS = NSFontMBS.fontWithName("Monaco", 12)

MsgBox n.familyName // shows "Monaco"

(Read only property)

NSFontMBS.fontName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The name of the font.
Example
dim n as NSFontMBS = NSFontMBS.fontWithName("Monaco", 12)

MsgBox n.fontName // shows "Monaco"

(Read only property)

NSFontMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 11.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal reference to the NSFont object.

(Read and Write property)

NSFontMBS.isFixedPitch as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns a Boolean value indicating whether all glyphs in the receiver have the same advancement.

Returns true if all glyphs in the receiver have the same advancement; false if any advancements differ.

Some Japanese fonts encoded with the scheme "EUC12-NJE-CFEncoding" return that they have the same advancement, but actually encode glyphs with one of two advancements, for historical compatibility. You may need to handle such fonts specially for some applications.
(Read only property)

NSFontMBS.italicAngle as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the receiver's italic angle, the amount that the font is slanted in degrees counterclockwise from the vertical, as read from its AFM file.

Because the slant is measured counterclockwise, English italic fonts typically return a negative value.
(Read only property)

NSFontMBS.leading as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the receiver's leading.

Available in Mac OS X v10.4 and later.
(Read only property)

NSFontMBS.maximumAdvancement as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the greatest advancement of any of the receiver's glyphs.

This advancement is always either strictly horizontal or strictly vertical.
(Read only property)

NSFontMBS.mostCompatibleStringEncoding as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the string encoding that works best with the receiver, where there are the fewest possible unmatched characters in the string encoding and glyphs in the font.

You can use NSString‘s dataUsingEncoding method to convert the string to this encoding.
If this method returns NSASCIIStringEncoding, it could not determine the correct encoding and assumed that the font can render only ASCII characters.
This method works heuristically using well-known font encodings, so for nonstandard encodings it may not in fact return the optimal string encoding.
(Read only property)

NSFontMBS.numberOfGlyphs as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the number of glyphs in the receiver.
Example
dim n as NSFontMBS = NSFontMBS.fontWithName("Monaco", 12)

MsgBox str(n.numberOfGlyphs) // 1678

Glyphs are numbered starting at 0.
(Read only property)

NSFontMBS.pointSize as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the receiver's point size, or the effective vertical point size for a font with a nonstandard matrix.

(Read only property)

NSFontMBS.printerFont as NSFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the scalable PostScript font corresponding to itself.

When sent to a font object representing a scalable PostScript font, returns self. When sent to a font object representing a bitmapped screen font, returns its corresponding scalable PostScript font.
(Read only property)

NSFontMBS.renderingMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the rendering mode of the receiver.

Available in Mac OS X v10.4 and later.
(Read only property)

NSFontMBS.screenFont as NSFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the bitmapped screen font corresponding to itself.

When sent to a font object representing a scalable PostScript font, returns a bitmapped screen font matching the receiver in typeface and matrix (or size), or nil if such a font can't be found. When sent to a font object representing a bitmapped screen font, returns nil.

Screen fonts are for direct use with the window server only. Never use them with Application Kit objects, such as in setFont: methods. Internally, the Application Kit automatically uses the corresponding screen font for a font object as long as the view is not rotated or scaled.
(Read only property)

NSFontMBS.textTransform as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the current transformation matrix for the receiver.

Available in Mac OS X v10.4 and later.

Returns NSAffineTransformMBS. Returned as Variant to reduce plugin dependencies.
(Read only property)

NSFontMBS.underlinePosition as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the baseline offset that should be used when drawing underlines with the receiver, as determined by the font's AFM file.

This value is usually negative, which must be considered when drawing in a flipped coordinate system.
(Read only property)

NSFontMBS.underlineThickness as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the thickness that should be used when drawing underlines with the receiver, as determined by the font's AFM file.

(Read only property)

NSFontMBS.xHeight as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the x-height of the font.

(Read only property)

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


The biggest plugin in space...