#include <config.h>
#include "Buffer.h"
+#include "BufferParams.h"
#include "BufferView.h"
#include "CoordCache.h"
#include "Cursor.h"
{
if (empty())
return 0;
+ BufferParams const & bp = bv().buffer().params();
+ if (bp.useNonTeXFonts)
+ return encodings.fromLyXName("utf8-plain");
+
CursorSlice const & sl = innerTextSlice();
Text const & text = *sl.text();
- Font font = text.getPar(sl.pit()).getFont(
- bv().buffer().params(), sl.pos(), text.outerFont(sl.pit()));
+ Font font = text.getPar(sl.pit()).getFont(bp, sl.pos(),
+ text.outerFont(sl.pit()));
return font.language()->encoding();
}
// The logic here should more or less match to the
// Cursor::setCurrentFont logic, i.e. the cursor height should
// give a hint what will happen if a character is entered.
+ // FIXME: this is not the case, what about removing this method ? (see #10478).
// HACK. far from being perfect...