1 /* Copyright (C) 2005 The cairomm Development Team
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #ifndef __CAIROMM_FONTOPTIONS_H
20 #define __CAIROMM_FONTOPTIONS_H
22 #include <cairomm/enums.h>
30 /** How a font should be rendered.
36 explicit FontOptions(cairo_font_options_t* cobject, bool take_ownership = false);
37 FontOptions(const FontOptions& src);
39 virtual ~FontOptions();
41 FontOptions& operator=(const FontOptions& src);
43 bool operator ==(const FontOptions& src) const;
44 //bool operator !=(const FontOptions& src) const;
46 void merge(const FontOptions& other);
48 unsigned long hash() const;
50 void set_antialias(Antialias antialias);
51 Antialias get_antialias() const;
53 void set_subpixel_order(SubpixelOrder subpixel_order);
54 SubpixelOrder get_subpixel_order() const;
56 void set_hint_style(HintStyle hint_style);
57 HintStyle get_hint_style() const;
59 void set_hint_metrics(HintMetrics hint_metrics);
60 HintMetrics get_hint_metrics() const;
62 typedef cairo_font_options_t cobject;
63 inline cobject* cobj() { return m_cobject; }
64 inline const cobject* cobj() const { return m_cobject; }
66 #ifndef DOXYGEN_IGNORE_THIS
67 ///For use only by the cairomm implementation.
68 inline ErrorStatus get_status() const
69 { return cairo_font_options_status(const_cast<cairo_font_options_t*>(cobj())); }
70 #endif //DOXYGEN_IGNORE_THIS
79 #endif //__CAIROMM_FONTOPTIONS_H