summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog6
-rw-r--r--Build/source/texk/dvipdfm-x/dvi.c2
-rw-r--r--Build/source/texk/dvipdfm-x/dvi.h1
-rw-r--r--Build/source/texk/dvipdfm-x/dvipdfmx.c1
-rw-r--r--Build/source/texk/dvipdfm-x/tfm.c13
5 files changed, 21 insertions, 2 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index 2c125e77f58..bf659d06af3 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,9 @@
+2022-04-06 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * {dvi,dvipdfmx,tfm}.c, dvi.h:
+ Warn if interpreting OFM FONTDIR as pTeX vertical writing
+ with option -v.
+
2022-03-21 Karl Berry <karl@tug.org>
* TL'22 release.
diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c
index 473c52e8c3c..8614af46ec6 100644
--- a/Build/source/texk/dvipdfm-x/dvi.c
+++ b/Build/source/texk/dvipdfm-x/dvi.c
@@ -386,7 +386,7 @@ find_post (void)
post_id_byte = ch;
if (ch == XDV_ID || ch == XDV_ID_OLD)
dpx_conf.compat_mode = dpx_mode_xdv_mode;
- is_ptex = ch == DVIV_ID;
+ dvi_ptex_with_vert = is_ptex = ch == DVIV_ID;
/* Make sure post_post is really there */
current = current - 5;
diff --git a/Build/source/texk/dvipdfm-x/dvi.h b/Build/source/texk/dvipdfm-x/dvi.h
index 569a30c1087..3b49d6c2953 100644
--- a/Build/source/texk/dvipdfm-x/dvi.h
+++ b/Build/source/texk/dvipdfm-x/dvi.h
@@ -31,6 +31,7 @@
/* instantiated in dvipdfmx.c */
extern double paper_width, paper_height;
extern int landscape_mode;
+extern int dvi_ptex_with_vert;
extern double get_origin (int x);
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c
index cab94b6ff8e..33c39365c22 100644
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.c
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c
@@ -121,6 +121,7 @@ double paper_height = 842.0;
static double x_offset = 72.0;
static double y_offset = 72.0;
int landscape_mode = 0;
+int dvi_ptex_with_vert = 0;
static int translate_origin = 0;
static int has_paper_option = 0;
diff --git a/Build/source/texk/dvipdfm-x/tfm.c b/Build/source/texk/dvipdfm-x/tfm.c
index 09469abe582..97143f9cb22 100644
--- a/Build/source/texk/dvipdfm-x/tfm.c
+++ b/Build/source/texk/dvipdfm-x/tfm.c
@@ -36,6 +36,7 @@
#include "dpxutil.h"
#include "tfm.h"
+#include "dvi.h"
#define TFM_FORMAT 1
#define OFM_FORMAT 2
@@ -242,6 +243,7 @@ lookup_range (const struct range_map *map, int charcode)
#define FONT_DIR_HORIZ 0
#define FONT_DIR_VERT 1
+#define FONT_DIR_RT 5
struct font_metric
{
@@ -631,7 +633,16 @@ ofm_get_sizes (FILE *ofm_file, off_t ofm_file_size, struct tfm_font *tfm)
tfm->nfonparm = get_positive_quad(ofm_file, "OFM", "nfonparm");
tfm->fontdir = get_positive_quad(ofm_file, "OFM", "fontdir");
if (tfm->fontdir) {
- WARN("I may be interpreting a font direction incorrectly.");
+#ifndef WITHOUT_ASCII_PTEX
+ if (dvi_ptex_with_vert && tfm->fontdir==FONT_DIR_RT && tfm->level==1 && tfm->ec>=0x2E00) {
+ /* interpret FONTDIR RT as pTeX vertical writing */
+ if (dpx_conf.verbose_level > 0)
+ WARN("I will interpret a font direction as pTeX vertical writing.");
+ } else
+#endif /* !WITHOUT_ASCII_PTEX */
+ {
+ WARN("I may be interpreting a font direction incorrectly.");
+ }
}
if (tfm->level == 0) {
ofm_check_size_one(tfm, ofm_file_size);