FontSettings

Detailed Description

Enumerations

enum  AntialiasingStyle { SubpixelAntialiasing , GrayscaleAntialiasing , SubpixelAntialiasingUnlessHighDPI , NoAntialiasing }
 

Functions

int getDefaultFontSize ()
 Returns the default font size for the current platform. More...
 
std::string getDefaultApplicationFontName ()
 Returns the default application font name. More...
 
QFont getDefaultApplicationFont ()
 Returns the default application font, ignoring user settings. More...
 
QFont getApplicationFont (QWidget *widget)
 Returns the currently configured application font (or the default, if it doesn't exist). More...
 
void setApplicationFont (const QFont *font)
 Sets the currently configured application font. More...
 
std::string getDefaultMonospaceFontName ()
 Returns the default monospaced font name. More...
 
QFont getDefaultMonospaceFont ()
 Returns the default monospaced font, ignoring user settings. More...
 
QFont getMonospaceFont (QWidget *widget)
 Returns the currently configured monospaced font (or the default, if it doesn't exist). More...
 
void setMonospaceFont (const QFont *font)
 Sets the currently configured monospaced font. More...
 
std::string getDefaultEmojiFontName ()
 Returns the default emoji font name. More...
 
QFont getDefaultEmojiFont ()
 Returns the default emoji font, ignoring user settings. More...
 
QFont getEmojiFont (QWidget *widget)
 Returns the currently configured emoji font (or the default, if it doesn't exist). More...
 
void setEmojiFont (const QFont *font)
 Sets the currently configured emoji font. More...
 
int getDefaultExtraFontSpacing ()
 
int getExtraFontSpacing ()
 
void setExtraFontSpacing (int spacing)
 
int getFontVerticalOffset ()
 
bool allowBoldFonts ()
 
void setAllowBoldFonts (bool allow)
 
AntialiasingStyle getAntialiasingStyle ()
 
void setAntialiasingStyle (AntialiasingStyle style)
 
void adjustFontForAntialiasingSettings (QFont &font, QWidget *widget)
 
int getFontWidthAndAdjustSpacing (QFont &font)
 

Enumeration Type Documentation

◆ AntialiasingStyle

Enumerator
SubpixelAntialiasing 
GrayscaleAntialiasing 
SubpixelAntialiasingUnlessHighDPI 
NoAntialiasing 

Function Documentation

◆ getDefaultFontSize()

int getDefaultFontSize ( )

Returns the default font size for the current platform.

◆ getDefaultApplicationFontName()

std::string getDefaultApplicationFontName ( )

Returns the default application font name.

◆ getDefaultApplicationFont()

QFont getDefaultApplicationFont ( )

Returns the default application font, ignoring user settings.

◆ getApplicationFont()

QFont getApplicationFont ( QWidget *  widget)

Returns the currently configured application font (or the default, if it doesn't exist).

◆ setApplicationFont()

void setApplicationFont ( const QFont *  font)

Sets the currently configured application font.

Parameters
fontThe font to use. Passing nullptr will reset the application font to the user's configured default.

◆ getDefaultMonospaceFontName()

std::string getDefaultMonospaceFontName ( )

Returns the default monospaced font name.

◆ getDefaultMonospaceFont()

QFont getDefaultMonospaceFont ( )

Returns the default monospaced font, ignoring user settings.

◆ getMonospaceFont()

QFont getMonospaceFont ( QWidget *  widget)

Returns the currently configured monospaced font (or the default, if it doesn't exist).

◆ setMonospaceFont()

void setMonospaceFont ( const QFont *  font)

Sets the currently configured monospaced font.

Parameters
fontThe font to use. Passing nullptr will reset the monospaced font to the user's configured default.

◆ getDefaultEmojiFontName()

std::string getDefaultEmojiFontName ( )

Returns the default emoji font name.

◆ getDefaultEmojiFont()

QFont getDefaultEmojiFont ( )

Returns the default emoji font, ignoring user settings.

◆ getEmojiFont()

QFont getEmojiFont ( QWidget *  widget)

Returns the currently configured emoji font (or the default, if it doesn't exist).

◆ setEmojiFont()

void setEmojiFont ( const QFont *  font)

Sets the currently configured emoji font.

Parameters
fontThe font to use. Passing nullptr will reset the emoji font to the user's configured default.

◆ getDefaultExtraFontSpacing()

int getDefaultExtraFontSpacing ( )

◆ getExtraFontSpacing()

int getExtraFontSpacing ( )

◆ setExtraFontSpacing()

void setExtraFontSpacing ( int  spacing)

◆ getFontVerticalOffset()

int getFontVerticalOffset ( )

◆ allowBoldFonts()

bool allowBoldFonts ( )

◆ setAllowBoldFonts()

void setAllowBoldFonts ( bool  allow)

◆ getAntialiasingStyle()

AntialiasingStyle getAntialiasingStyle ( )

◆ setAntialiasingStyle()

void setAntialiasingStyle ( AntialiasingStyle  style)

◆ adjustFontForAntialiasingSettings()

void adjustFontForAntialiasingSettings ( QFont &  font,
QWidget *  widget 
)

◆ getFontWidthAndAdjustSpacing()

int getFontWidthAndAdjustSpacing ( QFont &  font)