#ifndef TextStyle_h
#define TextStyle_h
namespace WebCore {
class TextStyle {
public:
TextStyle(bool allowTabs = false, int xpos = 0, int padding = 0, bool rtl = false, bool directionalOverride = false,
bool applyRunRounding = true, bool applyWordRounding = true, bool attemptFontSubstitution = true)
: m_allowTabs(allowTabs)
, m_xpos(xpos)
, m_padding(padding)
, m_rtl(rtl)
, m_directionalOverride(directionalOverride)
, m_applyRunRounding(applyRunRounding)
, m_applyWordRounding(applyWordRounding)
, m_attemptFontSubstitution(attemptFontSubstitution)
{
}
bool allowTabs() const { return m_allowTabs; }
int xPos() const { return m_xpos; }
int padding() const { return m_padding; }
bool rtl() const { return m_rtl; }
bool ltr() const { return !m_rtl; }
bool directionalOverride() const { return m_directionalOverride; }
bool applyRunRounding() const { return m_applyRunRounding; }
bool applyWordRounding() const { return m_applyWordRounding; }
bool attemptFontSubstitution() const { return m_attemptFontSubstitution; }
void disableRoundingHacks() { m_applyRunRounding = m_applyWordRounding = false; }
void setRTL(bool b) { m_rtl = b; }
void setDirectionalOverride(bool override) { m_directionalOverride = override; }
private:
bool m_allowTabs;
int m_xpos;
int m_padding;
bool m_rtl;
bool m_directionalOverride;
bool m_applyRunRounding;
bool m_applyWordRounding;
bool m_attemptFontSubstitution;
};
}
#endif