summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-04-14 21:15:10 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-04-14 21:15:10 +0000
commit83c58dc3575e9b223a94c785dabad4a6924035ae (patch)
tree41ff0fca8cefb8c00dd0c5174dd4f31cece3b444 /Build/source
parent79a232ceb3a15e5af1aac72f01bd8df435c1ac58 (diff)
improve to find ofm files
git-svn-id: svn://tug.org/texlive/trunk@58878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog4
-rw-r--r--Build/source/texk/dvipdfm-x/tfm.c16
2 files changed, 14 insertions, 6 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index 3adeacac5a1..471f0900226 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-15 Akira Kakuto <kakuto@w32tex.org>
+
+ * tfm.c: Improve to find ofm files.
+
2021-04-03 Akira Kakuto <kakuto@w32tex.org>
* pkfont.c: Remove unnecessary changes made on 2020-12-14.
diff --git a/Build/source/texk/dvipdfm-x/tfm.c b/Build/source/texk/dvipdfm-x/tfm.c
index 629663d5c7e..09469abe582 100644
--- a/Build/source/texk/dvipdfm-x/tfm.c
+++ b/Build/source/texk/dvipdfm-x/tfm.c
@@ -1,6 +1,6 @@
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
- Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata,
+ Copyright (C) 2002-2021 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
@@ -870,8 +870,8 @@ tfm_open (const char *tfm_name, int must_exist)
char *ofm_name, *suffix;
suffix = strrchr(tfm_name, '.');
- if (!suffix || (strcmp(suffix, ".tfm") != 0 &&
- strcmp(suffix, ".ofm") != 0)) {
+ if (!suffix || (strcasecmp(suffix, ".tfm") != 0 &&
+ strcasecmp(suffix, ".ofm") != 0)) {
ofm_name = NEW(strlen(tfm_name) + strlen(".ofm") + 1, char);
strcpy(ofm_name, tfm_name);
strcat(ofm_name, ".ofm");
@@ -882,11 +882,15 @@ tfm_open (const char *tfm_name, int must_exist)
(file_name = kpse_find_file(ofm_name, kpse_ofm_format, 0)) != NULL) {
format = OFM_FORMAT;
} else if ((file_name =
- kpse_find_file(tfm_name, kpse_tfm_format, 0)) != NULL) {
+ kpse_find_file(tfm_name, kpse_tfm_format, 0)) != NULL) {
format = TFM_FORMAT;
} else if ((file_name =
- kpse_find_file(tfm_name, kpse_ofm_format, 0)) != NULL) {
- format = OFM_FORMAT;
+ kpse_find_file(tfm_name, kpse_ofm_format, 0)) != NULL) {
+ suffix = strrchr(file_name, '.');
+ if (suffix && strcasecmp(suffix, ".ofm") == 0)
+ format = OFM_FORMAT;
+ else
+ format = TFM_FORMAT;
}
if (ofm_name)
RELEASE(ofm_name);