The branch, betterpaint, has been updated. - Log -----------------------------------------------------------------
commit 8a8cbfae6bf723ff1399e6ed777dec70a1cf3459 Author: Jean-Marc Lasgouttes <[email protected]> Date: Wed Mar 23 19:07:23 2016 +0100 Fixup "Rewrite setRowHeight using row information" Empty rows were wrong. This commit should be merged with the setRowHeight rewrite. diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index b09bbe2..3d7251c 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -914,14 +914,16 @@ void TextMetrics::setRowHeight(Row & row, pit_type const pit, { Paragraph const & par = text_->getPar(pit); Layout const & layout = par.layout(); - - // this is what we want to compute - int maxasc = 0; - int maxdes = 0; - - // Find the ascent descent of the row contents double const spacing_val = layout.spacing.getValue() * text_->spacing(par); + + // Initial value for ascent (useful if row is empty). + Font const font = displayFont(pit, row.pos()); + FontMetrics const & fm = theFontMetrics(font); + int maxasc = int(fm.maxAscent() * spacing_val); + int maxdes = int(fm.maxDescent() * spacing_val); + + // Find the ascent/descent of the row contents Row::const_iterator cit = row.begin(); Row::const_iterator cend = row.end(); for ( ; cit != cend; ++cit) { ----------------------------------------------------------------------- Summary of changes: src/TextMetrics.cpp | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) hooks/post-receive -- Repository for new features
