67 void addTo(librevenge::RVNGPropertyList &propList, std::string
const &type)
const;
69 friend std::ostream &
operator<<(std::ostream &o,
Line const &line);
108 explicit Script(
float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT,
int scale=100)
122 return Script(-33,librevenge::RVNG_PERCENT,58);
132 return Script(33,librevenge::RVNG_PERCENT,58);
140 std::string
str(
float fSize)
const;
204 explicit MWAWFont(
int newId=-1,
float sz=12, uint32_t f = 0)
505 void addTo(librevenge::RVNGPropertyList &propList, std::shared_ptr<MWAWFontConverter> fontConverter)
const;
507 void addToListLevel(librevenge::RVNGPropertyList &propList, std::shared_ptr<MWAWFontConverter> fontConverter)
const;
510 std::string
getDebugString(std::shared_ptr<MWAWFontConverter> &converter)
const;
526 int diff =
id() - oth.
id();
527 if (diff != 0)
return diff;
540 if (diff != 0)
return diff;
542 if (diff != 0)
return diff;
544 if (diff != 0)
return diff;
546 if (diff != 0)
return diff;
586 explicit MWAWFontManager(std::shared_ptr<MWAWFontConverter>
const &fontConverter);
597 std::shared_ptr<MWAWFontManagerInternal::State>
m_state;
MWAWVariable< bool > m_sizeIsRelative
true if the size is percent
Definition: MWAWFont.hxx:559
Definition: MWAWFont.hxx:49
bool operator<(Script const &oth) const
operator<
Definition: MWAWFont.hxx:153
void setStrikeOutColor(MWAWColor const &color)
sets the strikeoutline color
Definition: MWAWFont.hxx:450
MWAWVariable< MWAWColor > m_color
font color
Definition: MWAWFont.hxx:568
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:252
std::string const & language() const
returns the language
Definition: MWAWFont.hxx:495
bool isSet() const
returns true if the font id is initialized
Definition: MWAWFont.hxx:224
librevenge::RVNGUnit deltaLetterSpacingUnit() const
returns the condensed(negative)/extended(positive) unit
Definition: MWAWFont.hxx:287
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:474
bool isSet() const
return true if the line is not empty
Definition: MWAWFont.hxx:62
bool operator==(MWAWFont const &f) const
operator==
Definition: MWAWFont.hxx:513
MWAWFontManager & operator=(MWAWFontManager const &)=delete
int cmp(Line const &oth) const
small comparison function
Definition: MWAWFont.hxx:81
Definition: MWAWFont.hxx:49
Type
the line style
Definition: MWAWFont.hxx:51
MWAWVariable< MWAWColor > m_color
the color ( if not set, we use the font color )
Definition: MWAWFont.hxx:101
Definition: MWAWFont.hxx:190
void resetColor()
resets the font color to black and the background color to white
Definition: MWAWFont.hxx:357
Definition: MWAWFont.hxx:192
a font manager which can be used to store fonts, ...
Definition: MWAWFont.hxx:582
Line const & getOverline() const
returns the overline
Definition: MWAWFont.hxx:378
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
Definition: MWAWFont.hxx:51
Definition: MWAWFont.hxx:49
Definition: MWAWDocument.hxx:56
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
void getBackgroundColor(MWAWColor &c) const
returns the font background color
Definition: MWAWFont.hxx:347
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:427
void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the overline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:388
int cmp(Script const &oth) const
small comparison function
Definition: MWAWFont.hxx:173
MWAWVariable< float > m_widthStreching
the width streching in percent
Definition: MWAWFont.hxx:562
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
MWAWVariable< Line > m_overline
overline attributes
Definition: MWAWFont.hxx:565
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
namespace used to define structure for the font manager
Definition: MWAWFont.cxx:389
Type m_type
the type
Definition: MWAWFont.hxx:97
bool operator>(Script const &oth) const
operator>
Definition: MWAWFont.hxx:163
FontBits
the different font bit
Definition: MWAWFont.hxx:190
bool operator!=(Script const &oth) const
operator!=
Definition: MWAWFont.hxx:148
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
void insert(MWAWVariable const &orig)
update the current value if orig is set
Definition: libmwaw_internal.hxx:600
void setWidthStreching(float scale=1.0)
sets the text width streching
Definition: MWAWFont.hxx:303
int id() const
returns the font id
Definition: MWAWFont.hxx:259
int getId(MWAWFont const &font)
returns a span id which can be used to call the list
Definition: MWAWFont.cxx:435
Definition: MWAWFont.hxx:191
Definition: MWAWFont.hxx:190
Definition: MWAWFont.hxx:49
Definition: MWAWFont.hxx:192
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:417
void resetDecorationLines()
reset the decoration
Definition: MWAWFont.hxx:371
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:489
friend std::ostream & operator<<(std::ostream &o, Line const &line)
operator<<
Definition: MWAWFont.cxx:49
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:130
Definition: MWAWFont.hxx:51
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:635
Definition: MWAWFont.hxx:190
Definition: MWAWFont.hxx:197
the class to store a color
Definition: libmwaw_internal.hxx:192
void addTo(librevenge::RVNGPropertyList &propList, std::shared_ptr< MWAWFontConverter > fontConverter) const
add to the propList
Definition: MWAWFont.cxx:245
bool getFont(int id, MWAWFont &font) const
returns the font corresponding to an id
Definition: MWAWFont.cxx:446
Definition: MWAWFont.hxx:196
Definition: MWAWFont.hxx:194
Style m_style
the style
Definition: MWAWFont.hxx:95
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:120
~MWAWFontManager()
destructor
Definition: MWAWFont.cxx:426
Definition: MWAWFont.hxx:191
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
Definition: MWAWFont.hxx:190
float size() const
returns the font size
Definition: MWAWFont.hxx:270
Style
the line style
Definition: MWAWFont.hxx:49
Definition: MWAWFont.hxx:51
void setStrikeOutType(Line::Type type=Line::Single)
sets the strikeoutline type
Definition: MWAWFont.hxx:435
Class to store font.
Definition: MWAWFont.hxx:43
bool operator==(Line const &oth) const
operator==
Definition: MWAWFont.hxx:71
bool hasDecorationLines() const
return true if the font has decorations line (overline, strikeout, underline)
Definition: MWAWFont.hxx:364
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:461
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
MWAWVariable< std::string > m_language
the language if set
Definition: MWAWFont.hxx:570
bool operator!=(MWAWFont const &f) const
operator!=
Definition: MWAWFont.hxx:518
bool operator<=(Script const &oth) const
operator<=
Definition: MWAWFont.hxx:158
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
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:96
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:383
MWAWFont(int newId=-1, float sz=12, uint32_t f=0)
constructor
Definition: MWAWFont.hxx:204
MWAWVariable< float > m_deltaSpacing
expand(> 0), condensed(< 0) depl
Definition: MWAWFont.hxx:560
MWAWVariable< int > m_id
font identificator
Definition: MWAWFont.hxx:557
MWAWVariable< Line > m_strikeoutline
overline attributes
Definition: MWAWFont.hxx:566
MWAWVariable< Line > m_underline
underline attributes
Definition: MWAWFont.hxx:567
Definition: MWAWFont.hxx:195
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:484
std::string str(float fSize) const
return a string which correspond to style:text-position
Definition: MWAWFont.cxx:148
Line(Style style=None, Type type=Single, bool wordFlag=false, float w=1.0)
constructor
Definition: MWAWFont.hxx:53
float m_delta
the ydelta
Definition: MWAWFont.hxx:182
MWAWVariable< MWAWColor > m_backgroundColor
font background color
Definition: MWAWFont.hxx:569
Script const & script() const
returns the script position
Definition: MWAWFont.hxx:308
int m_scale
the font scaling ( in percent )
Definition: MWAWFont.hxx:186
float m_width
the width in point
Definition: MWAWFont.hxx:99
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:406
void getColor(MWAWColor &c) const
returns the font color
Definition: MWAWFont.hxx:336
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWVariable< Script > m_scriptPosition
the sub/super script definition
Definition: MWAWFont.hxx:563
bool isSet() const
return true if the position is not default
Definition: MWAWFont.hxx:115
MWAWVariable< float > m_size
font size
Definition: MWAWFont.hxx:558
MWAWVariable< librevenge::RVNGUnit > m_deltaSpacingUnit
the delta spacing unit
Definition: MWAWFont.hxx:561
Definition: MWAWFont.hxx:190
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:320
void setOverlineType(Line::Type type=Line::Single)
sets the overline type
Definition: MWAWFont.hxx:396
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
bool operator!=(Line const &oth) const
operator!=
Definition: MWAWFont.hxx:76
void setOverlineColor(MWAWColor const &color)
sets the overline color
Definition: MWAWFont.hxx:411
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:456
MWAWFontManager(std::shared_ptr< MWAWFontConverter > const &fontConverter)
constructor
Definition: MWAWFont.cxx:421
bool m_word
word or not word line
Definition: MWAWFont.hxx:103
void setUnderlineWordFlag(bool wordFlag=false)
sets the underline word flag
Definition: MWAWFont.hxx:479
void setStrikeOutWidth(float w)
sets the strikeoutline width
Definition: MWAWFont.hxx:445
std::shared_ptr< MWAWFontManagerInternal::State > m_state
the state
Definition: MWAWFont.hxx:597
a small struct to define a line in MWAWFont
Definition: MWAWFont.hxx:47
Script(float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT, int scale=100)
constructor
Definition: MWAWFont.hxx:108
void setOverlineWordFlag(bool wordFlag=false)
sets the overline word flag
Definition: MWAWFont.hxx:401
Definition: MWAWFont.hxx:49
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:352
librevenge::RVNGUnit m_deltaUnit
the ydelta unit ( point or percent )
Definition: MWAWFont.hxx:184
void setStrikeOutWordFlag(bool wordFlag=false)
sets the strikeoutline word flag
Definition: MWAWFont.hxx:440
bool operator==(Script const &oth) const
operator==
Definition: MWAWFont.hxx:143
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
float deltaLetterSpacing() const
returns the condensed(negative)/extended(positive) width
Definition: MWAWFont.hxx:282
int cmp(MWAWFont const &oth) const
a comparison function
Definition: MWAWFont.hxx:524
void setStrikeOut(Line const &line)
sets the strikeoutline
Definition: MWAWFont.hxx:422
Definition: MWAWFont.hxx:49
void addToListLevel(librevenge::RVNGPropertyList &propList, std::shared_ptr< MWAWFontConverter > fontConverter) const
add to the propList to a list level
Definition: MWAWFont.cxx:360
MWAWVariable< uint32_t > m_flags
font attributes
Definition: MWAWFont.hxx:564
bool operator>=(Script const &oth) const
operator>=
Definition: MWAWFont.hxx:168
float widthStreching() const
returns the text width streching
Definition: MWAWFont.hxx:298
void insert(MWAWFont const &ft)
inserts the set value in the current font
Definition: MWAWFont.hxx:229
Definition: MWAWFont.hxx:193
std::shared_ptr< MWAWFontConverter > getFontConverter()
returns the font converter
Definition: MWAWFont.cxx:430
Definition: MWAWFont.hxx:192
void setLanguage(std::string const &lang)
set the language ( in the for en_US, en_GB, en, ...)
Definition: MWAWFont.hxx:500
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
Definition: MWAWFont.hxx:191
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
bool hasColor() const
returns true if the font color is not black
Definition: MWAWFont.hxx:331