diff options
| author | Khaled Hosny <khaledhosny@eglug.org> | 2017-08-15 20:39:32 +0000 |
|---|---|---|
| committer | Khaled Hosny <khaledhosny@eglug.org> | 2017-08-17 19:19:52 +0000 |
| commit | 2abe0bb681044d972e171189395a2afdbc39bf28 (patch) | |
| tree | cb446e60ed7126b0c35bf1e623fdf706e97b7578 /src | |
| parent | do not try to run mac build on other people's build (with no mac runner) (diff) | |
| download | inkscape-2abe0bb681044d972e171189395a2afdbc39bf28.tar.gz inkscape-2abe0bb681044d972e171189395a2afdbc39bf28.zip | |
Fix inverted y sign for glyph positioning
This is causing vertical glyph positioning to move in the wrong
direction e.g. marks go below base glyph instead of above. Seems to be a
regression introduced in:
commit 83dac189ff21c59be9b4f912e0d0e9690e710a4d
Author: Tavmjong Bah <tavmjong@free.fr>
Date: Tue Nov 3 13:19:36 2015 +0100
Rearrange code to make handling of baseline clearer.
(bzr r14430.1.3)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnrtype/Layout-TNG-Compute.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnrtype/Layout-TNG-Compute.cpp b/src/libnrtype/Layout-TNG-Compute.cpp index 63364ab34..5d0c5c3ce 100644 --- a/src/libnrtype/Layout-TNG-Compute.cpp +++ b/src/libnrtype/Layout-TNG-Compute.cpp @@ -767,7 +767,7 @@ void Layout::Calculator::_outputLine(ParagraphInfo const ¶, if( dominant_baseline == SP_CSS_BASELINE_AUTO ) dominant_baseline = SP_CSS_BASELINE_ALPHABETIC; } - new_glyph.y += delta_y; + new_glyph.y -= delta_y; // TODO: Should also check 'glyph_orientation_vertical' if 'text-orientation' is unset... if( new_span.text_orientation == SP_CSS_TEXT_ORIENTATION_SIDEWAYS || @@ -801,7 +801,7 @@ void Layout::Calculator::_outputLine(ParagraphInfo const ¶, if( dominant_baseline == SP_CSS_BASELINE_AUTO ) dominant_baseline = SP_CSS_BASELINE_ALPHABETIC; - new_glyph.y -= delta_y; + new_glyph.y += delta_y; new_glyph.y += new_span.font_size * para.pango_items[unbroken_span.pango_item_index].font->GetBaselines()[ dominant_baseline ]; new_glyph.width = unbroken_span_glyph_info->geometry.width * font_size_multiplier; |
