2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
31 int maxAscent(LyXFont const & f);
34 int maxDescent(LyXFont const & f);
37 int ascent(char c, LyXFont const & f);
40 int descent(char c, LyXFont const & f);
43 int lbearing(char c, LyXFont const & f);
46 int rbearing(char c, LyXFont const & f);
49 int width(char c, LyXFont const & f) {
50 return width(&c, 1, f);
54 int width(char const * s, size_t n, LyXFont const & f);
57 int width(string const & s, LyXFont const & f) {
58 if (s.empty()) return 0;
59 return width(s.c_str(), s.length(), f);
63 int width(char const * s, LyXFont const & f) {
64 return width(s, strlen(s), f);
68 int signedWidth(string const & s, LyXFont const & f);
71 int XTextWidth(LyXFont const & f, char const * str, int count);
74 int width(XChar2b const * s, int n, LyXFont const & f);
77 int XTextWidth16(LyXFont const & f, XChar2b const * str, int count);
80 void XSetFont(Display * display, GC gc, LyXFont const & f);
83 //} // end of namespace font
85 // import into namespace lyx
86 //using font::maxAscent;
87 //using font::maxDescent;
89 //using font::descent;
90 //using font::lbearing;
91 //using font::rbearing;
93 //using font::signedWidth;
94 //using font::XTextWidth;
95 //using font::XSetFont;
97 //} // end of namespace lyx