summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-09-19 09:23:37 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-09-19 09:23:37 +0000
commitde86ee8d74ced7645b61dfbd41ce6a3cf18180dc (patch)
tree34c21e63e1e9883845d39a72ac3caf13a9efb064 /Build/source/texk/web2c/mplibdir
parent499670e92506121fdd0d3365cf58639fe17a6898 (diff)
web2c/mplibdir/pngout.w: Sync with the trunk. Luigi fixes a bug in png text output
git-svn-id: svn://tug.org/texlive/trunk@35205 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mplibdir')
-rw-r--r--Build/source/texk/web2c/mplibdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/mplibdir/pngout.w8
2 files changed, 12 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog
index 67951d562e5..1e35866397c 100644
--- a/Build/source/texk/web2c/mplibdir/ChangeLog
+++ b/Build/source/texk/web2c/mplibdir/ChangeLog
@@ -1,3 +1,7 @@
+2014-09-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * pngout.w: Sync with the trunk. Luigi fixes a bug in png text output.
+
2014-09-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/libmplib.am: Build a separate library libmputil.a from
diff --git a/Build/source/texk/web2c/mplibdir/pngout.w b/Build/source/texk/web2c/mplibdir/pngout.w
index 5e901c4f063..1ab58d6b015 100644
--- a/Build/source/texk/web2c/mplibdir/pngout.w
+++ b/Build/source/texk/web2c/mplibdir/pngout.w
@@ -470,6 +470,14 @@ void mp_png_text_out (MP mp, mp_text_object *p) {
cairo_fill(mp->png->cr);
}
wd = mp_get_char_dimension (mp, mp->font_name[fn], k, 'w');
+ /* wd/100 is the size in PS point , ie wd =100*real_wd */
+ /* but _without_ considering scaling. */
+ /* We have a scale factor of */
+ /* (ds/1000.0)*scf */
+ /* so to match the scale wd should be */
+ /* 1000*real_wd *scf /(ds *scf) */
+ /* i.e. 10*wd/ds */
+ wd *= 10.0/ds;
cairo_translate(mp->png->cr,wd,0);
}
cairo_restore(mp->png->cr);