Class to store font. More...
#include <MWAWFont.hxx>
Classes | |
| struct | Line |
| a small struct to define a line in MWAWFont More... | |
| struct | Script |
| a small struct to define the script position in MWAWFont More... | |
Public Types | |
| enum | FontBits { boldBit = 1, italicBit = 2, blinkBit = 4, embossBit = 8, engraveBit = 0x10, hiddenBit = 0x20, outlineBit = 0x40, shadowBit = 0x80, reverseVideoBit = 0x100, smallCapsBit = 0x200, allCapsBit = 0x400, lowercaseBit = 0x800, boxedBit = 0x1000, boxedRoundedBit = 0x2000, reverseWritingBit = 0x4000 } |
| the different font bit More... | |
Public Member Functions | |
| MWAWFont (int newId=-1, float sz=12, uint32_t f=0) | |
| constructor | |
| bool | isSet () const |
| returns true if the font id is initialized | |
| void | insert (MWAWFont const &ft) |
| inserts the set value in the current font | |
| void | setFont (int newId) |
| sets the font id and resets size to the previous size for this font | |
| int | id () const |
| returns the font id | |
| void | setId (int newId) |
| sets the font id | |
| float | size () const |
| returns the font size | |
| void | setSize (float sz) |
| sets the font size | |
| float | deltaLetterSpacing () const |
| returns the condensed(negative)/extended(positive) width | |
| void | setDeltaLetterSpacing (float d) |
| set the letter spacing ( delta value in point ) | |
| float | texteWidthScaling () const |
| returns the texte width scaling | |
| void | setTexteWidthScaling (float scale=1.0) |
| set the texte width scaling | |
| Script const & | script () const |
| returns the script position | |
| void | set (Script const &newscript) |
| sets the script position | |
| uint32_t | flags () const |
| returns the font flags | |
| void | setFlags (uint32_t fl) |
| sets the font attributes bold, ... | |
| bool | hasColor () const |
| returns true if the font color is not black | |
| void | getColor (MWAWColor &c) const |
| returns the font color | |
| void | setColor (MWAWColor color) |
| sets the font color | |
| void | getBackgroundColor (MWAWColor &c) const |
| returns the font background color | |
| void | setBackgroundColor (MWAWColor color) |
| sets the font background color | |
| void | resetColor () |
| resets the font color to black and the background color to white | |
| bool | hasDecorationLines () const |
| return true if the font has decorations line (overline, strikeout, underline) | |
| void | resetDecorationLines () |
| reset the decoration | |
| Line const & | getOverline () const |
| returns the overline | |
| void | setOverline (Line const &line) |
| sets the overline | |
| void | setOverlineStyle (Line::Style style=Line::None, bool doReset=true) |
| sets the overline style ( by default, we also reset the style) | |
| void | setOverlineType (Line::Type type=Line::Single) |
| sets the overline type | |
| void | setOverlineWordFlag (bool wordFlag=false) |
| sets the overline word flag | |
| void | setOverlineWidth (float w) |
| sets the overline width | |
| void | setOverlineColor (MWAWColor const &color) |
| sets the overline color | |
| Line const & | getStrikeOut () const |
| returns the strikeoutline | |
| void | setStrikeOut (Line const &line) |
| sets the strikeoutline | |
| void | setStrikeOutStyle (Line::Style style=Line::None, bool doReset=true) |
| sets the strikeoutline style ( by default, we also reset the style) | |
| void | setStrikeOutType (Line::Type type=Line::Single) |
| sets the strikeoutline type | |
| void | setStrikeOutWordFlag (bool wordFlag=false) |
| sets the strikeoutline word flag | |
| void | setStrikeOutWidth (float w) |
| sets the strikeoutline width | |
| void | setStrikeOutColor (MWAWColor const &color) |
| sets the strikeoutline color | |
| Line const & | getUnderline () const |
| returns the underline | |
| void | setUnderline (Line const &line) |
| sets the underline | |
| void | setUnderlineStyle (Line::Style style=Line::None, bool doReset=true) |
| sets the underline style ( by default, we also reset the style) | |
| void | setUnderlineType (Line::Type type=Line::Single) |
| sets the underline type | |
| void | setUnderlineWordFlag (bool wordFlag=false) |
| sets the underline word flag | |
| void | setUnderlineWidth (float w) |
| sets the underline width | |
| void | setUnderlineColor (MWAWColor const &color) |
| sets the underline color | |
| std::string const & | language () const |
| return the language | |
| void | setLanguage (std::string const &lang) |
| set the language ( in the for en_US, en_GB, en, ...) | |
| void | addTo (WPXPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const |
| add to the propList | |
| std::string | getDebugString (shared_ptr< MWAWFontConverter > &converter) const |
| returns a string which can be used for debugging | |
| bool | operator== (MWAWFont const &f) const |
| operator== | |
| bool | operator!= (MWAWFont const &f) const |
| operator!= | |
| int | cmp (MWAWFont const &oth) const |
| a comparison function | |
Public Attributes | |
| std::string | m_extra |
| extra data | |
Protected Attributes | |
| Variable< int > | m_id |
| font identificator | |
| Variable< float > | m_size |
| font size | |
| Variable< float > | m_deltaSpacing |
| expand(>0), condensed(<0) depl in point | |
| Variable< float > | m_texteWidthScaling |
| the texte width scaling | |
| Variable< Script > | m_scriptPosition |
| the sub/super script definition | |
| Variable< uint32_t > | m_flags |
| font attributes | |
| Variable< Line > | m_overline |
| overline attributes | |
| Variable< Line > | m_strikeoutline |
| overline attributes | |
| Variable< Line > | m_underline |
| underline attributes | |
| Variable< MWAWColor > | m_color |
| font color | |
| Variable< MWAWColor > | m_backgroundColor |
| font background color | |
| Variable< std::string > | m_language |
| the language if set | |
Class to store font.
| enum MWAWFont::FontBits |
|
inline |
constructor
| newId | system id font |
| sz | the font size |
| f | the font attributes bold, ... |
| void MWAWFont::addTo | ( | WPXPropertyList & | propList, |
| shared_ptr< MWAWFontConverter > | fontConverter | ||
| ) | const |
add to the propList
|
inline |
a comparison function
Referenced by operator!=(), and operator==().
|
inline |
returns the condensed(negative)/extended(positive) width
|
inline |
returns the font flags
Referenced by cmp(), insert(), LWTextInternal::Font::merge(), FWText::send(), and MSWStruct::Font::updateFontToFinalState().
|
inline |
returns the font background color
Referenced by LWTextInternal::Font::merge().
|
inline |
returns the font color
Referenced by MRWGraph::sendRule().
| std::string MWAWFont::getDebugString | ( | shared_ptr< MWAWFontConverter > & | converter | ) | const |
returns a string which can be used for debugging
Referenced by ZWTextInternal::HFZone::getDebugString(), MSWText::prepareData(), CWText::readChar(), MWProStructures::readCharStyles(), LWText::readDocumentHF(), HMWKText::readFont(), MSK4Text::readFont(), LWText::readFont2(), LWText::readFonts(), MRWText::readFonts(), HMWJText::readFonts(), MDWParser::readFonts(), NSText::readFonts(), MWProStructures::readFontsDef(), DMText::readFooter(), ACParser::readHFProperties(), MWParser::readInformations(), MSWTextStyles::readParagraph(), MSWTextStyles::readPLC(), MSW1Parser::readPLC(), ZWText::readSectionFonts(), MWProStructures::readStyle(), TTParser::readStyles(), DMText::readStyles(), MSKGraph::readTable(), MWParser::readText(), MSKGraph::readText(), ACText::readTopic(), WNText::send(), ACText::sendText(), and MSK3Text::sendText().
|
inline |
returns the overline
Referenced by LWTextInternal::Font::merge().
|
inline |
returns the strikeoutline
Referenced by LWTextInternal::Font::merge(), and MSWStruct::Font::updateFontToFinalState().
|
inline |
returns the underline
Referenced by LWTextInternal::Font::merge(), MRWText::readFonts(), and MSWStruct::Font::updateFontToFinalState().
|
inline |
returns true if the font color is not black
Referenced by getDebugString().
|
inline |
return true if the font has decorations line (overline, strikeout, underline)
|
inline |
returns the font id
Referenced by cmp(), getDebugString(), MSWTextStyles::getFont(), MSK4Text::readText(), MWAWContentListener::setFont(), and MSWTextStyles::setProperty().
|
inline |
inserts the set value in the current font
Referenced by MSWStruct::Font::insert().
|
inline |
returns true if the font id is initialized
Referenced by MWAWFont::Script::str().
|
inline |
return the language
|
inline |
operator!=
|
inline |
operator==
|
inline |
resets the font color to black and the background color to white
Referenced by MWAWFont(), and setFont().
|
inline |
reset the decoration
|
inline |
returns the script position
Referenced by cmp(), and LWTextInternal::Font::merge().
|
inline |
sets the script position
Referenced by LWTextInternal::Font::merge(), CWText::readChar(), MSWTextStyles::readFont(), MSW1Parser::readFont(), HMWJText::readFont(), HMWKText::readFont(), MSK3Text::readFont(), WNText::readFont(), MSK4Text::readFont(), MSKGraph::readFont(), MWProStructures::readFont(), LWText::readFont2(), MRWText::readFonts(), MDWParser::readFonts(), NSText::readFonts(), WPParser::readFonts(), MWParser::readInformations(), MSKGraph::readTable(), MWParser::readText(), WNText::send(), and FWTextInternal::Font::update().
|
inline |
sets the font background color
Referenced by LWTextInternal::Font::merge(), HMWJText::readFont(), HMWKText::readFont(), LWText::readFont2(), and MRWText::readFonts().
|
inline |
sets the font color
Referenced by CWText::readChar(), LWText::readDocumentHF(), MSWTextStyles::readFont(), HMWJText::readFont(), HMWKText::readFont(), MSK3Text::readFont(), WNText::readFont(), MSK4Text::readFont(), MSKGraph::readFont(), MWProStructures::readFont(), LWText::readFonts(), MRWText::readFonts(), NSText::readFonts(), ZWText::readHFZone(), ZWText::readSectionFonts(), TTParser::readStyles(), DMText::readStyles(), MSKGraph::readTable(), and FWTextInternal::Font::update().
|
inline |
set the letter spacing ( delta value in point )
Referenced by CWText::readChar(), LWText::readDocumentHF(), MSWTextStyles::readFont(), HMWJText::readFont(), HMWKText::readFont(), WNText::readFont(), MSK4Text::readFont(), MWProStructures::readFont(), LWText::readFonts(), MRWText::readFonts(), NSText::readFonts(), TTParser::readStyles(), and FWText::send().
|
inline |
sets the font attributes bold, ...
Referenced by insert(), LWTextInternal::Font::merge(), CWText::readChar(), LWText::readDocumentHF(), MSWTextStyles::readFont(), MSW1Parser::readFont(), ACText::readFont(), HMWJText::readFont(), HMWKText::readFont(), MSK3Text::readFont(), WNText::readFont(), MSK4Text::readFont(), MSKGraph::readFont(), MWProStructures::readFont(), LWText::readFont2(), LWText::readFonts(), MRWText::readFonts(), MDWParser::readFonts(), NSText::readFonts(), WPParser::readFonts(), ACParser::readHFProperties(), ZWText::readHFZone(), MWParser::readInformations(), ZWText::readSectionFonts(), TTParser::readStyles(), DMText::readStyles(), MSKGraph::readTable(), MWParser::readText(), FWText::send(), EDParser::sendIndex(), DMText::sendTOC(), and MSWStruct::Font::updateFontToFinalState().
|
inline |
sets the font id and resets size to the previous size for this font
Referenced by MSKGraph::readFont().
|
inline |
sets the font id
Referenced by MSWTextStyles::getFont(), MRWTextInternal::Zone::getFont(), CWText::readChar(), LWText::readDocumentHF(), MSWTextStyles::readFont(), MSW1Parser::readFont(), ACText::readFont(), HMWJText::readFont(), HMWKText::readFont(), MSK3Text::readFont(), WNText::readFont(), MSK4Text::readFont(), MWProStructures::readFont(), LWText::readFonts(), MDWParser::readFonts(), NSText::readFonts(), WPParser::readFonts(), DMText::readFooter(), ACParser::readHFProperties(), ZWText::readHFZone(), MWParser::readInformations(), FWText::readLineHeader(), MRWText::readRulers(), ZWText::readSectionFonts(), TTParser::readStyles(), DMText::readStyles(), MSK4Text::readText(), MWParser::readText(), FWText::send(), FWText::sendHiddenItem(), MWAWContentListener::setFont(), and MSWTextStyles::setProperty().
|
inline |
set the language ( in the for en_US, en_GB, en, ...)
Referenced by MWProStructures::readFont().
|
inline |
sets the overline
Referenced by LWTextInternal::Font::merge(), and MRWText::readFonts().
|
inline |
sets the overline color
Referenced by LWText::readFont2().
|
inline |
sets the overline style ( by default, we also reset the style)
Referenced by HMWJText::readFont(), HMWKText::readFont(), LWText::readFont2(), NSText::readFonts(), and FWText::send().
|
inline |
sets the overline type
Referenced by LWText::readFont2().
|
inline |
sets the overline width
Referenced by HMWJText::readFont(), HMWKText::readFont(), and LWText::readFont2().
|
inline |
sets the overline word flag
|
inline |
sets the font size
Referenced by MSWTextStyles::getFont(), CWText::readChar(), LWText::readDocumentHF(), MSWTextStyles::readFont(), MSW1Parser::readFont(), ACText::readFont(), HMWJText::readFont(), HMWKText::readFont(), MSK3Text::readFont(), WNText::readFont(), MSK4Text::readFont(), MSKGraph::readFont(), MWProStructures::readFont(), LWText::readFonts(), MRWText::readFonts(), MDWParser::readFonts(), NSText::readFonts(), WPParser::readFonts(), DMText::readFooter(), ACParser::readHFProperties(), ZWText::readHFZone(), MWParser::readInformations(), FWText::readLineHeader(), MRWText::readRulers(), ZWText::readSectionFonts(), TTParser::readStyles(), DMText::readStyles(), MWParser::readText(), FWText::send(), FWText::sendHiddenItem(), MWAWContentListener::setFont(), and MSWTextStyles::setProperty().
|
inline |
sets the strikeoutline
Referenced by LWTextInternal::Font::merge().
|
inline |
sets the strikeoutline color
Referenced by LWText::readFont2().
|
inline |
sets the strikeoutline style ( by default, we also reset the style)
Referenced by CWText::readChar(), MSWTextStyles::readFont(), HMWJText::readFont(), HMWKText::readFont(), WNText::readFont(), MWProStructures::readFont(), LWText::readFont2(), MRWText::readFonts(), NSText::readFonts(), FWText::send(), and MSWStruct::Font::updateFontToFinalState().
|
inline |
sets the strikeoutline type
Referenced by HMWJText::readFont(), HMWKText::readFont(), and LWText::readFont2().
|
inline |
sets the strikeoutline width
Referenced by LWText::readFont2().
|
inline |
sets the strikeoutline word flag
|
inline |
set the texte width scaling
Referenced by HMWJText::readFont(), and HMWKText::readFont().
|
inline |
sets the underline
Referenced by LWTextInternal::Font::merge(), and MRWText::readFonts().
|
inline |
sets the underline color
Referenced by WNText::readFont(), and LWText::readFont2().
|
inline |
sets the underline style ( by default, we also reset the style)
Referenced by CWText::readChar(), LWText::readDocumentHF(), MSWTextStyles::readFont(), MSW1Parser::readFont(), ACText::readFont(), HMWJText::readFont(), HMWKText::readFont(), MSK3Text::readFont(), WNText::readFont(), MSK4Text::readFont(), MSKGraph::readFont(), MWProStructures::readFont(), LWText::readFont2(), LWText::readFonts(), MRWText::readFonts(), MDWParser::readFonts(), NSText::readFonts(), WPParser::readFonts(), ACParser::readHFProperties(), ZWText::readHFZone(), MWParser::readInformations(), ZWText::readSectionFonts(), TTParser::readStyles(), DMText::readStyles(), MSKGraph::readTable(), MWParser::readText(), FWText::send(), and MSWStruct::Font::updateFontToFinalState().
|
inline |
sets the underline type
Referenced by CWText::readChar(), MSWTextStyles::readFont(), HMWJText::readFont(), HMWKText::readFont(), WNText::readFont(), MWProStructures::readFont(), LWText::readFont2(), MRWText::readFonts(), and FWText::send().
|
inline |
sets the underline width
Referenced by HMWJText::readFont(), HMWKText::readFont(), WNText::readFont(), and LWText::readFont2().
|
inline |
sets the underline word flag
Referenced by MSWTextStyles::readFont(), MRWText::readFonts(), NSText::readFonts(), and FWText::send().
|
inline |
returns the font size
Referenced by addTo(), cmp(), getDebugString(), MSWTextStyles::getFont(), MSWStruct::operator<<(), HMWJText::readFont(), HMWKText::readFont(), MWProStructures::readFont(), LWText::readFonts(), ZWText::readSectionFonts(), FWText::send(), MWAWContentListener::setFont(), and MSWTextStyles::setProperty().
|
inline |
returns the texte width scaling
font background color
Referenced by addTo(), cmp(), getBackgroundColor(), getDebugString(), resetColor(), and setBackgroundColor().
font color
Referenced by addTo(), cmp(), getColor(), getDebugString(), hasColor(), insert(), resetColor(), and setColor().
|
protected |
expand(>0), condensed(<0) depl in point
Referenced by addTo(), cmp(), deltaLetterSpacing(), getDebugString(), insert(), and setDeltaLetterSpacing().
| std::string MWAWFont::m_extra |
extra data
Referenced by getDebugString(), insert(), LWTextInternal::Font::merge(), ACText::readFont(), HMWJText::readFont(), HMWKText::readFont(), WNText::readFont(), MWProStructures::readFont(), LWText::readFont2(), LWText::readFonts(), WPParser::readFonts(), TTParser::readStyles(), and DMText::readStyles().
|
protected |
font attributes
Referenced by addTo(), flags(), getDebugString(), insert(), and setFlags().
|
protected |
|
protected |
the language if set
Referenced by addTo(), cmp(), getDebugString(), language(), and setLanguage().
overline attributes
Referenced by addTo(), cmp(), getDebugString(), getOverline(), hasDecorationLines(), insert(), resetDecorationLines(), setOverline(), setOverlineColor(), setOverlineStyle(), setOverlineType(), setOverlineWidth(), and setOverlineWordFlag().
the sub/super script definition
Referenced by addTo(), getDebugString(), insert(), script(), and set().
overline attributes
Referenced by addTo(), cmp(), getDebugString(), getStrikeOut(), hasDecorationLines(), insert(), resetDecorationLines(), setStrikeOut(), setStrikeOutColor(), setStrikeOutStyle(), setStrikeOutType(), setStrikeOutWidth(), and setStrikeOutWordFlag().
|
protected |
the texte width scaling
Referenced by addTo(), cmp(), getDebugString(), insert(), setTexteWidthScaling(), and texteWidthScaling().
underline attributes
Referenced by addTo(), cmp(), getDebugString(), getUnderline(), hasDecorationLines(), insert(), resetDecorationLines(), setUnderline(), setUnderlineColor(), setUnderlineStyle(), setUnderlineType(), setUnderlineWidth(), and setUnderlineWordFlag().