3 * \file xftFontMetrics.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
12 #ifndef XFT_FONT_METRICS_H
13 #define XFT_FONT_METRICS_H
15 #include "frontends/FontMetrics.h"
18 #include <X11/Xft/Xft.h>
20 class font_metrics: public lyx::frontend::FontMetrics
24 font_metrics(XftFont * f, XftFont * scf);
26 virtual ~font_metrics() {}
28 virtual int maxAscent() const;
29 virtual int maxDescent() const;
30 virtual int ascent(lyx::char_type c) const;
31 int descent(lyx::char_type c) const;
32 virtual int lbearing(lyx::char_type c) const;
33 virtual int rbearing(lyx::char_type c) const;
34 virtual int width(lyx::char_type const * s, size_t n) const;
35 virtual int signedWidth(lyx::docstring const & s) const;
36 virtual void rectText(lyx::docstring const & str,
40 virtual void buttonText(lyx::docstring const & str,
48 #endif // XFT_FONT_METRICS_H