From 1c2cf3567cdaa4cbb257535e52fabab3273aa2d5 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 31 May 2007 16:40:11 +0000 Subject: [PATCH] Put again the (slightly edited) caution warning from Georg Baum about abusing the ucs4_to_qchar() conversion with symbol fonts. This comment was accidentally deleted in rev 18593. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18598 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiFontMetrics.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index d9e1348613..6e40804ddd 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -25,6 +25,13 @@ using std::string; namespace lyx { namespace frontend { +// Caution: When using ucs4_to_qchar() in these methods, this is no +// real conversion but a simple cast in reality. This is the reason +// why this works well for symbol fonts used in mathed too, even though +// these are not real ucs4 characters. These are codepoints in the +// modern fonts used, nothing unicode related. +// See comment in QLPainter::text() for more explanation. + GuiFontMetrics::GuiFontMetrics(QFont const & font) : metrics_(font), smallcaps_metrics_(font), smallcaps_shape_(false) { -- 2.39.2