-/* This file is part of
- * ======================================================
+/**
+ * \file insetlatexaccent.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
+ * \author Lars Gullik Bjønnes
*
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS
+ */
#include <config.h>
// REMOVE IN 0.13
// Dirty Hack for backward compability. remove in 0.13 (Lgb)
- contents = frontStrip(strip(contents));
+ contents = trim(contents);
if (!contains(contents, "{") && !contains(contents, "}")) {
if (contents.length() == 2) {
string tmp;
max = font_metrics::ascent('a', font);
else
max = font_metrics::ascent(ic, font);
- if (plusasc)
+ if (plusasc)
max += (font_metrics::maxAscent(font) + 3) / 3;
} else
max = font_metrics::maxAscent(font) + 4;
{
int max;
if (candisp) {
- if (ic == ' ')
+ if (ic == ' ')
max = font_metrics::descent('a', font);
- else
- max = font_metrics::descent(ic, font);
- if (plusdesc)
- max += 3;
+ else
+ max = font_metrics::descent(ic, font);
+ if (plusdesc)
+ max += 3;
} else
max = font_metrics::maxDescent(font) + 4;
return max;
{
if (candisp)
return font_metrics::width(ic, font);
- else
- return font_metrics::width(contents, font) + 4;
+ else
+ return font_metrics::width(contents, font) + 4;
}
// now the rest - draw within (x, y, x+wid, y+hg)
switch (modtype) {
case ACUTE: // acute 0xB4
- {
+ {
pain.text(int(x2 - (font_metrics::rbearing(0xB4, font) - font_metrics::lbearing(0xB4, font)) / 2),
baseline - font_metrics::ascent(ic, font) - font_metrics::descent(0xB4, font) - (font_metrics::ascent(0xB4, font) + font_metrics::descent(0xB4, font)) / 2,
char(0xB4), font);