summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-text.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-09-10 12:49:31 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-09-10 12:49:31 +0000
commitb344517f8a01708652b12ab2a881c90eaf191699 (patch)
treeccbc974b3a1a488abfe6cbcf996e48047caad34b /src/display/drawing-text.cpp
parentfix a subselection issue (diff)
downloadinkscape-b344517f8a01708652b12ab2a881c90eaf191699.tar.gz
inkscape-b344517f8a01708652b12ab2a881c90eaf191699.zip
improve text selection
Diffstat (limited to 'src/display/drawing-text.cpp')
-rw-r--r--src/display/drawing-text.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index ab75026b7..6ec04ca01 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -123,13 +123,14 @@ unsigned DrawingGlyphs::_updateItem(Geom::IntRect const &/*area*/, UpdateContext
Geom::OptRect pb;
if(_drawable){
- pb = bounds_exact_transformed(*_font->PathVector(_glyph), ctx.ctm);
+ pb = bounds_exact_transformed(*_font->PathVector(42), ctx.ctm); //we fix to "X" char to allow always a reasonable bbox
+ pb->expandBy(pb->height()/20.0); //we scale a bit the area to in between char gaps mainly
}
- if(!pb){ // Fallback, spaces mostly
+ if(!pb){ // Fallback, spaces mostly, this never happendd with fixed gliph
Geom::Rect pbigbox(Geom::Point(0.0, _asc*scale_bigbox*0.66),Geom::Point(_width*scale_bigbox, 0.0));
pb = pbigbox * ctx.ctm;
}
-
+
#if 0
/* FIXME if this is commented out then not even an approximation of pick on decorations */
/* adjust the pick box up or down to include the decorations.