summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2015-01-06 22:43:51 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2015-01-06 22:43:51 +0000
commitdef4d95ae5f2fcdf35c809ed0abe570d03e3c639 (patch)
tree5a67580ef943a9fd30104acf418fe8d8181625b0 /Build/source/texk/dvipdfm-x
parentb847134fc8e83f0ef5195d3df1d6baa15d49d465 (diff)
Fix https://sourceforge.net/p/xetex/bugs/105/
git-svn-id: svn://tug.org/texlive/trunk@35972 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog9
-rw-r--r--Build/source/texk/dvipdfm-x/pdfdev.c7
-rw-r--r--Build/source/texk/dvipdfm-x/pdfdev.h2
-rw-r--r--Build/source/texk/dvipdfm-x/pdfdoc.c4
-rw-r--r--Build/source/texk/dvipdfm-x/pdfdraw.c4
-rw-r--r--Build/source/texk/dvipdfm-x/spc_xtx.c2
6 files changed, 19 insertions, 9 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index 3242c52adcf..84e3c95bd09 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,12 @@
+2015-01-07 Khaled Hosny <khaledhosny@eglug.org>
+
+ * pdfdev.c (pdf_dev_reset_fonts): don't reset text_state.bold_param
+ unless called for a new page, otherwise we "forget" that the last font
+ was a fake bold font and don't reset text stroke when this function
+ gets called immediatly after a fake bold font is used
+ (https://sourceforge.net/p/xetex/bugs/105/).
+ * pdfdev.h, pdfdoc.c, pdfdraw.c, spc_xtx.c: adapt.
+
2014-12-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* xbb.c: Support to specify a page in a multi-page PDF to extract
diff --git a/Build/source/texk/dvipdfm-x/pdfdev.c b/Build/source/texk/dvipdfm-x/pdfdev.c
index 86f0d6ebf84..ce2ed832ff4 100644
--- a/Build/source/texk/dvipdfm-x/pdfdev.c
+++ b/Build/source/texk/dvipdfm-x/pdfdev.c
@@ -1335,7 +1335,7 @@ pdf_close_device (void)
* as the font stuff.
*/
void
-pdf_dev_reset_fonts (void)
+pdf_dev_reset_fonts (int newpage)
{
int i;
@@ -1349,7 +1349,8 @@ pdf_dev_reset_fonts (void)
text_state.matrix.extend = 1.0;
text_state.matrix.rotate = TEXT_WMODE_HH;
- text_state.bold_param = 0.0;
+ if (newpage)
+ text_state.bold_param = 0.0;
text_state.is_mb = 0;
}
@@ -1391,7 +1392,7 @@ pdf_dev_bop (const pdf_tmatrix *M)
pdf_dev_gsave();
pdf_dev_concat(M);
- pdf_dev_reset_fonts();
+ pdf_dev_reset_fonts(1);
pdf_dev_reset_color(0);
}
diff --git a/Build/source/texk/dvipdfm-x/pdfdev.h b/Build/source/texk/dvipdfm-x/pdfdev.h
index 1d839096484..f6529185c41 100644
--- a/Build/source/texk/dvipdfm-x/pdfdev.h
+++ b/Build/source/texk/dvipdfm-x/pdfdev.h
@@ -205,7 +205,7 @@ extern void pdf_dev_set_param (int param_type, int value);
/* Force reselecting font and color:
* XFrom (content grabbing) and Metapost support want them.
*/
-extern void pdf_dev_reset_fonts (void);
+extern void pdf_dev_reset_fonts (int newpage);
extern void pdf_dev_reset_color (int force);
/* Initialization of transformation matrix with M and others.
diff --git a/Build/source/texk/dvipdfm-x/pdfdoc.c b/Build/source/texk/dvipdfm-x/pdfdoc.c
index e102bcb33ac..6717995298e 100644
--- a/Build/source/texk/dvipdfm-x/pdfdoc.c
+++ b/Build/source/texk/dvipdfm-x/pdfdoc.c
@@ -2596,7 +2596,7 @@ pdf_doc_begin_grabbing (const char *ident,
* Make sure the object is self-contained by adding the
* current font and color to the object stream.
*/
- pdf_dev_reset_fonts();
+ pdf_dev_reset_fonts(1);
pdf_dev_reset_color(1); /* force color operators to be added to stream */
return xobj_id;
@@ -2642,7 +2642,7 @@ pdf_doc_end_grabbing (pdf_obj *attrib)
pdf_dev_pop_gstate();
- pdf_dev_reset_fonts();
+ pdf_dev_reset_fonts(1);
pdf_dev_reset_color(0);
RELEASE(fnode);
diff --git a/Build/source/texk/dvipdfm-x/pdfdraw.c b/Build/source/texk/dvipdfm-x/pdfdraw.c
index a43c3c9c65a..e81839cce09 100644
--- a/Build/source/texk/dvipdfm-x/pdfdraw.c
+++ b/Build/source/texk/dvipdfm-x/pdfdraw.c
@@ -1138,7 +1138,7 @@ pdf_dev_grestore (void)
pdf_doc_add_page_content(" Q", 2); /* op: Q */
- pdf_dev_reset_fonts();
+ pdf_dev_reset_fonts(0);
return 0;
}
@@ -1203,7 +1203,7 @@ pdf_dev_grestore_to (int depth)
clear_a_gstate(gs);
RELEASE(gs);
}
- pdf_dev_reset_fonts();
+ pdf_dev_reset_fonts(0);
return;
}
diff --git a/Build/source/texk/dvipdfm-x/spc_xtx.c b/Build/source/texk/dvipdfm-x/spc_xtx.c
index c52146a6566..0dfb980e332 100644
--- a/Build/source/texk/dvipdfm-x/spc_xtx.c
+++ b/Build/source/texk/dvipdfm-x/spc_xtx.c
@@ -163,7 +163,7 @@ spc_handler_xtx_grestore (struct spc_env *spe, struct spc_arg *args)
* we make no assumptions about what fonts. We act like we are
* starting a new page.
*/
- pdf_dev_reset_fonts();
+ pdf_dev_reset_fonts(0);
pdf_dev_reset_color(0);
return 0;