/* $Id: font.hg,v 1.11 2002/09/10 10:05:33 murrayc Exp $ */ /* font.h * * Copyright (C) 1998-1999 The gtkmm 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #include #include _DEFS(pangomm,pango) _PINCLUDE(glibmm/private/object_p.h) namespace Pango { const int SCALE = 1024; const double SCALE_XX_SMALL = 0.5787037037037; const double SCALE_X_SMALL = 0.6444444444444; const double SCALE_SMALL = 0.8333333333333; const double SCALE_MEDIUM = 1.0; const double SCALE_LARGE = 1.2; const double SCALE_X_LARGE = 1.4399999999999; const double SCALE_XX_LARGE = 1.728; /** A Pango::Font is used to represent a font in a rendering-system-independent matter. */ class Font : public Glib::Object { _CLASS_GOBJECT(Font, PangoFont, PANGO_FONT, Glib::Object, GObject) _IGNORE(pango_font_find_shaper) //This would return a PangoEngineShape* but the definition of the struct is surrounded by #define PANGO_ENABLE_BACKEND [...] #endif. So don't wrap it. public: _WRAP_METHOD(FontDescription describe() const, pango_font_describe) _WRAP_METHOD(Glib::RefPtr get_coverage(const Language& language) const, pango_font_get_coverage) /** Gets overall metric information for a font. * The metrics may be substantially different for different scripts. * However, this function overload returns the metrics for the entire font. */ FontMetrics get_metrics() const; _WRAP_METHOD(FontMetrics get_metrics(const Language& language) const, pango_font_get_metrics) _WRAP_METHOD(void get_glyph_extents(Glyph glyph, Rectangle& ink_rect, Rectangle& logical_rect) const, pango_font_get_glyph_extents) /** Get the ink extents of a glyph within the font. * @param glyph The glyph index. * @return The extents of the glyph as drawn. */ Rectangle get_glyph_ink_extents(Glyph glyph) const; /** Gets the logical extents of a glyph within the font. * @param glyph The glyph index. * @return The logical extents of the glyph. */ Rectangle get_glyph_logical_extents(Glyph glyph) const; }; } /* namespace Pango */