Photon microGUI widgets library 0.6.0
PhWidgets::Drawing::FontStyle Struct Reference

Specifies style information applied to text. More...

#include <Font.h>

Public Types

enum  eFontStyle {
  Bold , Italic , Regular , Underline ,
  DoubleUnderline , Antialias , Scalable , Bitmap
}
 

Detailed Description

Specifies style information applied to text.

Examples

The following code example demonstrates how to set the Font property of a button to a new bold-style font using the FontStyle::eFontStyle enumeration. Create a form containing a button named Button1 and paste the following code into it.

// You have somewhere:
PtWidget_t *ptwidget; // pointer to button widget
using namespace PhWidgets;
using namespace PhWidgets::Drawing;
// constructing Button
Button Button1(ptwidget);
if (Button1.Font().Style != FontStyle::Bold)
Button1.Font = Font(FontFamily::Generic, 12.0f, FontStyle::Bold);
A button for initiating an action.
Definition: Button.h:24
Defines a particular format for text, including font face, size, and style attributes....
Definition: Font.h:232
The PhWidgets::Drawing namespace provides access to basic graphics functionality.
Definition: Color.h:11
The main namespace for all widgets.
Definition: Basic.h:11
@ Bold
Bold text.
Definition: Font.h:51
See also

Member Enumeration Documentation

◆ eFontStyle

Enumerator
Bold 

Bold text.

Italic 

Italic text.

Regular 

Normal text.

Underline 

Underlined text.

DoubleUnderline 

Double underlined text.

Antialias 

Antialias text.

Scalable 

Scalable text.

Bitmap 

Bitmap text.


The documentation for this struct was generated from the following file: