Vuo  2.3.2
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VuoRendererFonts Class Reference

Description

Provides fonts for rendered items in a composition.

Definition at line 15 of file VuoRendererFonts.hh.

Public Member Functions

QFont nodeTitleFont (void)
 Returns the font for a node's title. More...
 
QFont nodeClassFont (void)
 Returns the font for a node's class name. More...
 
QFont nodePortTitleFont (void)
 Returns the font for a port's title. More...
 
QFont nodePortConstantFont (void)
 Returns the font for a port's constant flag or typecast. More...
 
QFont portPopoverFont (void)
 Returns the font for a port's popover text. More...
 
QFont dialogHeadingFont ()
 Returns the font for dialog box headings. More...
 
QFont dialogBodyFont ()
 Returns the font for text in dialog boxes. More...
 
QFont commentFont (void)
 Returns the font for comments. More...
 
QString getCSS (QFont font)
 Returns a CSS string selecting the specified font. More...
 

Static Public Member Functions

static VuoRendererFontsgetSharedFonts (void)
 Returns a shared font provider. More...
 
static double getHorizontalOffset (const QFont font, const QString text)
 Returns the horizontal distance between the left side of the bounding box and the left side of the first glyph in text, to compensate for the empty space left of the first glyph that causes multiple lines of text to appear misaligned. More...
 

Static Public Attributes

static const qreal thickPenWidth = 20
 Width, in pixels at 1:1 zoom, of the top and bottom node edges. Many other drawing metrics are based on this value. More...
 
static const qreal midPenWidth = VuoRendererFonts::thickPenWidth/10.0
 Width, in pixels at 1:1 zoom, of typecast port edges. More...
 
static const QString fontFamily = "PT Sans"
 The font family used to render all text in Vuo. More...
 
static const qreal nodeTitleFontSize = 13
 Size, in typographic points, of the node's title. More...
 
static const qreal nodeClassFontSize = 10
 Size, in typographic points, of the node's class name. More...
 
static const qreal portTitleFontSize = 11
 Size, in typographic points, of the node's port labels. More...
 
static const qreal portDetailFontSize = 10
 Size, in typographic points, of port constant flag and typeconverter text. More...
 

Member Function Documentation

◆ commentFont()

QFont VuoRendererFonts::commentFont ( void  )

Returns the font for comments.

Definition at line 136 of file VuoRendererFonts.cc.

◆ dialogBodyFont()

QFont VuoRendererFonts::dialogBodyFont ( )

Returns the font for text in dialog boxes.

Definition at line 128 of file VuoRendererFonts.cc.

◆ dialogHeadingFont()

QFont VuoRendererFonts::dialogHeadingFont ( )

Returns the font for dialog box headings.

Definition at line 120 of file VuoRendererFonts.cc.

◆ getCSS()

QString VuoRendererFonts::getCSS ( QFont  font)

Returns a CSS string selecting the specified font.

Definition at line 158 of file VuoRendererFonts.cc.

◆ getHorizontalOffset()

double VuoRendererFonts::getHorizontalOffset ( const QFont  font,
const QString  text 
)
static

Returns the horizontal distance between the left side of the bounding box and the left side of the first glyph in text, to compensate for the empty space left of the first glyph that causes multiple lines of text to appear misaligned.

Definition at line 145 of file VuoRendererFonts.cc.

◆ getSharedFonts()

VuoRendererFonts * VuoRendererFonts::getSharedFonts ( void  )
static

Returns a shared font provider.

Don't free this object.

Definition at line 29 of file VuoRendererFonts.cc.

◆ nodeClassFont()

QFont VuoRendererFonts::nodeClassFont ( void  )

Returns the font for a node's class name.

Definition at line 88 of file VuoRendererFonts.cc.

◆ nodePortConstantFont()

QFont VuoRendererFonts::nodePortConstantFont ( void  )

Returns the font for a port's constant flag or typecast.

Definition at line 104 of file VuoRendererFonts.cc.

◆ nodePortTitleFont()

QFont VuoRendererFonts::nodePortTitleFont ( void  )

Returns the font for a port's title.

Definition at line 96 of file VuoRendererFonts.cc.

◆ nodeTitleFont()

QFont VuoRendererFonts::nodeTitleFont ( void  )

Returns the font for a node's title.

Definition at line 80 of file VuoRendererFonts.cc.

◆ portPopoverFont()

QFont VuoRendererFonts::portPopoverFont ( void  )

Returns the font for a port's popover text.

Definition at line 112 of file VuoRendererFonts.cc.

Member Data Documentation

◆ fontFamily

const QString VuoRendererFonts::fontFamily = "PT Sans"
static

The font family used to render all text in Vuo.

Definition at line 25 of file VuoRendererFonts.hh.

◆ midPenWidth

const qreal VuoRendererFonts::midPenWidth = VuoRendererFonts::thickPenWidth/10.0
static

Width, in pixels at 1:1 zoom, of typecast port edges.

Definition at line 23 of file VuoRendererFonts.hh.

◆ nodeClassFontSize

const qreal VuoRendererFonts::nodeClassFontSize = 10
static

Size, in typographic points, of the node's class name.

Definition at line 28 of file VuoRendererFonts.hh.

◆ nodeTitleFontSize

const qreal VuoRendererFonts::nodeTitleFontSize = 13
static

Size, in typographic points, of the node's title.

Definition at line 27 of file VuoRendererFonts.hh.

◆ portDetailFontSize

const qreal VuoRendererFonts::portDetailFontSize = 10
static

Size, in typographic points, of port constant flag and typeconverter text.

Definition at line 30 of file VuoRendererFonts.hh.

◆ portTitleFontSize

const qreal VuoRendererFonts::portTitleFontSize = 11
static

Size, in typographic points, of the node's port labels.

Definition at line 29 of file VuoRendererFonts.hh.

◆ thickPenWidth

const qreal VuoRendererFonts::thickPenWidth = 20
static

Width, in pixels at 1:1 zoom, of the top and bottom node edges. Many other drawing metrics are based on this value.

Definition at line 22 of file VuoRendererFonts.hh.


The documentation for this class was generated from the following files: