diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2015-11-19 10:33:34 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2015-11-19 10:33:34 +0000 |
| commit | 9966fe3579bc3d8f0bfc0d453f549119de1d6884 (patch) | |
| tree | 558393a882d7ba615b1db0df7df562f150789a22 /src | |
| parent | Implement rendering of 'dominant-baseline' property. (diff) | |
| download | inkscape-9966fe3579bc3d8f0bfc0d453f549119de1d6884.tar.gz inkscape-9966fe3579bc3d8f0bfc0d453f549119de1d6884.zip | |
Swap text-before-edge and text-after-edge baseline values.
(bzr r14430.1.12)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnrtype/FontInstance.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp index 79477d431..f0b87efa7 100644 --- a/src/libnrtype/FontInstance.cpp +++ b/src/libnrtype/FontInstance.cpp @@ -196,8 +196,8 @@ font_instance::font_instance(void) : _baselines[ SP_CSS_BASELINE_MATHEMATICAL ] = 0.8 * _xheight; _baselines[ SP_CSS_BASELINE_CENTRAL ] = 0.5 - _descent; _baselines[ SP_CSS_BASELINE_MIDDLE ] = 0.5 * _xheight; - _baselines[ SP_CSS_BASELINE_TEXT_BEFORE_EDGE ] = -_descent; - _baselines[ SP_CSS_BASELINE_TEXT_AFTER_EDGE ] = _ascent; + _baselines[ SP_CSS_BASELINE_TEXT_BEFORE_EDGE ] = _ascent; + _baselines[ SP_CSS_BASELINE_TEXT_AFTER_EDGE ] = -_descent; } font_instance::~font_instance(void) @@ -712,8 +712,8 @@ void font_instance::FindFontMetrics() { _baselines[ SP_CSS_BASELINE_MATHEMATICAL ] = 0.8 * _xheight; // Guess _baselines[ SP_CSS_BASELINE_CENTRAL ] = 0.5 - _descent; // Definition _baselines[ SP_CSS_BASELINE_MIDDLE ] = 0.5 * _xheight; // Definition - _baselines[ SP_CSS_BASELINE_TEXT_BEFORE_EDGE ] = -_descent; // Definition - _baselines[ SP_CSS_BASELINE_TEXT_AFTER_EDGE ] = _ascent; // Definition + _baselines[ SP_CSS_BASELINE_TEXT_BEFORE_EDGE ] = _ascent; // Definition + _baselines[ SP_CSS_BASELINE_TEXT_AFTER_EDGE ] = -_descent; // Definition MAT2 identity = {{0,1},{0,0},{0,0},{0,1}}; @@ -785,8 +785,8 @@ void font_instance::FindFontMetrics() { _baselines[ SP_CSS_BASELINE_MATHEMATICAL ] = 0.8 * _xheight; // Guess _baselines[ SP_CSS_BASELINE_CENTRAL ] = 0.5 - _descent; // Definition _baselines[ SP_CSS_BASELINE_MIDDLE ] = 0.5 * _xheight; // Definition - _baselines[ SP_CSS_BASELINE_TEXT_BEFORE_EDGE ] = -_descent; // Definition - _baselines[ SP_CSS_BASELINE_TEXT_AFTER_EDGE ] = _ascent; // Definition + _baselines[ SP_CSS_BASELINE_TEXT_BEFORE_EDGE ] = _ascent; // Definition + _baselines[ SP_CSS_BASELINE_TEXT_AFTER_EDGE ] = -_descent; // Definition // Better math baseline: // Try center of minus sign |
