62 void addTo(librevenge::RVNGPropertyList &propList, std::string
const &type)
const;
64 friend std::ostream &
operator<<(std::ostream &o,
Line const &line);
103 Script(
float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT,
int scale=100) :
115 return Script(-33,librevenge::RVNG_PERCENT,58);
125 return Script(33,librevenge::RVNG_PERCENT,58);
133 std::string
str(
float fSize)
const;
472 void addTo(librevenge::RVNGPropertyList &propList, shared_ptr<MWAWFontConverter> fontConverter)
const;
475 std::string
getDebugString(shared_ptr<MWAWFontConverter> &converter)
const;
491 int diff =
id() - oth.
id();
492 if (diff != 0)
return diff;
502 if (diff != 0)
return diff;
504 if (diff != 0)
return diff;
506 if (diff != 0)
return diff;
508 if (diff != 0)
return diff;
Definition: MWAWFont.hxx:50
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:281
void setStrikeOutColor(MWAWColor const &color)
sets the strikeoutline color
Definition: MWAWFont.hxx:417
MWAWVariable< MWAWColor > m_color
font color
Definition: MWAWFont.hxx:528
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:226
Script const & script() const
returns the script position
Definition: MWAWFont.hxx:275
Definition: MWAWFont.hxx:185
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:441
void setDeltaLetterSpacing(float d)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:260
Definition: MWAWFont.hxx:50
Type
the line style
Definition: MWAWFont.hxx:52
MWAWVariable< MWAWColor > m_color
the color ( if not set, we use the font color )
Definition: MWAWFont.hxx:98
Definition: MWAWFont.hxx:183
void resetColor()
resets the font color to black and the background color to white
Definition: MWAWFont.hxx:324
std::string str(float fSize) const
return a string which correspond to style:text-position
Definition: MWAWFont.cxx:141
int cmp(Script const &oth) const
small comparison function
Definition: MWAWFont.hxx:166
Definition: MWAWFont.hxx:185
bool hasDecorationLines() const
return true if the font has decorations line (overline, strikeout, underline)
Definition: MWAWFont.hxx:331
Definition: MWAWFont.hxx:52
Definition: MWAWFont.hxx:50
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:226
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:394
void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the overline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:355
void addTo(librevenge::RVNGPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const
add to the propList
Definition: MWAWFont.cxx:230
bool operator<=(Script const &oth) const
operator<=
Definition: MWAWFont.hxx:151
bool hasColor() const
returns true if the font color is not black
Definition: MWAWFont.hxx:298
MWAWVariable< Line > m_overline
overline attributes
Definition: MWAWFont.hxx:525
std::string m_extra
extra data
Definition: MWAWFont.hxx:533
Type m_type
the type
Definition: MWAWFont.hxx:92
float deltaLetterSpacing() const
returns the condensed(negative)/extended(positive) width
Definition: MWAWFont.hxx:255
FontBits
the different font bit
Definition: MWAWFont.hxx:183
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:517
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:221
int id() const
returns the font id
Definition: MWAWFont.hxx:233
void insert(MWAWVariable const &orig)
update the current value if orig is set
Definition: libmwaw_internal.hxx:487
Definition: MWAWFont.hxx:184
Definition: MWAWFont.hxx:183
Definition: MWAWFont.hxx:50
void resetDecorationLines()
reset the decoration
Definition: MWAWFont.hxx:338
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:456
bool isSet() const
return true if the line is not empty
Definition: MWAWFont.hxx:57
friend std::ostream & operator<<(std::ostream &o, Line const &line)
operator<<
Definition: MWAWFont.cxx:48
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:123
Definition: MWAWFont.hxx:52
Definition: MWAWFont.hxx:183
Definition: MWAWFont.hxx:187
the class to store a color
Definition: libmwaw_internal.hxx:177
Definition: MWAWFont.hxx:186
Style m_style
the style
Definition: MWAWFont.hxx:90
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:113
Definition: MWAWFont.hxx:184
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:308
bool isSet() const
return true if the position is not default
Definition: MWAWFont.hxx:108
bool operator>=(Script const &oth) const
operator>=
Definition: MWAWFont.hxx:161
Definition: MWAWFont.hxx:183
bool operator==(Line const &oth) const
operator==
Definition: MWAWFont.hxx:66
Style
the line style
Definition: MWAWFont.hxx:50
Definition: MWAWFont.hxx:52
void setStrikeOutType(Line::Type type=Line::Single)
sets the strikeoutline type
Definition: MWAWFont.hxx:402
Class to store font.
Definition: MWAWFont.hxx:44
void getColor(MWAWColor &c) const
returns the font color
Definition: MWAWFont.hxx:303
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:428
void setSize(float sz)
sets the font size
Definition: MWAWFont.hxx:249
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:128
MWAWVariable< std::string > m_language
the language if set
Definition: MWAWFont.hxx:530
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:238
bool operator==(Script const &oth) const
operator==
Definition: MWAWFont.hxx:136
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:118
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:350
MWAWFont(int newId=-1, float sz=12, uint32_t f=0)
constructor
Definition: MWAWFont.hxx:194
MWAWVariable< float > m_deltaSpacing
expand(> 0), condensed(< 0) depl in point
Definition: MWAWFont.hxx:521
Line const & getOverline() const
returns the overline
Definition: MWAWFont.hxx:345
int cmp(MWAWFont const &oth) const
a comparison function
Definition: MWAWFont.hxx:489
MWAWVariable< int > m_id
font identificator
Definition: MWAWFont.hxx:519
MWAWVariable< Line > m_strikeoutline
overline attributes
Definition: MWAWFont.hxx:526
MWAWVariable< Line > m_underline
underline attributes
Definition: MWAWFont.hxx:527
Definition: MWAWFont.hxx:186
bool operator==(MWAWFont const &f) const
operator==
Definition: MWAWFont.hxx:478
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:451
Line(Style style=None, Type type=Single, bool wordFlag=false, float w=1.0)
constructor
Definition: MWAWFont.hxx:54
float m_delta
the ydelta
Definition: MWAWFont.hxx:175
MWAWVariable< MWAWColor > m_backgroundColor
font background color
Definition: MWAWFont.hxx:529
bool operator!=(Line const &oth) const
operator!=
Definition: MWAWFont.hxx:71
int m_scale
the font scaling ( in percent )
Definition: MWAWFont.hxx:179
float m_width
the width in point
Definition: MWAWFont.hxx:96
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:373
std::string const & language() const
returns the language
Definition: MWAWFont.hxx:462
bool operator!=(MWAWFont const &f) const
operator!=
Definition: MWAWFont.hxx:483
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:287
MWAWVariable< Script > m_scriptPosition
the sub/super script definition
Definition: MWAWFont.hxx:523
bool operator!=(Script const &oth) const
operator!=
Definition: MWAWFont.hxx:141
MWAWVariable< float > m_size
font size
Definition: MWAWFont.hxx:520
Definition: MWAWFont.hxx:183
void setOverlineType(Line::Type type=Line::Single)
sets the overline type
Definition: MWAWFont.hxx:363
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:174
void setOverlineColor(MWAWColor const &color)
sets the overline color
Definition: MWAWFont.hxx:378
int cmp(Line const &oth) const
small comparison function
Definition: MWAWFont.hxx:76
float texteWidthScaling() const
returns the text width scaling
Definition: MWAWFont.hxx:265
bool m_word
word or not word line
Definition: MWAWFont.hxx:94
void setUnderlineWordFlag(bool wordFlag=false)
sets the underline word flag
Definition: MWAWFont.hxx:446
void setStrikeOutWidth(float w)
sets the strikeoutline width
Definition: MWAWFont.hxx:412
MWAWVariable< float > m_texteWidthScaling
the texte width scaling
Definition: MWAWFont.hxx:522
a small struct to define a line in MWAWFont
Definition: MWAWFont.hxx:48
Script(float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT, int scale=100)
constructor
Definition: MWAWFont.hxx:103
void setOverlineWordFlag(bool wordFlag=false)
sets the overline word flag
Definition: MWAWFont.hxx:368
Definition: MWAWFont.hxx:50
bool operator<(Script const &oth) const
operator<
Definition: MWAWFont.hxx:146
void getBackgroundColor(MWAWColor &c) const
returns the font background color
Definition: MWAWFont.hxx:314
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:423
bool operator>(Script const &oth) const
operator>
Definition: MWAWFont.hxx:156
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:319
librevenge::RVNGUnit m_deltaUnit
the ydelta unit ( point or percent )
Definition: MWAWFont.hxx:177
void setStrikeOutWordFlag(bool wordFlag=false)
sets the strikeoutline word flag
Definition: MWAWFont.hxx:407
float size() const
returns the font size
Definition: MWAWFont.hxx:244
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:292
void setStrikeOut(Line const &line)
sets the strikeoutline
Definition: MWAWFont.hxx:389
Definition: MWAWFont.hxx:50
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:522
MWAWVariable< uint32_t > m_flags
font attributes
Definition: MWAWFont.hxx:524
void setTexteWidthScaling(float scale=1.0)
sets the text width scaling
Definition: MWAWFont.hxx:270
void insert(MWAWFont const &ft)
inserts the set value in the current font
Definition: MWAWFont.hxx:206
Definition: MWAWFont.hxx:186
bool isSet() const
returns true if the font id is initialized
Definition: MWAWFont.hxx:201
Definition: MWAWFont.hxx:185
void setLanguage(std::string const &lang)
set the language ( in the for en_US, en_GB, en, ...)
Definition: MWAWFont.hxx:467
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:433
void addTo(librevenge::RVNGPropertyList &propList, std::string const &type) const
add a line to the propList knowing the type (line-through, underline, overline )
Definition: MWAWFont.cxx:91
Definition: MWAWFont.hxx:184
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:384
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:101