summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2015-11-18 15:05:09 +0000
committertavmjong-free <tavmjong@free.fr>2015-11-18 15:05:09 +0000
commit3e68cf3b33b153dd0fc7eda9a2850f448a42c76c (patch)
tree53c0ff7cb20d4a7dca389bceb4b30149a97c17a4 /src/libnrtype
parentCode cleanup. Remove/simplify some functions. (diff)
downloadinkscape-3e68cf3b33b153dd0fc7eda9a2850f448a42c76c.tar.gz
inkscape-3e68cf3b33b153dd0fc7eda9a2850f448a42c76c.zip
Use maximum ascent and descent for glyphs to ensure that glyphs that extend
outside the em-box are fully drawn. (bzr r14430.1.10)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp
index 9557bc84c..526319f35 100644
--- a/src/libnrtype/Layout-TNG-Output.cpp
+++ b/src/libnrtype/Layout-TNG-Output.cpp
@@ -199,11 +199,14 @@ void Layout::show(DrawingGroup *in_arena, Geom::OptRect const &paintbox) const
first_line_glyph = false;
phase0 = glyph_matrix.translation()[Geom::X];
}
- // save the starting coordinates for the line - these are needed for figuring out dot/dash/wave phase
+ // Save the starting coordinates for the line - these are needed for figuring out
+ // dot/dash/wave phase.
+ // Use maximum ascent and descent to ensure glpyhs that extend outside the embox
+ // are fully drawn.
(void) nr_text->addComponent(_spans[span_index].font, _glyphs[glyph_index].glyph, glyph_matrix,
_glyphs[glyph_index].width,
- _spans[span_index].line_height.getTypoAscent(),
- _spans[span_index].line_height.getTypoDescent(),
+ _spans[span_index].line_height.getMaxAscent(),
+ _spans[span_index].line_height.getMaxDescent(),
glyph_matrix.translation()[Geom::X] - phase0
);
}