*/
#include <config.h>
-#include <gtkmm.h>
-#include <algorithm>
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
+
#include "GtkmmX.h"
-#include "support/lstrings.h"
#include "xftFontLoader.h"
#include "font_metrics.h"
#include "lyxrc.h"
#include "language.h"
#include "codeConvert.h"
+#include "support/lstrings.h"
+
+#include <gtkmm.h>
+
#include <boost/scoped_array.hpp>
+#include <algorithm>
+
+using std::string;
+
namespace {
XftFont * font = getXftFont(f);
XGlyphInfo glyph;
XftTextExtents32(getDisplay(), font,
- wcsToFcChar32StrFast(&c),
+ wcsToXftChar32StrFast(&c),
1,
&glyph);
return XGlyphAscent(glyph);
XftFont * font = getXftFont(f);
XGlyphInfo glyph;
XftTextExtents32(getDisplay(), font,
- wcsToFcChar32StrFast(&c),
+ wcsToXftChar32StrFast(&c),
1,
&glyph);
return XGlyphDescent(glyph);
int lbearing(wchar_t c,LyXFont const & f)
- {
+{
XftFont * font = getXftFont(f);
XGlyphInfo glyph;
XftTextExtents32(getDisplay(), font,
- wcsToFcChar32StrFast(&c),
+ wcsToXftChar32StrFast(&c),
1,
&glyph);
return XGlyphLbearing(glyph);
- }
+}
int rbearing(wchar_t c,LyXFont const & f)
XftFont * font = getXftFont(f);
XGlyphInfo glyph;
XftTextExtents32(getDisplay(), font,
- wcsToFcChar32StrFast(&c),
+ wcsToXftChar32StrFast(&c),
1,
&glyph);
return XGlyphRbearing(glyph);
XGlyphInfo glyph;
if (f.realShape() != LyXFont::SMALLCAPS_SHAPE){
XftTextExtents32(getDisplay(), font,
- wcsToFcChar32StrFast(s),
+ const_cast<XftChar32 *>(
+ wcsToXftChar32StrFast(s)),
n,
&glyph);
return XGlyphLogWidth(glyph);
wchar_t wc = lyx::support::uppercase(s[i]);
if (wc != s[i]) {
XftTextExtents32(getDisplay(), fontS,
- wcsToFcChar32StrFast(&wc),
+ wcsToXftChar32StrFast(&wc),
1,
&glyph);
result += XGlyphLogWidth(glyph);
} else {
XftTextExtents32(getDisplay(), font,
- wcsToFcChar32StrFast(&wc),
+ wcsToXftChar32StrFast(&wc),
1,
&glyph);
result += XGlyphLogWidth(glyph);
}
-int width(char const * s, size_t n,LyXFont const & f)
+int width(char const * s, size_t n, LyXFont const & f)
{
boost::scoped_array<wchar_t> wcs(new wchar_t[n]);
size_t len;