summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormathog <>2014-07-24 21:31:00 +0000
committermathog <>2014-07-24 21:31:00 +0000
commit836c1d6fa8bc1430f4f677a636f74e586f1a85e2 (patch)
tree5dddf1121a082d175452b6b022903e453eaead0a /src
parentRead HSL colors (CSS Color Module Level 3). (diff)
downloadinkscape-836c1d6fa8bc1430f4f677a636f74e586f1a85e2.tar.gz
inkscape-836c1d6fa8bc1430f4f677a636f74e586f1a85e2.zip
Fix for bug 1336753
(bzr r13467)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/text_reassemble.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/extension/internal/text_reassemble.c b/src/extension/internal/text_reassemble.c
index b0447442c..9b1cff46e 100644
--- a/src/extension/internal/text_reassemble.c
+++ b/src/extension/internal/text_reassemble.c
@@ -1820,6 +1820,8 @@ printf("Face idx:%d bbox: xMax/Min:%ld,%ld yMax/Min:%ld,%ld UpEM:%d asc/des:%d,%
fasc = ((double) (fsp->face->ascender) )/64.0;
fdsc = ((double) (fsp->face->descender))/64.0;
+ /* originally the denominator was just 32.0, but it broke when units_per_EM wasn't 2048 */
+ double fixscale = tsp->fs/(((double) fsp->face->units_per_EM)/64.0);
if(tri->load_flags & FT_LOAD_NO_SCALE) xe *= tsp->fs/32.0;
/* now place the rectangle using ALN information */
@@ -1837,11 +1839,11 @@ printf("Face idx:%d bbox: xMax/Min:%ld,%ld yMax/Min:%ld,%ld UpEM:%d asc/des:%d,%
}
tpi->chunks[current].ldir = tsp->ldir;
- if(tri->load_flags & FT_LOAD_NO_SCALE){
- asc *= tsp->fs/32.0;
- dsc *= tsp->fs/32.0;
- fasc *= tsp->fs/32.0;
- fdsc *= tsp->fs/32.0;
+ if(tri->load_flags & FT_LOAD_NO_SCALE){
+ asc *= fixscale;
+ dsc *= fixscale;
+ fasc *= fixscale;
+ fdsc *= fixscale;
}