summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-text.h
diff options
context:
space:
mode:
authorDavid Mathog <>2013-06-19 17:20:33 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-06-19 17:20:33 +0000
commitd19db89e2e22d4e09c539bd42823d511aebb669f (patch)
treef5322f76b16b0e4c97895ce2b805ea7375e44142 /src/display/drawing-text.h
parentmerge from trunk (r12337) (diff)
downloadinkscape-d19db89e2e22d4e09c539bd42823d511aebb669f.tar.gz
inkscape-d19db89e2e22d4e09c539bd42823d511aebb669f.zip
changes_2013_05_22a.patch:
1. Resolves issue of bug #988601 message 170 (Support of 'Unset' styles in EMF export). 2. Implements CSS 3 (and CSS 2) text-decoration support. Note that it does not yet provide any method of adding these features - at present it just shows whatever is in the SVG. This new code is also used to display EMF/WMF strike-through and underline text decorations when these files are read in. Those decorations may also be written out to EMF/WMF. Other text decoration features, like overline, or dotted lines, are dropped. For SVG text-decoration -line, -style, -color are all implemented. CSS3 provides two ways to represent the same state, this code uses the compound text-decoration method rather than the 3 fields method. Also it leaves out keywords that are not needed and would break backwards compatibility. For instance: text-decoration: underline solid is valid, but would break CSS2. Solid is the default, so that sort of case is written as: text-decoration: underline If the state is CSS3 specific all of the needed fields are of course include, like text-decoration: underline wavy red 3. It incorporates the fix for bug 1181326 (Text edit mishandles span of just colored spaces) 4. It incorporates further changes to text editing so that style can be changed on spans consisting of only spaces when text decorations are present in the span. 5. It incorporates code to disable text decorations when text so marked is mapped onto a path. 6. Fixed more bugs in Hebrew language support than I can remember. Hebrew language export/import to EMF now works quite well. (See the examples in libTERE v 0.7.) WMF does not support unicode and for all intents and purposes Inkscape has no way to read or write Hebrew to it. Some of more important things that now work that didn't (or didn't always): Hebrew diacritical marks, R/L/center justification, and bidirectional text. The Hebrew fonts "Ezra SIL" and "EZRA SIL SR" should be installed before viewing the libTERE examples, otherwise font substitutions will cause some text shifts. 7. Implemented font failover in Text Reassemble, which makes the process more robust. (Again, see the examples in libTERE. ) (bzr r11668.1.71)
Diffstat (limited to 'src/display/drawing-text.h')
-rw-r--r--src/display/drawing-text.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/display/drawing-text.h b/src/display/drawing-text.h
index 79b1b097c..99b46bc8a 100644
--- a/src/display/drawing-text.h
+++ b/src/display/drawing-text.h
@@ -35,8 +35,13 @@ protected:
virtual DrawingItem *_pickItem(Geom::Point const &p, double delta, unsigned flags);
font_instance *_font;
- int _glyph;
- Geom::IntRect _pick_bbox;
+ int _glyph;
+ bool _drawable;
+ float _width; // These three are used to set up bounding box
+ float _asc; //
+ float _dsc; //
+ float _pl; // phase length
+ Geom::IntRect _pick_bbox;
friend class DrawingText;
};
@@ -49,9 +54,11 @@ public:
~DrawingText();
void clear();
- void addComponent(font_instance *font, int glyph, Geom::Affine const &trans);
+ bool addComponent(font_instance *font, int glyph, Geom::Affine const &trans,
+ float width, float ascent, float descent, float phase_length);
void setStyle(SPStyle *style);
+
protected:
virtual unsigned _updateItem(Geom::IntRect const &area, UpdateContext const &ctx,
unsigned flags, unsigned reset);
@@ -61,6 +68,8 @@ protected:
virtual DrawingItem *_pickItem(Geom::Point const &p, double delta, unsigned flags);
virtual bool _canClip();
+ double decorateItem(DrawingContext &ct, Geom::Affine aff, double phase_length);
+ void decorateStyle(DrawingContext &ct, double vextent, double xphase, Geom::Point p1, Geom::Point p2);
NRStyle _nrstyle;
friend class DrawingGlyphs;