11#ifndef OPENXLSX_XLSTYLES_FONTS_HPP
12#define OPENXLSX_XLSTYLES_FONTS_HPP
16# pragma warning(disable : 4251)
17# pragma warning(disable : 4275)
27#include <unordered_map>
198 std::unique_ptr<XMLNode> m_fontNode;
253 size_t count()
const;
285 XLStyleIndex findOrCreate(XLFont copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
288 std::unique_ptr<XMLNode> m_fontsNode;
289 std::vector<XLFont> m_fonts;
290 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
Definition XLColor.hpp:32
Definition XLStyles_Fonts.hpp:34
XLFont(XLFont &&other) noexcept=default
Move Constructor.
XLFont & operator=(const XLFont &other)
Copy assignment operator.
Definition XLStyles_Fonts.cpp:79
XLFont & setVertAlign(XLVerticalAlignRunStyle newVertAlign)
Definition XLStyles_Fonts.cpp:180
XLFontSchemeStyle scheme() const
get the font scheme: none, major or minor
Definition XLStyles_Fonts.cpp:121
XLFont & setShadow(bool set=true)
Definition XLStyles_Fonts.cpp:190
XLFont & setFontName(std::string_view newName)
Setter functions for style parameters.
Definition XLStyles_Fonts.cpp:130
XLFont & setExtend(bool set=true)
Definition XLStyles_Fonts.cpp:200
XLFont & setFontCharset(size_t newCharset)
Definition XLStyles_Fonts.cpp:135
XLUnderlineStyle underline() const
Get the font underline status.
Definition XLStyles_Fonts.cpp:119
size_t fontSize() const
Get the font size.
Definition XLStyles_Fonts.cpp:103
XLFont & setFontFamily(size_t newFamily)
Definition XLStyles_Fonts.cpp:140
XLFont & setOutline(bool set=true)
Definition XLStyles_Fonts.cpp:185
XLFont & setFontSize(size_t newSize)
Definition XLStyles_Fonts.cpp:145
XLFont & setFontColor(XLColor newColor)
Definition XLStyles_Fonts.cpp:150
std::string summary() const
Return a string summary of the font properties.
Definition XLStyles_Fonts.cpp:206
XLVerticalAlignRunStyle vertAlign() const
get the font vertical alignment run style: baseline, subscript or superscript
Definition XLStyles_Fonts.cpp:123
XLFont & setUnderline(XLUnderlineStyle style=XLUnderlineSingle)
Definition XLStyles_Fonts.cpp:170
friend class XLStyles
Definition XLStyles_Fonts.hpp:36
XLFont & setBold(bool set=true)
Definition XLStyles_Fonts.cpp:155
std::string fontName() const
Get the font name.
Definition XLStyles_Fonts.cpp:85
bool italic() const
Get the font italic (cursive) status.
Definition XLStyles_Fonts.cpp:117
XLFont & setStrikethrough(bool set=true)
Definition XLStyles_Fonts.cpp:165
bool shadow() const
Get the shadow status.
Definition XLStyles_Fonts.cpp:126
XLFont & setScheme(XLFontSchemeStyle newScheme)
Definition XLStyles_Fonts.cpp:175
size_t fontFamily() const
Get the font family.
Definition XLStyles_Fonts.cpp:97
bool outline() const
Get the outline status.
Definition XLStyles_Fonts.cpp:125
XLFont & operator=(XLFont &&other) noexcept=default
Move assignment operator.
XLFont & setItalic(bool set=true)
Definition XLStyles_Fonts.cpp:160
friend class XLFonts
Definition XLStyles_Fonts.hpp:35
bool condense() const
Get the condense status.
Definition XLStyles_Fonts.cpp:127
bool extend() const
Get the extend status.
Definition XLStyles_Fonts.cpp:128
size_t fontCharset() const
Get the font charset.
Definition XLStyles_Fonts.cpp:91
XLFont & setCondense(bool set=true)
Definition XLStyles_Fonts.cpp:195
XLFont()
Definition XLStyles_Fonts.cpp:71
bool strikethrough() const
Get the font strikethrough status.
Definition XLStyles_Fonts.cpp:118
XLColor fontColor() const
Get the font color.
Definition XLStyles_Fonts.cpp:109
bool bold() const
Get the font bold status.
Definition XLStyles_Fonts.cpp:116
XLFonts()
Definition XLStyles_Fonts.cpp:228
XLFonts & operator=(XLFonts &&other) noexcept=default
Move assignment operator.
size_t count() const
Get the count of fonts.
Definition XLStyles_Fonts.cpp:263
XLFonts & operator=(const XLFonts &other)
Copy assignment operator.
Definition XLStyles_Fonts.cpp:253
XLFont operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to fontByIndex.
Definition XLStyles_Fonts.hpp:267
XLFont fontByIndex(XLStyleIndex index) const
Get the font identified by index.
Definition XLStyles_Fonts.cpp:265
Definition IXLCellProvider.hpp:24
XLUnderlineStyle
Definition XLStyles_Common.hpp:88
@ XLUnderlineSingle
Definition XLStyles_Common.hpp:90
OpenXLSX_xml_node XMLNode
Definition XLXmlParser.hpp:64
XLFontSchemeStyle
Definition XLStyles_Common.hpp:97
size_t XLStyleIndex
Definition XLStyles_Common.hpp:36
XLVerticalAlignRunStyle
Definition XLStyles_Common.hpp:104