31 #include <xlnt/xlnt_config.hpp> 32 #include <xlnt/styles/color.hpp> 33 #include <xlnt/utils/optional.hpp> 34 #include <xlnt/utils/hash_combine.hpp> 66 font &bold(
bool bold);
76 font &subscript(
bool value);
81 bool subscript()
const;
86 font &superscript(
bool value);
91 bool superscript()
const;
96 font &italic(
bool italic);
106 font &strikethrough(
bool strikethrough);
111 bool strikethrough()
const;
116 font &outline(
bool outline);
121 bool outline()
const;
126 font &shadow(
bool shadow);
141 bool underlined()
const;
151 bool has_size()
const;
156 font &size(
double size);
166 bool has_name()
const;
171 font &name(
const std::string &name);
176 const std::string &name()
const;
181 bool has_color()
const;
196 bool has_family()
const;
201 font &family(std::size_t family);
206 std::size_t family()
const;
211 bool has_charset()
const;
218 font &charset(std::size_t charset);
223 std::size_t charset()
const;
228 bool has_scheme()
const;
233 font &scheme(
const std::string &scheme);
238 const std::string &scheme()
const;
274 bool italic_ =
false;
279 bool superscript_ =
false;
284 bool subscript_ =
false;
289 bool strikethrough_ =
false;
294 bool outline_ =
false;
299 bool shadow_ =
false;
341 xlnt::detail::hash_combine(seed, f.
name());
347 xlnt::detail::hash_combine(seed, f.
size());
351 xlnt::detail::hash_combine(seed, f.
bold());
352 xlnt::detail::hash_combine(seed, f.
italic());
354 xlnt::detail::hash_combine(seed, f.
subscript());
356 xlnt::detail::hash_combine(seed, static_cast<int>(f.
underline()));
357 xlnt::detail::hash_combine(seed, f.
outline());
358 xlnt::detail::hash_combine(seed, f.
shadow());
363 xlnt::detail::hash_combine(seed, f.
scheme());
369 xlnt::detail::hash_combine(seed, f.
color());
375 xlnt::detail::hash_combine(seed, f.
family());
381 xlnt::detail::hash_combine(seed, f.
charset());
underline_style
Text can be underlined in the enumerated ways
Definition: font.hpp:49
font & superscript(bool value)
Sets the vertical alignment of the font to superscript and returns a reference to the font...
bool has_name() const
Returns true if this font has a particular face applied (e.g. "Comic Sans").
font & bold(bool bold)
Sets the bold state of the font to bold and returns a reference to the font.
font & outline(bool outline)
Sets the bold state of the font to bold and returns a reference to the font.
bool has_scheme() const
Returns true if this font has a scheme.
Definition: cell_reference.hpp:261
Enumerates the possible types a cell can be determined by it's current value.
Definition: cell.hpp:36
font & underline(underline_style new_underline)
Sets the underline state of the font to new_underline and returns a reference to the font...
Describes the font style of a particular cell.
Definition: font.hpp:43
Colors can be applied to many parts of a cell's style.
Definition: color.hpp:167
font & strikethrough(bool strikethrough)
Sets the bold state of the font to bold and returns a reference to the font.
font & subscript(bool value)
Sets the vertical alignment of the font to subscript and returns a reference to the font...
font & size(double size)
Sets the size of the font to size and returns a reference to the font.
bool operator==(std::nullptr_t, const cell &cell)
Returns true if this cell is uninitialized.
bool has_size() const
Returns true if this font has a defined size.
font & name(const std::string &name)
Sets the font face to name and returns a reference to the font.
bool has_color() const
Returns true if this font has a color applied.
bool operator!=(const font &other) const
Returns true if left is not exactly equal to right.
Definition: font.hpp:248
font & shadow(bool shadow)
Sets the shadow state of the font to shadow and returns a reference to the font.
font & italic(bool italic)
Sets the bold state of the font to bold and returns a reference to the font.
bool has_family() const
Returns true if this font has a family defined.
font & color(const color &c)
Sets the color of the font to c and returns a reference to the font.
font & scheme(const std::string &scheme)
Sets the scheme of the font to scheme and returns a reference to the font.
font & family(std::size_t family)
Sets the family index of the font to family and returns a reference to the font.
bool has_charset() const
Returns true if this font has a charset defined.
font & charset(std::size_t charset)
Sets the charset of the font to charset and returns a reference to the font.
Describes a style which has a name and can be applied to multiple individual formats. In Excel this is a "Cell Style".
Definition: style.hpp:55