/usr/include/cairomm-1.0/cairomm/fontoptions.h is in libcairomm-1.0-dev 1.12.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | /* Copyright (C) 2005 The cairomm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef __CAIROMM_FONTOPTIONS_H
#define __CAIROMM_FONTOPTIONS_H
#include <cairomm/enums.h>
#include <string>
//#include <cairo.h>
#ifdef CAIRO_HAS_FT_FONT
#include <cairo-ft.h>
#endif // CAIRO_HAS_FT_FONT
namespace Cairo
{
/**
* The font options specify how fonts should be rendered. Most of the
* time the font options implied by a surface are just right and do not
* need any changes, but for pixel-based targets tweaking font options
* may result in superior output on a particular display.
*/
class FontOptions
{
public:
FontOptions();
explicit FontOptions(cairo_font_options_t* cobject, bool take_ownership = false);
FontOptions(const FontOptions& src);
virtual ~FontOptions();
FontOptions& operator=(const FontOptions& src);
bool operator ==(const FontOptions& src) const;
//bool operator !=(const FontOptions& src) const;
/**
* Merges non-default options from @a other into this, replacing existing
* values. This operation can be thought of as somewhat similar to compositing
* @a other onto this with the operation of OPERATION_OVER.
*
* @param other another FontOptions
**/
void merge(const FontOptions& other);
/**
* Compute a hash for the font options object; this value will be useful when
* storing an object containing a FontOptions in a hash table.
*
* @return the hash value for the font options object. The return value can
* be cast to a 32-bit type if a 32-bit hash value is needed.
**/
unsigned long hash() const;
/**
* Sets the antialiasing mode for the font options object. This
* specifies the type of antialiasing to do when rendering text.
*
* @param antialias the new antialiasing mode.
**/
void set_antialias(Antialias antialias);
/**
* Gets the antialiasing mode for the font options object.
*
* @return the antialiasing mode
**/
Antialias get_antialias() const;
/**
* Sets the subpixel order for the font options object. The subpixel order
* specifies the order of color elements within each pixel on the display
* device when rendering with an antialiasing mode of
* Cairo::ANTIALIAS_SUBPIXEL. See the documentation for SubpixelOrder for
* full details.
*
* @param subpixel_order the new subpixel order.
**/
void set_subpixel_order(SubpixelOrder subpixel_order);
/**
* Gets the subpixel order for the font options object. See the documentation
* for SubpixelOrder for full details.
*
* @return the subpixel order for the font options object.
**/
SubpixelOrder get_subpixel_order() const;
/**
* Sets the hint style for font outlines for the font options object. This
* controls whether to fit font outlines to the pixel grid, and if so, whether
* to optimize for fidelity or contrast. See the documentation for
* HintStyle for full details.
*
* @param hint_style the new hint style.
**/
void set_hint_style(HintStyle hint_style);
/**
* Gets the hint style for font outlines for the font options object.
* See the documentation for HintStyle for full details.
*
* @return the hint style for the font options object.
**/
HintStyle get_hint_style() const;
/**
* Sets the metrics hinting mode for the font options object. This
* controls whether metrics are quantized to integer values in
* device units.
* See the documentation for HintMetrics for full details.
*
* @param hint_metrics the new metrics hinting mode.
**/
void set_hint_metrics(HintMetrics hint_metrics);
/**
* Gets the metrics hinting mode for the font options object. See the
* documentation for HintMetrics for full details.
*
* Return value: the metrics hinting mode for the font options object.
**/
HintMetrics get_hint_metrics() const;
#ifdef CAIRO_HAS_FT_FONT
#ifdef CAIRO_HAS_FC_FONT
/** Add options to a FcPattern based on a cairo_font_options_t font options
* object. Options that are already in the pattern, are not overridden, so you
* should call this function after calling FcConfigSubstitute() (the user's
* settings should override options based on the surface type), but before
* calling FcDefaultSubstitute().
*
* @param pattern an existing FcPattern.
*
* @since 1.8
*/
void substitute(FcPattern* pattern);
#endif // CAIRO_HAS_FC_FONT
#endif // CAIRO_HAS_FT_FONT
typedef cairo_font_options_t cobject;
inline cobject* cobj() { return m_cobject; }
inline const cobject* cobj() const { return m_cobject; }
#ifndef DOXYGEN_IGNORE_THIS
///For use only by the cairomm implementation.
inline ErrorStatus get_status() const
{ return cairo_font_options_status(const_cast<cairo_font_options_t*>(cobj())); }
#endif //DOXYGEN_IGNORE_THIS
protected:
cobject* m_cobject;
};
} // namespace Cairo
#endif //__CAIROMM_FONTOPTIONS_H
// vim: ts=2 sw=2 et
|