Go to the documentation of this file.
61 void addTo(librevenge::RVNGPropertyList &propList, std::string
const &type)
const;
63 friend std::ostream &
operator<<(std::ostream &o,
Line const &line);
102 Script(
float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT,
int scale=100) :
114 return Script(-33,librevenge::RVNG_PERCENT,58);
124 return Script(33,librevenge::RVNG_PERCENT,58);
132 std::string
str(
float fSize)
const;
484 void addTo(librevenge::RVNGPropertyList &propList, shared_ptr<MWAWFontConverter> fontConverter)
const;
486 void addToListLevel(librevenge::RVNGPropertyList &propList, shared_ptr<MWAWFontConverter> fontConverter)
const;
489 std::string
getDebugString(shared_ptr<MWAWFontConverter> &converter)
const;
505 int diff =
id() - oth.
id();
506 if (diff != 0)
return diff;
519 if (diff != 0)
return diff;
521 if (diff != 0)
return diff;
523 if (diff != 0)
return diff;
525 if (diff != 0)
return diff;
576 shared_ptr<MWAWFontManagerInternal::State>
m_state;
void setStrikeOut(Line const &line)
sets the strikeoutline
Definition: MWAWFont.hxx:401
FontBits
the different font bit
Definition: MWAWFont.hxx:182
@ reverseVideoBit
Definition: MWAWFont.hxx:184
std::map< MWAWFont, int, FontCompare > FontToIdMap
a map font to int
Definition: MWAWFont.cxx:400
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:231
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:453
bool operator<=(Script const &oth) const
operator<=
Definition: MWAWFont.hxx:150
~MWAWFontManager()
destructor
Definition: MWAWFont.cxx:420
void insert(MWAWFont const &ft)
inserts the set value in the current font
Definition: MWAWFont.hxx:208
@ smallCapsBit
Definition: MWAWFont.hxx:184
bool isSet() const
return true if the position is not default
Definition: MWAWFont.hxx:107
float m_delta
the ydelta
Definition: MWAWFont.hxx:174
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
librevenge::RVNGUnit deltaLetterSpacingUnit() const
returns the condensed(negative)/extended(positive) unit
Definition: MWAWFont.hxx:266
a small struct to define a line in MWAWFont
Definition: MWAWFont.hxx:47
void resetColor()
resets the font color to black and the background color to white
Definition: MWAWFont.hxx:336
bool hasColor() const
returns true if the font color is not black
Definition: MWAWFont.hxx:310
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
int id() const
returns the font id
Definition: MWAWFont.hxx:238
Script(float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT, int scale=100)
constructor
Definition: MWAWFont.hxx:102
@ boldBit
Definition: MWAWFont.hxx:182
a font manager which can be used to store fonts, ...
Definition: MWAWFont.hxx:562
std::string const & language() const
returns the language
Definition: MWAWFont.hxx:474
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
FontToIdMap m_fontToSpanIdMap
a map font to id map (used to retrieve span id)
Definition: MWAWFont.cxx:410
void addTo(librevenge::RVNGPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const
add to the propList
Definition: MWAWFont.cxx:245
void setWidthStreching(float scale=1.0)
sets the text width streching
Definition: MWAWFont.hxx:282
the class to store a color
Definition: libmwaw_internal.hxx:182
void getBackgroundColor(MWAWColor &c) const
returns the font background color
Definition: MWAWFont.hxx:326
@ outlineBit
Definition: MWAWFont.hxx:183
void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the overline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:367
namespace used to define structure for the font manager
Definition: MWAWFont.cxx:388
std::string str() const
print the color in the form #rrggbb
Definition: libmwaw_internal.cxx:231
shared_ptr< MWAWFontManagerInternal::State > m_state
the state
Definition: MWAWFont.hxx:576
std::string str(float fSize) const
return a string which correspond to style:text-position
Definition: MWAWFont.cxx:148
@ Simple
Definition: MWAWFont.hxx:49
@ Triple
Definition: MWAWFont.hxx:51
int cmp(Line const &oth) const
small comparison function
Definition: MWAWFont.hxx:75
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:440
Type
the line style
Definition: MWAWFont.hxx:51
MWAWVariable< std::string > m_language
the language if set
Definition: MWAWFont.hxx:549
bool operator!=(MWAWFont const &f) const
operator!=
Definition: MWAWFont.hxx:497
@ engraveBit
Definition: MWAWFont.hxx:182
@ reverseWritingBit
Definition: MWAWFont.hxx:189
void resetDecorationLines()
reset the decoration
Definition: MWAWFont.hxx:350
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:271
bool isSet() const
return true if the line is not empty
Definition: MWAWFont.hxx:56
State(shared_ptr< MWAWFontConverter > fontConverter)
constructor
Definition: MWAWFont.cxx:404
int getId(MWAWFont const &font)
returns a span id which can be used to call the list
Definition: MWAWFont.cxx:429
Line const & getOverline() const
returns the overline
Definition: MWAWFont.hxx:357
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:127
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:468
@ embossBit
Definition: MWAWFont.hxx:182
@ uppercaseBit
Definition: MWAWFont.hxx:184
internal struct used to create sorted map of font
Definition: MWAWFont.cxx:392
@ Wave
Definition: MWAWFont.hxx:49
void setStrikeOutType(Line::Type type=Line::Single)
sets the strikeoutline type
Definition: MWAWFont.hxx:414
MWAWVariable< int > m_id
font identificator
Definition: MWAWFont.hxx:536
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:406
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:586
bool operator<(Script const &oth) const
operator<
Definition: MWAWFont.hxx:145
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:396
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:463
MWAWVariable< Line > m_overline
overline attributes
Definition: MWAWFont.hxx:544
std::string m_extra
extra data
Definition: MWAWFont.hxx:552
@ initialcaseBit
Definition: MWAWFont.hxx:186
@ boxedRoundedBit
Definition: MWAWFont.hxx:188
float m_width
the width in point
Definition: MWAWFont.hxx:93
Line(Style style=None, Type type=Single, bool wordFlag=false, float w=1.0)
constructor
Definition: MWAWFont.hxx:53
@ None
Definition: MWAWFont.hxx:49
@ shadowBit
Definition: MWAWFont.hxx:183
Type m_type
the type
Definition: MWAWFont.hxx:91
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
void getColor(MWAWColor &c) const
returns the font color
Definition: MWAWFont.hxx:315
@ blinkBit
Definition: MWAWFont.hxx:182
bool operator==(Script const &oth) const
operator==
Definition: MWAWFont.hxx:135
bool operator>=(Script const &oth) const
operator>=
Definition: MWAWFont.hxx:160
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:265
friend std::ostream & operator<<(std::ostream &o, Line const &line)
operator<<
Definition: MWAWFont.cxx:49
librevenge::RVNGUnit m_deltaUnit
the ydelta unit ( point or percent )
Definition: MWAWFont.hxx:176
bool operator!=(Line const &oth) const
operator!=
Definition: MWAWFont.hxx:70
float size() const
returns the font size
Definition: MWAWFont.hxx:249
@ boxedBit
Definition: MWAWFont.hxx:187
bool operator()(MWAWFont const &s1, MWAWFont const &s2) const
comparaison function
Definition: MWAWFont.cxx:394
bool hasDecorationLines() const
return true if the font has decorations line (overline, strikeout, underline)
Definition: MWAWFont.hxx:343
MWAWFontManager & operator=(MWAWFontManager const &)
MWAWFont(int newId=-1, float sz=12, uint32_t f=0)
constructor
Definition: MWAWFont.hxx:196
MWAWVariable< Line > m_strikeoutline
overline attributes
Definition: MWAWFont.hxx:545
void insert(MWAWVariable const &orig)
update the current value if orig is set
Definition: libmwaw_internal.hxx:551
bool operator!=(Script const &oth) const
operator!=
Definition: MWAWFont.hxx:140
void addToListLevel(librevenge::RVNGPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const
add to the propList to a list level
Definition: MWAWFont.cxx:355
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:385
@ Single
Definition: MWAWFont.hxx:51
Style m_style
the style
Definition: MWAWFont.hxx:89
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
MWAWVariable< MWAWColor > m_backgroundColor
font background color
Definition: MWAWFont.hxx:548
Script const & script() const
returns the script position
Definition: MWAWFont.hxx:287
bool m_word
word or not word line
Definition: MWAWFont.hxx:97
int cmp(Script const &oth) const
small comparison function
Definition: MWAWFont.hxx:165
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:112
MWAWVariable< float > m_deltaSpacing
expand(> 0), condensed(< 0) depl
Definition: MWAWFont.hxx:539
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:362
bool operator>(Script const &oth) const
operator>
Definition: MWAWFont.hxx:155
Style
the line style
Definition: MWAWFont.hxx:49
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
shared_ptr< MWAWFontConverter > m_fontConverter
the font converter
Definition: MWAWFont.cxx:408
bool operator==(Line const &oth) const
operator==
Definition: MWAWFont.hxx:65
void setOverlineType(Line::Type type=Line::Single)
sets the overline type
Definition: MWAWFont.hxx:375
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
void setOverlineWordFlag(bool wordFlag=false)
sets the overline word flag
Definition: MWAWFont.hxx:380
@ italicBit
Definition: MWAWFont.hxx:182
@ Dot
Definition: MWAWFont.hxx:49
MWAWVariable< Script > m_scriptPosition
the sub/super script definition
Definition: MWAWFont.hxx:542
the state of a MWAWFontManager
Definition: MWAWFont.cxx:402
float deltaLetterSpacing() const
returns the condensed(negative)/extended(positive) width
Definition: MWAWFont.hxx:261
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:122
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581
MWAWVariable< Line > m_underline
underline attributes
Definition: MWAWFont.hxx:546
void setStrikeOutColor(MWAWColor const &color)
sets the strikeoutline color
Definition: MWAWFont.hxx:429
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:435
MWAWVariable< float > m_size
font size
Definition: MWAWFont.hxx:537
MWAWVariable< uint32_t > m_flags
font attributes
Definition: MWAWFont.hxx:543
MWAWFontManager(MWAWFontManager const &)
void setUnderlineWordFlag(bool wordFlag=false)
sets the underline word flag
Definition: MWAWFont.hxx:458
float widthStreching() const
returns the text width streching
Definition: MWAWFont.hxx:277
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:331
bool getFont(int id, MWAWFont &font) const
returns the font corresponding to an id
Definition: MWAWFont.cxx:439
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:100
std::map< int, MWAWFont > m_idToFontMap
a map id to font map
Definition: MWAWFont.cxx:412
@ Double
Definition: MWAWFont.hxx:51
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
static float getScaleFactor(librevenge::RVNGUnit orig, librevenge::RVNGUnit dest)
Definition: MWAWPosition.hxx:143
Definition: MWAWDocument.hxx:57
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:299
@ Dash
Definition: MWAWFont.hxx:49
Class to store font.
Definition: MWAWFont.hxx:44
MWAWVariable< MWAWColor > m_color
font color
Definition: MWAWFont.hxx:547
int cmp(MWAWFont const &oth) const
a comparison function
Definition: MWAWFont.hxx:503
void setLanguage(std::string const &lang)
set the language ( in the for en_US, en_GB, en, ...)
Definition: MWAWFont.hxx:479
MWAWVariable< MWAWColor > m_color
the color ( if not set, we use the font color )
Definition: MWAWFont.hxx:95
void setStrikeOutWidth(float w)
sets the strikeoutline width
Definition: MWAWFont.hxx:424
MWAWVariable< bool > m_sizeIsRelative
true if the size is percent
Definition: MWAWFont.hxx:538
void setStrikeOutWordFlag(bool wordFlag=false)
sets the strikeoutline word flag
Definition: MWAWFont.hxx:419
@ hiddenBit
Definition: MWAWFont.hxx:183
MWAWVariable< librevenge::RVNGUnit > m_deltaSpacingUnit
the delta spacing unit
Definition: MWAWFont.hxx:540
bool operator==(MWAWFont const &f) const
operator==
Definition: MWAWFont.hxx:492
MWAWVariable< float > m_widthStreching
the width streching in percent
Definition: MWAWFont.hxx:541
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:445
shared_ptr< MWAWFontConverter > getFontConverter()
returns the font converter
Definition: MWAWFont.cxx:424
bool isSet() const
returns true if the font id is initialized
Definition: MWAWFont.hxx:203
int m_scale
the font scaling ( in percent )
Definition: MWAWFont.hxx:178
@ LargeDot
Definition: MWAWFont.hxx:49
MWAWFontManager(shared_ptr< MWAWFontConverter > fontConverter)
constructor
Definition: MWAWFont.cxx:416
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
@ lowercaseBit
Definition: MWAWFont.hxx:185
void setOverlineColor(MWAWColor const &color)
sets the overline color
Definition: MWAWFont.hxx:390
std::ostream & operator<<(std::ostream &o, MWAWFont::Line const &line)
Definition: MWAWFont.cxx:49
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18