Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGFontMBS class.

CGFontMBS.Ascent as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the ascent of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.Ascent)

The ascent is the maximum distance above the baseline of glyphs in a font. The value is specified in glyph space units.
(Read only property)

CGFontMBS.CapHeight as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the cap height of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.CapHeight)

The cap height is the distance above the baseline of the top of flat capital letters of glyphs in a font. The value is specified in glyph space units.
(Read only property)

CGFontMBS.Descent as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the descent of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.Descent)

The descent is the maximum distance below the baseline of glyphs in a font. The value is specified in glyph space units.
(Read only property)

CGFontMBS.FontBBox as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the bounding box of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
dim r as CGRectMBS = c.FontBBox
MsgBox str(r.Width)+" "+str(r.Height)

The font bounding box is the union of all of the bounding boxes for all the glyphs in a font. The value is specified in glyph space units.
(Read only property)

CGFontMBS.FullName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the full name associated with a font object.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Courier")
MsgBox c.FullName

(Read only property)

CGFontMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal object reference.

(Read and Write property)

CGFontMBS.ItalicAngle as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the italic angle of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.ItalicAngle)

The italic angle of the font, measured in degrees counter-clockwise from the vertical.
(Read only property)

CGFontMBS.Leading as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the leading of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.Leading)

The leading is the spacing between consecutive lines of text in a font. The value is specified in glyph space units.
(Read only property)

CGFontMBS.NumberOfGlyphs as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the number of glyphs in a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.NumberOfGlyphs)

(Read only property)

CGFontMBS.PostScriptName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Obtains the PostScript name of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Courier")
MsgBox c.PostScriptName

(Read only property)

CGFontMBS.StemV as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the thickness of the dominant vertical stems of glyphs in a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.StemV)

The thickness of the dominant vertical stems of glyphs in a font.
(Read only property)

CGFontMBS.UnitsPerEm as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the number of glyph space units per em for the provided font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.UnitsPerEm)

The number of glyph space units per em for the provided font.
(Read only property)

CGFontMBS.XHeight as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the x-height of a font.
Example
dim c as CGFontMBS = CGFontMBS.CreateWithFontName("Times")
MsgBox str(c.XHeight)

The x-height is the distance above the baseline of the top of flat, non-ascending lowercase letters (such as x) of glyphs in a font. The value is specified in glyph space units.
(Read only property)

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


The biggest plugin in space...