From 3490f23a1d21de518e664ecec6960aeda20ef7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Wed, 22 Feb 2006 15:44:57 +0000 Subject: [PATCH] Fix defaultFont problems (bug 2308) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13266 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/insets/ChangeLog | 4 ++++ src/insets/insetfootlike.C | 6 ++++-- src/rowpainter.C | 1 - 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6d4b32b3e5..4f0f649919 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-02-22 Jürgen Spitzmüller + + * rowpainter.C (paintFromPos): ditch applyOuterFont (bug 2308). + 2006-02-06 Georg Baum * text2.C (deleteEmptyParagraphMechanism): 64bit compile fix diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 89d6064c64..8a037287a7 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2006-02-22 Jürgen Spitzmüller + + * insetfootlike.C (metrics, draw): use buffer's default font (bug 2308). + 2006-02-05 Martin Vermeer * insettext.C: Fix bug 2115: blue language lines (for default font) diff --git a/src/insets/insetfootlike.C b/src/insets/insetfootlike.C index 6e33522aed..154c29cdb6 100644 --- a/src/insets/insetfootlike.C +++ b/src/insets/insetfootlike.C @@ -13,6 +13,8 @@ #include "insetfootlike.h" #include "buffer.h" +#include "BufferView.h" +#include "bufferparams.h" #include "LColor.h" #include "metricsinfo.h" #include "paragraph.h" @@ -45,7 +47,7 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in) void InsetFootlike::metrics(MetricsInfo & mi, Dimension & dim) const { LyXFont tmpfont = mi.base.font; - mi.base.font = LyXFont(LyXFont::ALL_SANE); + mi.base.font = mi.base.bv->buffer()->params().getFont(); InsetCollapsable::metrics(mi, dim); mi.base.font = tmpfont; dim_ = dim; @@ -55,7 +57,7 @@ void InsetFootlike::metrics(MetricsInfo & mi, Dimension & dim) const void InsetFootlike::draw(PainterInfo & pi, int x, int y) const { LyXFont tmpfont = pi.base.font; - pi.base.font = LyXFont(LyXFont::ALL_SANE); + pi.base.font = pi.base.bv->buffer()->params().getFont(); InsetCollapsable::draw(pi, x, y); pi.base.font = tmpfont; } diff --git a/src/rowpainter.C b/src/rowpainter.C index 8d56f11cdf..2b8193f5ea 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -306,7 +306,6 @@ void RowPainter::paintFromPos(pos_type & vpos) { pos_type const pos = text_.bidi.vis2log(vpos); LyXFont orig_font = text_.getFont(par_, pos); - text_.applyOuterFont(orig_font); double const orig_x = x_;