Platforms to show: All Mac Windows Linux Cross-Platform

NSFontMBS.boldSystemFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the Aqua system font used for standard interface items that are rendered in boldface type in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.boldSystemFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande-Bold 12.00 pt. P [] (0x1c082c0) fobj=0x1c09d30, spc=3.96"
Notes: If fontSize is 0 or negative, returns the boldface system font at the default size.

Feedback, Comments & Corrections

NSFontMBS.controlContentFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used for the content of controls in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.controlContentFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x16017750) fobj=0x160175c0, spc=3.80"
Notes: For example, in a table, the user's input uses the control content font, and the table's header uses another font. If fontSize is 0 or negative, returns the control content font at the default size.

Feedback, Comments & Corrections

NSFontMBS.fontWithDescriptor(fontDescriptor as NSFontDescriptorMBS, fontSize as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 12.1 Yes No No All
Function: Returns a font object for the specified font descriptor and font size.
Notes:
fontDescriptor: A font descriptor object.
fontSize: The size in points to which the font is scaled.

Returns a font object for the specified descriptor and size.

In most cases, you can simply use fontWithName to create standard scaled fonts.
Available in Mac OS X v10.4 and later.

See also:

Feedback, Comments & Corrections

NSFontMBS.fontWithDescriptor(fontDescriptor as NSFontDescriptorMBS, TextTransform as Variant) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 12.1 Yes No No All
Function: Returns a font object for the specified font descriptor and text transform.
Notes:
fontDescriptor: The font descriptor object describing the font to return.
textTransform: An affine transformation applied to the font. Must be a NSAffineTransformMBS object or nil!

Returns a font object for the specified name and transform.

In most cases, you can simply use fontWithName to create standard scaled fonts. If textTransform is non-nil, it has precedence over NSFontMatrixAttribute in fontDescriptor.

Available in Mac OS X v10.4 and later.

See also:

Feedback, Comments & Corrections

NSFontMBS.fontWithName(fontName as string, fontSize as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Creates a font object for the specified font name and font size.
Example:
dim n as NSFontMBS = NSFontMBS.fontWithName("Monaco", 12)

MsgBox n.description
// shows: "Monaco 12.00 pt. P [] (0x1805020) fobj=0x168114b0, spc=7.20"
Notes:
The fontName is a fully specified family-face name, such as Helvetica-BoldOblique or Times-Roman. The fontSize is equivalent to using a font matrix of [fontSize 0 0 fontSize 0 0] . If you use a fontSize of 0.0, this method uses the default User Font size.

Fonts created with this method automatically flip themselves in flipped views. This method is the preferred means for creating fonts.

Feedback, Comments & Corrections

NSFontMBS.labelFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the Aqua font used for standard interface labels in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.labelFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x1829350) fobj=0x18293f0, spc=3.80"
Notes: If fontSize is 0 or negative, returns the label font with the default size.

Feedback, Comments & Corrections

NSFontMBS.labelFontSize as Double
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the size of the standard label font.
Example:
MsgBox str(NSFontMBS.labelFontSize) // shows 10

Feedback, Comments & Corrections

NSFontMBS.menuBarFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used for menu bar items, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.menuBarFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x17e00c00) fobj=0x17e00ca0, spc=3.80"
Notes:
If fontSize is 0 or negative, returns the menu bar font with the default size.
Available in Mac OS X v10.3 and later.

Feedback, Comments & Corrections

NSFontMBS.menuFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used for menu items, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.menuFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x1da6d80) fobj=0x1da6e20, spc=3.80"
Notes: If fontSize is 0 or negative, returns the menu items font with the default size.

Feedback, Comments & Corrections

NSFontMBS.messageFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used for standard interface items, such as button labels, menu items, and so on, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.messageFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x1c11520) fobj=0x1c11790, spc=3.80"
Notes: If fontSize is 0 or negative, returns this font at the default size. This method is equivalent to systemFontOfSize().

Feedback, Comments & Corrections

NSFontMBS.paletteFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used for palette window title bars, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.paletteFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x18800c00) fobj=0x18800ca0, spc=3.80"
Notes: If fontSize is 0 or negative, returns the palette title font at the default size.

Feedback, Comments & Corrections

NSFontMBS.setUserFixedPitchFont(font as NSFontMBS)
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.6 Yes No No All
Function: Sets the font used by default for documents and other text under the user's control, when that font should be fixed-pitch, to the specified font.
Notes: Specifying font as nil causes the default to be removed from the application domain.

Feedback, Comments & Corrections

NSFontMBS.setUserFont(font as NSFontMBS)
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.6 Yes No No All
Function: Sets the font used by default for documents and other text under the user's control to the specified font.
Notes: Specifying font as nil causes the default to be removed from the application domain.

Feedback, Comments & Corrections

NSFontMBS.smallSystemFontSize as Double
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the size of the standard small system font.
Example:
MsgBox str(NSFontMBS.smallSystemFontSize) // shows 11

Feedback, Comments & Corrections

NSFontMBS.systemFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the Aqua system font used for standard interface items, such as button labels, menu items, and so on, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.systemFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x17e009d0) fobj=0x17e00ca0, spc=3.80"
Notes: If fontSize is 0 or negative, returns the system font at the default size.

Feedback, Comments & Corrections

NSFontMBS.systemFontSize as Double
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the size of the standard system font.
Example:
MsgBox str(NSFontMBS.systemFontSize) // shows 13

Feedback, Comments & Corrections

NSFontMBS.systemFontSizeForControlSize(controlSize as Integer) as Double
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No Desktop, Console & Web
Function: Returns the font size used for the specified control size.
Example:
MsgBox str(NSFontMBS.systemFontSizeForControlSize(0)) // 13
MsgBox str(NSFontMBS.systemFontSizeForControlSize(1)) // 11
Notes:
If controlSize does not correspond to a valid NSControlSize, returns the size of the standard system font.
Available in Mac OS X v10.3 and later.

Feedback, Comments & Corrections

NSFontMBS.titleBarFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used for window title bars, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.titleBarFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x1a31b20) fobj=0x1a31bc0, spc=3.80"
Notes: If fontSize is 0 or negative, returns the title bar font at the default size. This method is equivalent to boldSystemFontOfSize.

Feedback, Comments & Corrections

NSFontMBS.toolTipsFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used for tool tips labels, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.toolTipsFontOfSize(12)

MsgBox n.description
// shows: "LucidaGrande 12.00 pt. P [] (0x1828db0) fobj=0x1828e50, spc=3.80"
Notes: If fontSize is 0 or negative, returns the tool tips font at the default size.

Feedback, Comments & Corrections

NSFontMBS.userFixedPitchFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used by default for documents and other text under the user's control (that is, text whose font the user can normally change), when that font should be fixed-pitch, in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.userFixedPitchFontOfSize(12)

MsgBox n.description
// shows: "Monaco 12.00 pt. P [] (0x1ad13a0) fobj=0x1ac2bd0, spc=7.20"
Notes:
If fontSize is 0 or negative, returns the fixed-pitch font at the default size.

The system does not guarantee that all the glyphs in a fixed-pitch font are the same width. For example, certain Japanese fonts are dual-pitch, and other fonts may have nonspacing marks that can affect the display of other glyphs.

Feedback, Comments & Corrections

NSFontMBS.userFontOfSize(size as Double) as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Targets
shared method Cocoa MBS MacBase Plugin 9.3 Yes No No All
Function: Returns the font used by default for documents and other text under the user's control (that is, text whose font the user can normally change), in the specified size.
Example:
dim n as NSFontMBS = NSFontMBS.userFontOfSize(12)

MsgBox n.description
// shows: "Helvetica 12.00 pt. P [] (0x19019b0) fobj=0x181fd00, spc=3.33"
Notes: If fontSize is 0 or negative, returns the user font at the default size.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo Plugins