Platforms to show: All Mac Windows Linux Cross-Platform

NSFontMBS.ascender as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the top y-coordinate, offset from the baseline, of the receiver's longest ascender.
Notes: (Read only property)

Feedback, Comments & Corrections

NSFontMBS.boundingRectForFont as NSRectMBS
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the receiver's bounding rectangle, scaled to the font's size.
Notes:
The bounding rectangle is the union of the bounding rectangles of every glyph in the font.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.capHeight as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the receiver's cap height.
Notes: (Read only property)

Feedback, Comments & Corrections

NSFontMBS.coveredCharacterSet as Variant
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.6 Yes No No All
Function: 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
Notes:
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)

Feedback, Comments & Corrections

NSFontMBS.descender as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the bottom y coordinate, offset from the baseline, of the receiver's longest descender.
Notes:
Thus, if the longest descender extends 2 points below the baseline, descender will return –2.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.description as string
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.8 Yes No No All
Function: The description of the font.
Example:
dim n as NSFontMBS = NSFontMBS.systemFontOfSize(12)
MsgBox n.description
Notes: (Read only property)

Feedback, Comments & Corrections

NSFontMBS.displayName as string
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 8.0 Yes No No All
Function: The (localized) display name of the font.
Example:
dim n as NSFontMBS = NSFontMBS.fontWithName("Monaco", 12)

MsgBox n.displayName // shows "Monaco"
Notes: (Read only property)

Feedback, Comments & Corrections

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

MsgBox n.familyName // shows "Monaco"
Notes: (Read only property)

Feedback, Comments & Corrections

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

MsgBox n.fontName // shows "Monaco"
Notes: (Read only property)

Feedback, Comments & Corrections

NSFontMBS.Handle as Integer
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 11.0 Yes No No All
Function: The internal reference to the NSFont object.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSFontMBS.isFixedPitch as boolean
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns a Boolean value indicating whether all glyphs in the receiver have the same advancement.
Notes:
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)

Feedback, Comments & Corrections

NSFontMBS.italicAngle as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: 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.
Notes:
Because the slant is measured counterclockwise, English italic fonts typically return a negative value.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.leading as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the receiver's leading.
Notes:
Available in Mac OS X v10.4 and later.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.maximumAdvancement as NSSizeMBS
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the greatest advancement of any of the receiver's glyphs.
Notes:
This advancement is always either strictly horizontal or strictly vertical.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.mostCompatibleStringEncoding as Integer
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.6 Yes No No All
Function: 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.
Notes:
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)

Feedback, Comments & Corrections

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

MsgBox str(n.numberOfGlyphs) // 1678
Notes:
Glyphs are numbered starting at 0.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.pointSize as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the receiver's point size, or the effective vertical point size for a font with a nonstandard matrix.
Notes: (Read only property)

Feedback, Comments & Corrections

NSFontMBS.printerFont as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the scalable PostScript font corresponding to itself.
Notes:
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)

Feedback, Comments & Corrections

NSFontMBS.renderingMode as Integer
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the rendering mode of the receiver.
Notes:
Available in Mac OS X v10.4 and later.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.screenFont as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the bitmapped screen font corresponding to itself.
Notes:
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)

Feedback, Comments & Corrections

NSFontMBS.textTransform as Variant
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.6 Yes No No All
Function: Returns the current transformation matrix for the receiver.
Notes:
Available in Mac OS X v10.4 and later.

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

Feedback, Comments & Corrections

NSFontMBS.underlinePosition as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No Desktop, Console & Web
Function: Returns the baseline offset that should be used when drawing underlines with the receiver, as determined by the font's AFM file.
Notes:
This value is usually negative, which must be considered when drawing in a flipped coordinate system.
(Read only property)

Feedback, Comments & Corrections

NSFontMBS.underlineThickness as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No Desktop, Console & Web
Function: Returns the thickness that should be used when drawing underlines with the receiver, as determined by the font's AFM file.
Notes: (Read only property)

Feedback, Comments & Corrections

NSFontMBS.xHeight as Double
Type Topic Plugin Version macOS Windows Linux Targets
property Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the x-height of the font.
Notes: (Read only property)

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo tutorial videos