]> git.lyx.org Git - features.git/commitdiff
API cosmetics
authorAndré Pönitz <poenitz@gmx.net>
Wed, 27 Feb 2008 23:03:26 +0000 (23:03 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 27 Feb 2008 23:03:26 +0000 (23:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23295 a592a061-630c-0410-9148-cb99ea01b6c8

12 files changed:
src/BufferView.cpp
src/Cursor.cpp
src/FontIterator.cpp
src/Text.cpp
src/Text.h
src/Text2.cpp
src/Text3.cpp
src/TextMetrics.cpp
src/TextMetrics.h
src/insets/InsetTabular.cpp
src/rowpainter.cpp
src/rowpainter.h

index 7546f22031b7099e3b847d205b0935fe77ae5f65..c6d5b6aee867f750751e7aac6fbbaa4aa80bb673 100644 (file)
@@ -768,7 +768,7 @@ void BufferView::showCursor(DocIterator const & dit)
        else if (bot_pit == tm.last().first + 1)
                tm.newParMetricsDown();
 
-       if (tm.has(bot_pit)) {
+       if (tm.contains(bot_pit)) {
                ParagraphMetrics const & pm = tm.parMetrics(bot_pit);
                BOOST_ASSERT(!pm.rows().empty());
                // FIXME: smooth scrolling doesn't work in mathed.
@@ -1995,7 +1995,7 @@ Point BufferView::getPos(DocIterator const & dit, bool boundary) const
 {
        CursorSlice const & bot = dit.bottom();
        TextMetrics const & tm = textMetrics(bot.text());
-       if (!tm.has(bot.pit()))
+       if (!tm.contains(bot.pit()))
                return Point(-1, -1);
 
        Point p = coordOffset(dit, boundary); // offset from outer paragraph
index cd7730d77aff35e85684716cee0a016f0ccae285..de64c507fb6c82cf58dd5901e6de8b42ced891c0 100644 (file)
@@ -1825,7 +1825,7 @@ void Cursor::setCurrentFont()
        // get font
        BufferParams const & bufparams = buffer().params();
        current_font = par.getFontSettings(bufparams, cpos);
-       real_current_font = tm.getDisplayFont(cpit, cpos);
+       real_current_font = tm.displayFont(cpit, cpos);
 
        // special case for paragraph end
        if (cs.pos() == lastpos()
index e4c2406fa61680856f42e9f67ddbd2f6bb7fb661..e104ca414d31a276ca8c8dd16571d64a2bb2d4a4 100644 (file)
@@ -23,7 +23,7 @@ namespace lyx {
 FontIterator::FontIterator(TextMetrics const & tm,
                Paragraph const & par, pit_type pit, pos_type pos)
        : tm_(tm), par_(par), pit_(pit), pos_(pos),
-         font_(tm.getDisplayFont(pit, pos)),
+         font_(tm.displayFont(pit, pos)),
          endspan_(par.fontSpan(pos).last),
          bodypos_(par.beginOfBody())
 {}
@@ -45,7 +45,7 @@ FontIterator & FontIterator::operator++()
 {
        ++pos_;
        if (pos_ > endspan_ || pos_ == bodypos_) {
-               font_ = tm_.getDisplayFont(pit_, pos_);
+               font_ = tm_.displayFont(pit_, pos_);
                endspan_ = par_.fontSpan(pos_).last;
        }
        return *this;
index c238f24483e0ae8b65a01fe194047698f1ed346c..7db3b5db2daf2227ab1b1125ab0f92302c24ab64 100644 (file)
@@ -450,8 +450,8 @@ void Text::insertChar(Cursor & cur, char_type c)
                            !(contains(number_seperators, c) &&
                              cur.pos() != 0 &&
                              cur.pos() != cur.lastpos() &&
-                             tm.getDisplayFont(pit, cur.pos()).fontInfo().number() == FONT_ON &&
-                             tm.getDisplayFont(pit, cur.pos() - 1).fontInfo().number() == FONT_ON)
+                             tm.displayFont(pit, cur.pos()).fontInfo().number() == FONT_ON &&
+                             tm.displayFont(pit, cur.pos() - 1).fontInfo().number() == FONT_ON)
                           )
                                number(cur); // Set current_font.number to OFF
                } else if (isDigit(c) &&
@@ -469,7 +469,7 @@ void Text::insertChar(Cursor & cur, char_type c)
                                                tm.font_);
                                } else if (contains(number_seperators, c)
                                     && cur.pos() >= 2
-                                    && tm.getDisplayFont(pit, cur.pos() - 2).fontInfo().number() == FONT_ON) {
+                                    && tm.displayFont(pit, cur.pos() - 2).fontInfo().number() == FONT_ON) {
                                        setCharFont(buffer, pit, cur.pos() - 1, cur.current_font,
                                                tm.font_);
                                }
@@ -502,7 +502,7 @@ void Text::insertChar(Cursor & cur, char_type c)
        if ((cur.pos() >= 2) && (par.isLineSeparator(cur.pos() - 1))) {
                // get font in front and behind the space in question. But do NOT 
                // use getFont(cur.pos()) because the character c is not inserted yet
-               Font const pre_space_font  = tm.getDisplayFont(cur.pit(), cur.pos() - 2);
+               Font const pre_space_font  = tm.displayFont(cur.pit(), cur.pos() - 2);
                Font const & post_space_font = cur.real_current_font;
                bool pre_space_rtl  = pre_space_font.isVisibleRightToLeft();
                bool post_space_rtl = post_space_font.isVisibleRightToLeft();
@@ -515,7 +515,7 @@ void Text::insertChar(Cursor & cur, char_type c)
                                (pre_space_rtl == par.isRTL(buffer.params())) ?
                                pre_space_font.language() : post_space_font.language();
 
-                       Font space_font = tm.getDisplayFont(cur.pit(), cur.pos() - 1);
+                       Font space_font = tm.displayFont(cur.pit(), cur.pos() - 1);
                        space_font.setLanguage(lang);
                        par.setFont(cur.pos() - 1, space_font);
                }
index 323bdabaa9494aca9cd6606402c0d2f4d6a6a655..027fd0e8043880cf3347fd2444982e9ca68f81dc 100644 (file)
@@ -48,9 +48,9 @@ public:
        bool empty() const;
 
        ///
-       FontInfo getLayoutFont(Buffer const & buffer, pit_type pit) const;
+       FontInfo layoutFont(Buffer const & buffer, pit_type pit) const;
        ///
-       FontInfo getLabelFont(Buffer const & buffer,
+       FontInfo labelFont(Buffer const & buffer,
                Paragraph const & par) const;
        /** Set font of character at position \p pos in paragraph \p pit.
         *  Must not be called if \p pos denotes an inset with text contents,
@@ -319,4 +319,4 @@ private:
 
 } // namespace lyx
 
-#endif // LYXTEXT_H
+#endif // TEXT_H
index b7dc9a13d60373425bf835bd9eebf70d52594ef0..39300ba3f71160275004e73252326683b25c3c67 100644 (file)
@@ -73,7 +73,7 @@ bool Text::isMainText(Buffer const & buffer) const
 }
 
 
-FontInfo Text::getLayoutFont(Buffer const & buffer, pit_type const pit) const
+FontInfo Text::layoutFont(Buffer const & buffer, pit_type const pit) const
 {
        LayoutPtr const & layout = pars_[pit].layout();
 
@@ -94,7 +94,7 @@ FontInfo Text::getLayoutFont(Buffer const & buffer, pit_type const pit) const
 }
 
 
-FontInfo Text::getLabelFont(Buffer const & buffer, Paragraph const & par) const
+FontInfo Text::labelFont(Buffer const & buffer, Paragraph const & par) const
 {
        LayoutPtr const & layout = par.layout();
 
@@ -308,9 +308,9 @@ void Text::setFont(Cursor & cur, Font const & font, bool toggleall)
        FontInfo layoutfont;
        pit_type pit = cur.pit();
        if (cur.pos() < pars_[pit].beginOfBody())
-               layoutfont = getLabelFont(cur.buffer(), pars_[pit]);
+               layoutfont = labelFont(cur.buffer(), pars_[pit]);
        else
-               layoutfont = getLayoutFont(cur.buffer(), pit);
+               layoutfont = layoutFont(cur.buffer(), pit);
 
        // Update current font
        cur.real_current_font.update(font,
@@ -360,7 +360,7 @@ void Text::setFont(BufferView const & bv, CursorSlice const & begin,
                        setInsetFont(bv, pit, pos, font, toggleall);
                }
                TextMetrics const & tm = bv.textMetrics(this);
-               Font f = tm.getDisplayFont(pit, pos);
+               Font f = tm.displayFont(pit, pos);
                f.update(font, language, toggleall);
                setCharFont(buffer, pit, pos, f, tm.font_);
        }
@@ -526,7 +526,7 @@ bool Text::setCursor(Cursor & cur, pit_type par, pos_type pos,
                        bool setfont, bool boundary)
 {
        TextMetrics const & tm = cur.bv().textMetrics(this);
-       bool const update_needed = !tm.has(par);
+       bool const update_needed = !tm.contains(par);
        Cursor old = cur;
        setCursorIntern(cur, par, pos, setfont, boundary);
        return cur.bv().checkDepm(cur, old) || update_needed;
index 303eaf9f66d6432a46f0c1accd1d3a2de9b27d68..1a7f3f1b8baf0a8512fff56e6688ec0df9d68460 100644 (file)
@@ -387,7 +387,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        BufferView * bv = &cur.bv();
        TextMetrics & tm = bv->textMetrics(this);
-       if (!tm.has(cur.pit()))
+       if (!tm.contains(cur.pit()))
                lyx::dispatch(FuncRequest(LFUN_SCREEN_RECENTER));
 
        // FIXME: We use the update flag to indicates wether a singlePar or a
index acf39a45fbd174f94625391649b6f15d1e0040f5..db45eb842e6b54155d194b61782b2f9faa4e708b 100644 (file)
@@ -128,7 +128,7 @@ TextMetrics::TextMetrics(BufferView * bv, Text * text)
 }
 
 
-bool TextMetrics::has(pit_type pit) const
+bool TextMetrics::contains(pit_type pit) const
 {
        return par_metrics_.find(pit) != par_metrics_.end();
 }
@@ -241,7 +241,7 @@ void TextMetrics::applyOuterFont(Font & font) const
 }
 
 
-Font TextMetrics::getDisplayFont(pit_type pit, pos_type pos) const
+Font TextMetrics::displayFont(pit_type pit, pos_type pos) const
 {
        BOOST_ASSERT(pos >= 0);
 
@@ -302,7 +302,7 @@ bool TextMetrics::isRTL(CursorSlice const & sl, bool boundary) const
        if (boundary && sl.pos() > 0)
                correction = -1;
                
-       return getDisplayFont(sl.pit(), sl.pos() + correction).isVisibleRightToLeft();
+       return displayFont(sl.pit(), sl.pos() + correction).isVisibleRightToLeft();
 }
 
 
@@ -317,12 +317,12 @@ bool TextMetrics::isRTLBoundary(pit_type pit, pos_type pos) const
 
        Paragraph const & par = text_->getPar(pit);
 
-       bool left = getDisplayFont(pit, pos - 1).isVisibleRightToLeft();
+       bool left = displayFont(pit, pos - 1).isVisibleRightToLeft();
        bool right;
        if (pos == par.size())
                right = par.isRTL(bv_->buffer().params());
        else
-               right = getDisplayFont(pit, pos).isVisibleRightToLeft();
+               right = displayFont(pit, pos).isVisibleRightToLeft();
        return left != right;
 }
 
@@ -339,7 +339,7 @@ bool TextMetrics::isRTLBoundary(pit_type pit, pos_type pos,
        if (pos == par.size())
                right = par.isRTL(bv_->buffer().params());
        else
-               right = getDisplayFont(pit, pos).isVisibleRightToLeft();
+               right = displayFont(pit, pos).isVisibleRightToLeft();
        return left != right;
 }
 
@@ -414,7 +414,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
                int const w = max_width_ - leftMargin(max_width_, pit, ii->pos)
                        - right_margin;
                Font const & font = ii->inset->noFontChange() ?
-                       bufferfont : getDisplayFont(pit, ii->pos);
+                       bufferfont : displayFont(pit, ii->pos);
                MacroContext mc(buffer, parPos);
                MetricsInfo mi(bv_, font.fontInfo(), w, mc);
                ii->inset->metrics(mi, dim);
@@ -627,7 +627,7 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
                if (body_pos > 0
                    && (body_pos > end || !par.isLineSeparator(body_pos - 1)))
                {
-                       row.x += theFontMetrics(text_->getLabelFont(buffer, par)).
+                       row.x += theFontMetrics(text_->labelFont(buffer, par)).
                                width(layout->labelsep);
                        if (body_pos <= end)
                                row.x += row.label_hfill;
@@ -684,7 +684,7 @@ int TextMetrics::labelFill(pit_type const pit, Row const & row) const
                return 0;
 
        FontMetrics const & fm
-               = theFontMetrics(text_->getLabelFont(buffer, par));
+               = theFontMetrics(text_->labelFont(buffer, par));
 
        return max(0, fm.width(label) - w);
 }
@@ -767,7 +767,7 @@ pit_type TextMetrics::rowBreakPoint(int width, pit_type const pit,
                // add the auto-hfill from label end to the body
                if (body_pos && i == body_pos) {
                        FontMetrics const & fm = theFontMetrics(
-                               text_->getLabelFont(buffer, par));
+                               text_->labelFont(buffer, par));
                        int add = fm.width(layout->labelsep);
                        if (par.isLineSeparator(i - 1))
                                add -= singleWidth(pit, i - 1);
@@ -864,7 +864,7 @@ int TextMetrics::rowWidth(int right_margin, pit_type const pit,
                for ( ; i < end; ++i, ++fi) {
                        if (body_pos > 0 && i == body_pos) {
                                FontMetrics const & fm = theFontMetrics(
-                                       text_->getLabelFont(buffer, par));
+                                       text_->labelFont(buffer, par));
                                w += fm.width(par.layout()->labelsep);
                                if (par.isLineSeparator(i - 1))
                                        w -= singleWidth(pit, i - 1);
@@ -883,7 +883,7 @@ int TextMetrics::rowWidth(int right_margin, pit_type const pit,
 
        if (body_pos > 0 && body_pos >= end) {
                FontMetrics const & fm = theFontMetrics(
-                       text_->getLabelFont(buffer, par));
+                       text_->labelFont(buffer, par));
                w += fm.width(par.layout()->labelsep);
                if (end > 0 && par.isLineSeparator(end - 1))
                        w -= singleWidth(pit, end - 1);
@@ -913,13 +913,13 @@ Dimension TextMetrics::rowHeight(pit_type const pit, pos_type const first,
        // start with so we don't have to do the assignment below too
        // often.
        Buffer const & buffer = bv_->buffer();
-       Font font = getDisplayFont(pit, first);
+       Font font = displayFont(pit, first);
        FontSize const tmpsize = font.fontInfo().size();
-       font.fontInfo() = text_->getLayoutFont(buffer, pit);
+       font.fontInfo() = text_->layoutFont(buffer, pit);
        FontSize const size = font.fontInfo().size();
        font.fontInfo().setSize(tmpsize);
 
-       FontInfo labelfont = text_->getLabelFont(buffer, par);
+       FontInfo labelfont = text_->labelFont(buffer, par);
 
        FontMetrics const & labelfont_metrics = theFontMetrics(labelfont);
        FontMetrics const & fontmetrics = theFontMetrics(font);
@@ -1129,7 +1129,7 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit,
                last_tmpx = tmpx;
                if (body_pos > 0 && c == body_pos - 1) {
                        FontMetrics const & fm = theFontMetrics(
-                               text_->getLabelFont(buffer, par));
+                               text_->labelFont(buffer, par));
                        tmpx += row.label_hfill + fm.width(layout->labelsep);
                        if (par.isLineSeparator(body_pos - 1))
                                tmpx -= singleWidth(pit, body_pos - 1);
@@ -1550,7 +1550,7 @@ int TextMetrics::cursorX(CursorSlice const & sl,
        // Inline completion RTL special case row_pos == cursor_pos:
        // "__|b" => cursor_pos is right of __
        if (row_pos == inlineCompletionVPos && row_pos == cursor_vpos) {
-               font = getDisplayFont(pit, row_pos + 1);
+               font = displayFont(pit, row_pos + 1);
                docstring const & completion = bv_->inlineCompletion();
                if (font.isRightToLeft() && completion.length() > 0)
                        x += theFontMetrics(font.fontInfo()).width(completion);
@@ -1563,7 +1563,7 @@ int TextMetrics::cursorX(CursorSlice const & sl,
                pos_type pos = bidi.vis2log(vpos);
                if (body_pos > 0 && pos == body_pos - 1) {
                        FontMetrics const & labelfm = theFontMetrics(
-                               text_->getLabelFont(buffer, par));
+                               text_->labelFont(buffer, par));
                        x += row.label_hfill + labelfm.width(par.layout()->labelsep);
                        if (par.isLineSeparator(body_pos - 1))
                                x -= singleWidth(pit, body_pos - 1);
@@ -1572,7 +1572,7 @@ int TextMetrics::cursorX(CursorSlice const & sl,
                // Use font span to speed things up, see above
                if (pos < font_span.first || pos > font_span.last) {
                        font_span = par.fontSpan(pos);
-                       font = getDisplayFont(pit, pos);
+                       font = displayFont(pit, pos);
                }
 
                x += pm.singleWidth(pos, font);
@@ -1581,7 +1581,7 @@ int TextMetrics::cursorX(CursorSlice const & sl,
                // "a__|b", __ of b => non-boundary a-pos is right of __
                if (vpos + 1 == inlineCompletionVPos 
                    && (vpos + 1 < cursor_vpos || !boundary_correction)) {
-                       font = getDisplayFont(pit, vpos + 1);
+                       font = displayFont(pit, vpos + 1);
                        docstring const & completion = bv_->inlineCompletion();
                        if (font.isRightToLeft() && completion.length() > 0)
                                x += theFontMetrics(font.fontInfo()).width(completion);
@@ -1591,7 +1591,7 @@ int TextMetrics::cursorX(CursorSlice const & sl,
                // "b|__a", __ of b => non-boundary a-pos is in front of __
                if (vpos == inlineCompletionVPos
                    && (vpos + 1 < cursor_vpos || boundary_correction)) {
-                       font = getDisplayFont(pit, vpos);
+                       font = displayFont(pit, vpos);
                        docstring const & completion = bv_->inlineCompletion();
                        if (!font.isRightToLeft() && completion.length() > 0)
                                x += theFontMetrics(font.fontInfo()).width(completion);
@@ -1801,7 +1801,7 @@ int TextMetrics::leftMargin(int max_width,
            && pit > 0 && pars[pit - 1].layout()->nextnoindent)
                parindent.erase();
 
-       FontInfo const labelfont = text_->getLabelFont(buffer, par);
+       FontInfo const labelfont = text_->labelFont(buffer, par);
        FontMetrics const & labelfont_metrics = theFontMetrics(labelfont);
 
        switch (layout->margintype) {
@@ -1922,7 +1922,7 @@ int TextMetrics::singleWidth(pit_type pit, pos_type pos) const
 {
        ParagraphMetrics const & pm = par_metrics_[pit];
 
-       return pm.singleWidth(pos, getDisplayFont(pit, pos));
+       return pm.singleWidth(pos, displayFont(pit, pos));
 }
 
 
index 617b716865dd01b9cd1579f2635ac3a3398d81c2..bb9d7bd6c122ccc207390695e4f68bd01a3a3a83 100644 (file)
@@ -38,7 +38,7 @@ public:
        TextMetrics(BufferView *, Text *);
        
        ///
-       bool has(pit_type pit) const;
+       bool contains(pit_type pit) const;
        ///
        ParagraphMetrics const & parMetrics(pit_type) const;
        ///
@@ -68,8 +68,7 @@ public:
        /// The difference is that this one is used for displaying, and thus we
        /// are allowed to make cosmetic improvements. For instance make footnotes
        /// smaller. (Asger)
-       Font getDisplayFont(pit_type pit,
-               pos_type pos) const;
+       Font displayFont(pit_type pit, pos_type pos) const;
 
        /// There are currently two font mechanisms in LyX:
        /// 1. The font attributes in a lyxtext, and
index 0af0aa6cfa92269c7c02f3b04b59857621756618..19583ecbf64a17c79918f136adfa6b992d1c27b0 100644 (file)
@@ -345,7 +345,7 @@ bool getTokenValue(string const & str, char const * token, string & ret)
 {
        ret.erase();
        size_t token_length = strlen(token);
-       string::size_type pos = str.find(token);
+       size_t pos = str.find(token);
 
        if (pos == string::npos || pos + token_length + 1 >= str.length()
                || str[pos + token_length] != '=')
@@ -4697,8 +4697,8 @@ bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf,
        col_type cols = 1;
        row_type rows = 1;
        col_type maxCols = 1;
-       docstring::size_type const len = buf.length();
-       docstring::size_type p = 0;
+       size_t const len = buf.length();
+       size_t p = 0;
 
        while (p < len &&
               (p = buf.find_first_of(from_ascii("\t\n"), p)) != docstring::npos) {
@@ -4732,7 +4732,7 @@ bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf,
                row = tabular.cellRow(cell);
        }
 
-       docstring::size_type op = 0;
+       size_t op = 0;
        idx_type const cells = loctab->cellCount();
        p = 0;
        cols = ocol;
@@ -4750,7 +4750,7 @@ bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf,
                        if (cols < columns) {
                                shared_ptr<InsetText> inset = loctab->getCellInset(cell);
                                Font const font = bv.textMetrics(&inset->text_).
-                                       getDisplayFont(0, 0);
+                                       displayFont(0, 0);
                                inset->setText(buf.substr(op, p - op), font,
                                               buffer().params().trackChanges);
                                ++cols;
@@ -4762,7 +4762,7 @@ bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf,
                        if (cols < columns) {
                                shared_ptr<InsetText> inset = tabular.getCellInset(cell);
                                Font const font = bv.textMetrics(&inset->text_).
-                                       getDisplayFont(0, 0);
+                                       displayFont(0, 0);
                                inset->setText(buf.substr(op, p - op), font,
                                               buffer().params().trackChanges);
                        }
@@ -4778,7 +4778,7 @@ bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf,
        // check for the last cell if there is no trailing '\n'
        if (cell < cells && op < len) {
                shared_ptr<InsetText> inset = loctab->getCellInset(cell);
-               Font const font = bv.textMetrics(&inset->text_).getDisplayFont(0, 0);
+               Font const font = bv.textMetrics(&inset->text_).displayFont(0, 0);
                inset->setText(buf.substr(op, len - op), font,
                        buffer().params().trackChanges);
        }
index 7c9ea8a0225d96ef9754aa54f441ba9030193647..cc10856e51d558554216f955791d184bcf3c39e9 100644 (file)
@@ -74,9 +74,9 @@ RowPainter::RowPainter(PainterInfo & pi,
 }
 
 
-FontInfo const RowPainter::getLabelFont() const
+FontInfo RowPainter::labelFont() const
 {
-       return text_.getLabelFont(pi_.base.bv->buffer(), par_);
+       return text_.labelFont(pi_.base.bv->buffer(), par_);
 }
 
 
@@ -93,7 +93,7 @@ int RowPainter::leftMargin() const
 
 void RowPainter::paintInset(Inset const * inset, pos_type const pos)
 {
-       Font const font = text_metrics_.getDisplayFont(pit_, pos);
+       Font const font = text_metrics_.displayFont(pit_, pos);
 
        BOOST_ASSERT(inset);
        // Backup full_repaint status because some insets (InsetTabular)
@@ -174,7 +174,7 @@ void RowPainter::paintHebrewComposeChar(pos_type & vpos, FontInfo const & font)
                if (!Encodings::isComposeChar_hebrew(c)) {
                        if (isPrintableNonspace(c)) {
                                int const width2 = pm_.singleWidth(i,
-                                       text_metrics_.getDisplayFont(pit_, i));
+                                       text_metrics_.displayFont(pit_, i));
                                dx = (c == 0x05e8 || // resh
                                      c == 0x05d3)   // dalet
                                        ? width2 - width
@@ -208,7 +208,7 @@ void RowPainter::paintArabicComposeChar(pos_type & vpos, FontInfo const & font)
                if (!Encodings::isComposeChar_arabic(c)) {
                        if (isPrintableNonspace(c)) {
                                int const width2 = pm_.singleWidth(i,
-                                               text_metrics_.getDisplayFont(pit_, i));
+                                               text_metrics_.displayFont(pit_, i));
                                dx = (width2 - width) / 2;
                        }
                        break;
@@ -329,7 +329,7 @@ void RowPainter::paintForeignMark(double orig_x, Language const * lang,
 void RowPainter::paintFromPos(pos_type & vpos)
 {
        pos_type const pos = bidi_.vis2log(vpos);
-       Font const orig_font = text_metrics_.getDisplayFont(pit_, pos);
+       Font const orig_font = text_metrics_.displayFont(pit_, pos);
        double const orig_x = x_;
 
        // usual characters, no insets
@@ -502,7 +502,7 @@ void RowPainter::paintFirst()
                      || layout->latextype != LATEX_ENVIRONMENT
                      || is_seq)) {
 
-               FontInfo const font = getLabelFont();
+               FontInfo const font = labelFont();
                FontMetrics const & fm = theFontMetrics(font);
 
                docstring const str = par_.labelString();
@@ -550,7 +550,7 @@ void RowPainter::paintFirst()
                (layout->labeltype == LABEL_TOP_ENVIRONMENT ||
                layout->labeltype == LABEL_BIBLIO ||
                layout->labeltype == LABEL_CENTERED_TOP_ENVIRONMENT)) {
-               FontInfo const font = getLabelFont();
+               FontInfo const font = labelFont();
                docstring const str = par_.labelString();
                if (!str.empty()) {
                        double spacing_val = 1.0;
@@ -606,7 +606,7 @@ void RowPainter::paintLast()
        switch (endlabel) {
        case END_LABEL_BOX:
        case END_LABEL_FILLED_BOX: {
-               FontInfo const font = getLabelFont();
+               FontInfo const font = labelFont();
                FontMetrics const & fm = theFontMetrics(font);
                int const size = int(0.75 * fm.maxAscent());
                int const y = yo_ - size;
@@ -627,7 +627,7 @@ void RowPainter::paintLast()
        }
 
        case END_LABEL_STATIC: {
-               FontInfo const font = getLabelFont();
+               FontInfo const font = labelFont();
                FontMetrics const & fm = theFontMetrics(font);
                docstring const & str = par_.layout()->endlabelstring();
                double const x = is_rtl ?
@@ -721,7 +721,7 @@ void RowPainter::paintText()
                // Use font span to speed things up, see above
                if (vpos < font_span.first || vpos > font_span.last) {
                        font_span = par_.fontSpan(vpos);
-                       font = text_metrics_.getDisplayFont(pit_, vpos);
+                       font = text_metrics_.displayFont(pit_, vpos);
 
                        // split font span if inline completion is inside
                        if (font_span.first <= inlineCompletionVPos
@@ -761,7 +761,7 @@ void RowPainter::paintText()
                }
 
                if (body_pos > 0 && pos == body_pos - 1) {
-                       int const lwidth = theFontMetrics(getLabelFont())
+                       int const lwidth = theFontMetrics(labelFont())
                                .width(layout->labelsep);
 
                        x_ += row_.label_hfill + lwidth - width_pos;
@@ -772,7 +772,7 @@ void RowPainter::paintText()
                        paintInlineCompletion(font);
 
                if (par_.isSeparator(pos)) {
-                       Font const orig_font = text_metrics_.getDisplayFont(pit_, pos);
+                       Font const orig_font = text_metrics_.displayFont(pit_, pos);
                        double const orig_x = x_;
                        x_ += width_pos;
                        if (pos >= body_pos)
index 542573e1b2f0410d97265fb90327de6c6aef518a..59dfe2cc0030174ce302370075cd2f2869fea5d1 100644 (file)
@@ -69,7 +69,7 @@ private:
        int leftMargin() const;
 
        /// return the label font for this row
-       FontInfo const getLabelFont() const;
+       FontInfo labelFont() const;
 
        /// contains painting related information.
        PainterInfo & pi_;