Platforms to show: All Mac Windows Linux Cross-Platform
NSFontMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa | MBS MacBase Plugin | 8.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 24 properties
- property ascender as Double
- property boundingRectForFont as NSRectMBS
- property capHeight as Double
- property coveredCharacterSet as Variant
- property descender as Double
- property description as string
- property displayName as string
- property familyName as string
- property fontName as string
- property Handle as Integer
- property isFixedPitch as boolean
- property italicAngle as Double
- property leading as Double
- property maximumAdvancement as NSSizeMBS
- property mostCompatibleStringEncoding as Integer
- property numberOfGlyphs as Integer
- property pointSize as Double
- property printerFont as NSFontMBS
- property renderingMode as Integer
- property screenFont as NSFontMBS
- property textTransform as Variant
- property underlinePosition as Double
- property underlineThickness as Double
- property xHeight as Double
- 7 methods
- method advancementForGlyph(aGlyph as Integer) as NSSizeMBS
- method boundingRectForGlyph(aGlyph as Integer) as NSRectMBS
- method Constructor Private
- method file as folderitem
- method fontDescriptor as NSFontDescriptorMBS
- method glyphWithName(name as string) as UInt32
- method screenFontWithRenderingMode(renderingMode as Integer) as NSFontMBS
- 23 shared methods
- shared method boldSystemFontOfSize(size as Double) as NSFontMBS
- shared method controlContentFontOfSize(size as Double) as NSFontMBS
- shared method fontWithDescriptor(fontDescriptor as NSFontDescriptorMBS, fontSize as Double) as NSFontMBS
- shared method fontWithDescriptor(fontDescriptor as NSFontDescriptorMBS, TextTransform as Variant) as NSFontMBS
- shared method fontWithName(fontName as string, fontSize as Double) as NSFontMBS
- shared method labelFontOfSize(size as Double) as NSFontMBS
- shared method labelFontSize as Double
- shared method menuBarFontOfSize(size as Double) as NSFontMBS
- shared method menuFontOfSize(size as Double) as NSFontMBS
- shared method messageFontOfSize(size as Double) as NSFontMBS
- shared method monospacedDigitSystemFontOfSize(fontSize as double, weight as double) as NSFontMBS
- shared method monospacedSystemFontOfSize(fontSize as double, weight as double) as NSFontMBS
- shared method paletteFontOfSize(size as Double) as NSFontMBS
- shared method setUserFixedPitchFont(font as NSFontMBS)
- shared method setUserFont(font as NSFontMBS)
- shared method smallSystemFontSize as Double
- shared method systemFontOfSize(size as Double) as NSFontMBS
- shared method systemFontSize as Double
- shared method systemFontSizeForControlSize(controlSize as Integer) as Double
- shared method titleBarFontOfSize(size as Double) as NSFontMBS
- shared method toolTipsFontOfSize(size as Double) as NSFontMBS
- shared method userFixedPitchFontOfSize(size as Double) as NSFontMBS
- shared method userFontOfSize(size as Double) as NSFontMBS
- 7 constants
Constants
Constant | Value | Description |
---|---|---|
NSControlGlyph | &hFFFFFF |
One of the constants define reserved glyph codes.
NSGlyphGenerator generates NSControlGlyph for all characters in the Unicode General Category C* and U200B (ZERO WIDTH SPACE). |
NSFontAntialiasedIntegerAdvancementsRenderingMode | 3 |
One of the constants specify the font rendering mode.
Specifies antialiased, integer advancements rendering mode. Available in Mac OS X v10.4 and later. |
NSFontAntialiasedRenderingMode | 1 |
One of the constants specify the font rendering mode.
Specifies antialiased, floating-point advancements rendering mode (synonymous with printerFont). Available in Mac OS X v10.4 and later. |
NSFontDefaultRenderingMode | 0 |
One of the constants specify the font rendering mode.
Determines the actual mode based on the user preference settings. Available in Mac OS X v10.4 and later. |
NSFontIntegerAdvancementsRenderingMode | 2 |
One of the constants specify the font rendering mode.
Specifies integer advancements rendering mode. Available in Mac OS X v10.4 and later. |
NSNativeShortGlyphPacking | 5 | A constant for glyph packing. The native format for Mac OS X. more |
NSNullGlyph | 0 |
One of the constants define reserved glyph codes.
A null glyph. |
This class has no sub classes.
Some methods using this class:
- NSFontManagerMBS.convertFontToFace(font as NSFontMBS, face as string) as NSFontMBS
- NSFontManagerMBS.convertFontToHaveTrait(font as NSFontMBS, trait as Integer) as NSFontMBS
- NSFontManagerMBS.selectedFont as NSFontMBS
- NSFontManagerMBS.setSelectedFont(font as NSFontMBS, isMultiple as boolean)
- NSFontManagerMBS.traitsOfFont(font as NSFontMBS) as Integer
- NSFontManagerMBS.weightOfFont(font as NSFontMBS) as Integer
- NSFontPanelMBS.convertFont(oldFont as NSFontMBS) as NSFontMBS
- NSFontPanelMBS.panelConvertFont(font as NSFontMBS) as NSFontMBS
- NSFontPanelMBS.setPanelFont(font as NSFontMBS, isMultiple as boolean)
- NSTextMBS.setFontForRange(font as NSFontMBS, start as Integer, length as Integer)
Some properties using for this class:
- NSCellMBS.font as NSFontMBS
- NSFontMBS.printerFont as NSFontMBS
- NSLayoutManagerMBS.font as NSFontMBS
- NSSliderMBS.titleFont as NSFontMBS
- PDFAnnotationFreeTextMBS.font as NSFontMBS
- PDFAnnotationMBS.font as NSFontMBS
- PDFAnnotationTextWidgetMBS.font as NSFontMBS
- SCNTextMBS.font as NSFontMBS
- NSBoxMBS.titleFont as NSFontMBS
- NSTabViewMBS.font as NSFontMBS
Some examples using this class:
- /MacCocoa/Fonts and Font Families
- /MacCocoa/Text in titlebar
- /MacCocoa/TextHeight calculation
- /MacControls/Label with Color
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Simple Demo with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListboxTV with ContainerControl Cells
- /MacControls/NSTextView Selection
- /PDFKit/Create Page
- /PDFKit/Create Page with custom stamp annotation
Blog Entries
- News from the MBS Xojo Plugins Version 22.4
- MBS Xojo Plugins in version 22.4
- MBS Xojo Plugins, version 22.4pr5
- Styled Text for Labels in your Xojo iOS app
- Apply fonts to font PopupMenu
- MBS Xojo / Real Studio Plugins, version 14.3pr2
- MBS Xojo / Real Studio Plugins, version 13.2pr1
- CocoaBase needs MacOSXCG
- MBS Real Studio Plugins, version 12.1pr10
- MBS REALbasic Plugins, version 10.6pr2
Xojo Developer Magazine
Release notes
- Version 22.4
- Added monospacedDigitSystemFontOfSize and monospacedSystemFontOfSize functions to NSFontMBS class.
The items on this page are in the following plugins: MBS MacBase Plugin.
NSFontManagerMBS - NSFontPanelMBS