Text edit mishandles span of just colored spaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
David Mathog |
Bug Description
This came up in the context of adding SVG text decoration support. Text decorations need to be visible over spaces
http://
and in the CSS2 and default CSS3 modes they take their color from the color of the spaces. (Even though nothing is drawn for the space glyph itself.) However differently colored spaces cannot exist in Inkscape at present. Here is how to demonstrate that:
1. Open a text box and enter "word" with black letters.
2. Insert two spaces between "r" and "d".
3. Select those spaces and change their color to something other than black.
Result: the spaces shift to the end of the "word" and become part of the original span.
Alternate method:
1. (as above)
2. Insert "1 2" between "r" and "d".
3. Select "1 2" and color it something other than black.
4. Delete "1". (works)
5. Delete "2".
Result: the spaces shift to the end of the "word" and become part of the original span.
I suspect that this happens, at least in part, in Layout-
Related branches
- Martin Owens: Approve (merge)
-
Diff: 48503 lines (+46736/-372) (has conflicts)83 files modifiedpackaging/win32/languages/Hebrew.nsh (+113/-0)
po/POTFILES.in (+2/-1)
share/extensions/Makefile.am (+1/-0)
share/extensions/fontfix.conf (+55/-0)
share/extensions/hershey.inx (+86/-0)
share/extensions/hershey.py (+109/-0)
share/extensions/hersheydata.py (+58/-0)
share/extensions/render_gear_rack.inx (+21/-0)
share/extensions/render_gear_rack.py (+105/-0)
share/extensions/text_merge.inx (+34/-0)
share/extensions/text_merge.py (+199/-0)
src/2geom/generic-rect.h (+1/-1)
src/Makefile.am (+5/-4)
src/attributes-test.h (+3/-0)
src/attributes.cpp (+3/-0)
src/attributes.h (+4/-1)
src/display/drawing-context.h (+15/-0)
src/display/drawing-text.cpp (+286/-16)
src/display/drawing-text.h (+12/-3)
src/display/nr-style.cpp (+58/-0)
src/display/nr-style.h (+37/-0)
src/extension/CMakeLists.txt (+11/-4)
src/extension/init.cpp (+9/-9)
src/extension/internal/Makefile_insert (+20/-4)
src/extension/internal/emf-inout.cpp (+3549/-0)
src/extension/internal/emf-inout.h (+211/-0)
src/extension/internal/emf-print.cpp (+2202/-0)
src/extension/internal/emf-print.h (+138/-0)
src/extension/internal/emf-win32-inout.h (+0/-57)
src/extension/internal/text_reassemble.c (+2884/-0)
src/extension/internal/text_reassemble.h (+386/-0)
src/extension/internal/uemf.c (+5523/-0)
src/extension/internal/uemf.h (+2889/-0)
src/extension/internal/uemf_endian.c (+1783/-0)
src/extension/internal/uemf_endian.h (+37/-0)
src/extension/internal/uemf_print.c (+2358/-0)
src/extension/internal/uemf_print.h (+169/-0)
src/extension/internal/uemf_utf.c (+552/-0)
src/extension/internal/uemf_utf.h (+53/-0)
src/extension/internal/uwmf.c (+6880/-0)
src/extension/internal/uwmf.h (+2492/-0)
src/extension/internal/uwmf_endian.c (+1772/-0)
src/extension/internal/uwmf_endian.h (+39/-0)
src/extension/internal/uwmf_print.c (+1616/-0)
src/extension/internal/uwmf_print.h (+48/-0)
src/extension/internal/wmf-inout.cpp (+3235/-0)
src/extension/internal/wmf-inout.h (+213/-0)
src/extension/internal/wmf-print.cpp (+1994/-0)
src/extension/internal/wmf-print.h (+147/-0)
src/helper/action-context.cpp (+84/-0)
src/helper/action-context.h (+89/-0)
src/helper/geom.cpp (+310/-0)
src/helper/geom.h (+5/-0)
src/layer-model.cpp (+259/-0)
src/layer-model.h (+104/-0)
src/libnrtype/FontInstance.cpp (+35/-0)
src/libnrtype/Layout-TNG-Compute.cpp (+172/-62)
src/libnrtype/Layout-TNG-Output.cpp (+264/-50)
src/libnrtype/Layout-TNG.h (+4/-0)
src/libnrtype/font-instance.h (+2/-0)
src/libunicode-convert/Makefile_insert (+5/-0)
src/libunicode-convert/README (+1/-0)
src/libunicode-convert/makefile.in (+17/-0)
src/libunicode-convert/unicode-convert.c (+1008/-0)
src/libunicode-convert/unicode-convert.h (+51/-0)
src/splivarot.cpp (+280/-0)
src/splivarot.h (+2/-0)
src/style.cpp (+306/-88)
src/style.h (+49/-6)
src/text-editing.cpp (+38/-20)
src/ui/dialog/new-from-template.cpp (+59/-0)
src/ui/dialog/new-from-template.h (+39/-0)
src/ui/dialog/template-load-tab.cpp (+281/-0)
src/ui/dialog/template-load-tab.h (+102/-0)
src/ui/dialog/template-widget.cpp (+117/-0)
src/ui/dialog/template-widget.h (+48/-0)
src/ui/widget/unit-tracker.cpp (+263/-0)
src/ui/widget/unit-tracker.h (+74/-0)
src/widgets/connector-toolbar.cpp (+3/-0)
src/widgets/dash-selector.cpp (+75/-11)
src/widgets/dash-selector.h (+5/-0)
src/widgets/eraser-toolbar.cpp (+168/-0)
src/widgets/eraser-toolbar.h (+0/-35)
Changed in inkscape: | |
status: | Triaged → In Progress |
assignee: | nobody → David Mathog (mathog) |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
One other point, the bounding box that is drawn around the text after the spaces shift to the end is off by 1 space (inwards). If there are N spaces on the end, the box is drawn at the right boundary of the N-1th space.
That is the case even if the text is just typed in directly as "word ".