Empirical
Public Member Functions | Protected Attributes | List of all members
emp::web::Font Class Reference

Maintain information about an HTML font. More...

#include <Font.h>

Public Member Functions

 Font (const Font &)=default
 
 Font (Font &&)=default
 
 Font (const std::string &_family="Helvetica", int _size=15, const std::string &_color="black", bool _bold=false, bool _italic=false)
 
 Font (int _size, const std::string &_color="black", bool _bold=false, bool _italic=false)
 
 ~Font ()
 
Fontoperator= (const Font &)=default
 
Fontoperator= (Font &&)=default
 
const std::string & GetFamily () const
 
int GetSize () const
 
const std::string & GetColor () const
 
const std::string & GetLineColor () const
 
bool IsBold () const
 
bool IsItalic () const
 
bool IsSmallcaps () const
 
bool IsUnderlined () const
 
bool IsOverlined () const
 
bool IsStrikethrough () const
 
bool IsWavyLine () const
 
bool HasLine () const
 
FontSetFamily (const std::string &_family)
 
FontSetSize (int _size)
 
FontSetColor (const std::string &_color)
 
FontSetLineColor (const std::string &_color)
 
FontSetBold (bool _in=true)
 
FontSetItalic (bool _in=true)
 
FontSetSmallcaps (bool _in=true)
 
FontSetUnderlined (bool _in=true)
 
FontSetOverlined (bool _in=true)
 
FontSetStrikethrough (bool _in=true)
 
FontSetWavyLine (bool _in=true)
 
void ConfigStyle (Style &style) const
 Take a Style object an fill it out based on this font information. More...
 
Style AsStyle () const
 
std::string GetHTMLStart ()
 
std::string GetHTMLEnd ()
 
bool operator== (const Font &_in) const
 
bool operator!= (const Font &_in) const
 

Protected Attributes

std::string family
 Font family to use. More...
 
int size
 Font size (in px) to use. More...
 
std::string color
 Font color. More...
 
std::string line_color
 Color of lines through the text (underline, linethrough, etc.) More...
 
bool is_bold
 Is this font bold? More...
 
bool is_italic
 Is this font itaic? More...
 
bool is_smallcaps
 Should this test be in small caps? More...
 
bool is_underlined
 Should this text be underlined? More...
 
bool is_overlined
 Should this text have a line above it? More...
 
bool is_linethrough
 Should this text have a line through it? More...
 
bool is_wavy_line
 Should lines be made wavy? More...
 

Detailed Description

Maintain information about an HTML font.

Constructor & Destructor Documentation

emp::web::Font::Font ( const Font )
default
emp::web::Font::Font ( Font &&  )
default
emp::web::Font::Font ( const std::string &  _family = "Helvetica",
int  _size = 15,
const std::string &  _color = "black",
bool  _bold = false,
bool  _italic = false 
)
inline
emp::web::Font::Font ( int  _size,
const std::string &  _color = "black",
bool  _bold = false,
bool  _italic = false 
)
inline
emp::web::Font::~Font ( )
inline

Member Function Documentation

Style emp::web::Font::AsStyle ( ) const
inline
void emp::web::Font::ConfigStyle ( Style style) const
inline

Take a Style object an fill it out based on this font information.

const std::string& emp::web::Font::GetColor ( ) const
inline
const std::string& emp::web::Font::GetFamily ( ) const
inline
std::string emp::web::Font::GetHTMLEnd ( )
inline
std::string emp::web::Font::GetHTMLStart ( )
inline
const std::string& emp::web::Font::GetLineColor ( ) const
inline
int emp::web::Font::GetSize ( ) const
inline
bool emp::web::Font::HasLine ( ) const
inline
bool emp::web::Font::IsBold ( ) const
inline
bool emp::web::Font::IsItalic ( ) const
inline
bool emp::web::Font::IsOverlined ( ) const
inline
bool emp::web::Font::IsSmallcaps ( ) const
inline
bool emp::web::Font::IsStrikethrough ( ) const
inline
bool emp::web::Font::IsUnderlined ( ) const
inline
bool emp::web::Font::IsWavyLine ( ) const
inline
bool emp::web::Font::operator!= ( const Font _in) const
inline
Font& emp::web::Font::operator= ( const Font )
default
Font& emp::web::Font::operator= ( Font &&  )
default
bool emp::web::Font::operator== ( const Font _in) const
inline
Font& emp::web::Font::SetBold ( bool  _in = true)
inline
Font& emp::web::Font::SetColor ( const std::string &  _color)
inline
Font& emp::web::Font::SetFamily ( const std::string &  _family)
inline
Font& emp::web::Font::SetItalic ( bool  _in = true)
inline
Font& emp::web::Font::SetLineColor ( const std::string &  _color)
inline
Font& emp::web::Font::SetOverlined ( bool  _in = true)
inline
Font& emp::web::Font::SetSize ( int  _size)
inline
Font& emp::web::Font::SetSmallcaps ( bool  _in = true)
inline
Font& emp::web::Font::SetStrikethrough ( bool  _in = true)
inline
Font& emp::web::Font::SetUnderlined ( bool  _in = true)
inline
Font& emp::web::Font::SetWavyLine ( bool  _in = true)
inline

Member Data Documentation

std::string emp::web::Font::color
protected

Font color.

std::string emp::web::Font::family
protected

Font family to use.

bool emp::web::Font::is_bold
protected

Is this font bold?

bool emp::web::Font::is_italic
protected

Is this font itaic?

bool emp::web::Font::is_linethrough
protected

Should this text have a line through it?

bool emp::web::Font::is_overlined
protected

Should this text have a line above it?

bool emp::web::Font::is_smallcaps
protected

Should this test be in small caps?

bool emp::web::Font::is_underlined
protected

Should this text be underlined?

bool emp::web::Font::is_wavy_line
protected

Should lines be made wavy?

std::string emp::web::Font::line_color
protected

Color of lines through the text (underline, linethrough, etc.)

int emp::web::Font::size
protected

Font size (in px) to use.


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