]> git.lyx.org Git - features.git/blobdiff - src/frontends/WorkArea.C
This commit is a big rework of the FontLoader/FontMetrics interaction. Only Qt4 for...
[features.git] / src / frontends / WorkArea.C
index aa4089a26cffe60a294cd48de75149ace8e9f1c5..0f6d88d6895d1e275d0c251bd38d3f69565fade2 100644 (file)
 
 #include <config.h>
 
-#include "WorkArea.h"
+#include "frontends/WorkArea.h"
+
+#include "frontends/Application.h"
+#include "frontends/FontLoader.h"
+#include "frontends/FontMetrics.h"
 
-#include "font_metrics.h"
 #include "funcrequest.h"
 #include "lyx_gui.h"
 #include "lyxfunc.h"
@@ -372,8 +375,9 @@ void WorkArea::showCursor()
                shape = BAR_SHAPE;
 
        LyXFont const font = buffer_view_->cursor().getFont();
-       int const asc = font_metrics::maxAscent(font);
-       int const des = font_metrics::maxDescent(font);
+       FontMetrics const & fm = theApp->fontLoader().metrics(font);
+       int const asc = fm.maxAscent();
+       int const des = fm.maxDescent();
        int h = asc + des;
        int x = 0;
        int y = 0;