diff options
author | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2022-03-17 19:54:14 -0500 |
---|---|---|
committer | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2022-03-17 19:58:12 -0500 |
commit | 10cb4eaa8cc89aee25a8def73fd9470f75090d70 (patch) | |
tree | 58f5d7dbc6ae51b13e8dd4ebf5400a04a6b7c960 /print/tex-xdvik/files/patch-texk-xdvik-font-open.c | |
parent | sysutils/screen: Update to 4.9.0 (diff) |
print/tex-xdvik: Update version 22.87=>22.87.06
While upgradingthe extra japanese ptex patches has been removed as those
are not compatible with latest version and the old patches are also from
early 2008. If someone make those work with the new version the patches
are welcome. For further details or the older version of tex-xdvik with
those patches please use japanese/ja-tex-xdvik
Relnotes: https://sourceforge.net/projects/xdvi/files/xdvik/22.87.06/
Diffstat (limited to 'print/tex-xdvik/files/patch-texk-xdvik-font-open.c')
-rw-r--r-- | print/tex-xdvik/files/patch-texk-xdvik-font-open.c | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/print/tex-xdvik/files/patch-texk-xdvik-font-open.c b/print/tex-xdvik/files/patch-texk-xdvik-font-open.c deleted file mode 100644 index 58c908585a4e..000000000000 --- a/print/tex-xdvik/files/patch-texk-xdvik-font-open.c +++ /dev/null @@ -1,121 +0,0 @@ ---- texk/xdvik/font-open.c.orig 2013-05-14 05:26:19 UTC -+++ texk/xdvik/font-open.c -@@ -27,6 +27,9 @@ - #include "xdvi-config.h" - #include "xdvi.h" - #include "dvi-draw.h" -+#ifdef PTEX -+#include "ptexmap.h" -+#endif - #include "util.h" - #include "events.h" - #include "dvi-init.h" -@@ -213,6 +216,38 @@ getdefaults(FILE *f) - p_node->value = xmemdup(p, len + 1); - *p_tail = p_node; - p_tail = &p_node->next; -+ } else if (*p == 'x') { -+ char *name; -+ -+ name = NULL; -+ do ++p; -+ while (*p == ' ' || *p == '\t'); -+ -+ if (*p == '+') -+ do ++p; -+ while (*p == ' ' || *p == '\t'); -+ -+ name = strtok(p, " \t"); -+ if (name == NULL) { -+ XDVI_WARNING((stderr, "Syntax error in entry \"%s\" " -+ "(ignored)", ffline)); -+ continue; -+ } -+ read_ptexmap_file(name); -+ } else if (*p == 'r') { -+ char *name, *ptr; -+ -+ name = ptr = NULL; -+ do ++p; -+ while (*p == ' ' || *p == '\t'); -+ name = strtok(p, " \t"); -+ if ((name == NULL) || -+ (ptr = strtok(NULL, " \t")) == NULL) { -+ XDVI_WARNING((stderr, "Syntax error in entry \"%s\" " -+ "(ignored)", ffline)); -+ continue; -+ } -+ add_replace_dictionary(name, ptr); - } - } - -@@ -446,13 +481,38 @@ init_t1_lookup(void) - TRACE_FT((stderr, "Encoding[%d]: '%s' = '%s' -> '%s'", - i, enc, name, ptr)); - # endif -+#ifdef PTEX -+ } -+ else if (strcmp(keyword, "ptexmap") == 0) { -+ if ((ptr = strtok(NULL, delim)) == NULL) { -+ XDVI_WARNING((stderr, -+ "Syntax error in entry \"%s\" (skipping line)", -+ ffline)); -+ continue; -+ } -+ read_ptexmap_file(ptr); -+ } -+ else if (strcmp(keyword, "replace") == 0) { -+ if ((name = strtok(NULL, delim)) == NULL || -+ (ptr = strtok(NULL, delim)) == NULL) { -+ XDVI_WARNING((stderr, -+ "Syntax error in entry \"%s\" (skipping line)", -+ ffline)); -+ continue; -+ } -+ add_replace_dictionary(name, ptr); -+#endif - } else { - /* again, nag them with a popup so that they'll do something - about this ... */ - popup_message(globals.widgets.top_level, - MSG_ERR, - "Please check the syntax of your config file. " -+#ifdef PTEX -+ "Valid keywords are: \"enc\", \"dvipsmap\", \"ptexmap\" and \"replace\".", -+#else - "Valid keywords are: \"enc\" and \"dvipsmap\".", -+#endif - "Skipping unknown keyword \"%s\" in config file %s.", - keyword, filename); - } -@@ -1103,7 +1163,7 @@ process_gs_fontmap(FILE *f) - if (ttype == GS_EOF || ttype == GS_ERR) - break; - if (ttype == LPAREN) { -- Boolean quiet = False; -+ Boolean quiet = False; - FILE *f1; - - ttype = get_gs_token(&gsf, pos1, &pos2, "Fontmap"); -@@ -1692,7 +1752,7 @@ font_open( - const char **font_ret, - int *dpi_ret) - { -- char *name; -+ char *name = NULL; - kpse_glyph_file_type file_ret; - #if DELAYED_MKTEXPK - Boolean message_done = False; -@@ -1706,6 +1766,12 @@ font_open( - fontp->filename = NULL; - *dpi_ret = fontp->fsize; - -+#ifdef PTEX -+ /* for kanji, first try jfm's, then 8-bit vf's (not 16bit ovf's). */ -+ if (iskanjifont(fontp->fontname)) -+ name = kpse_find_tfm(fontp->fontname); -+ else -+#endif /* PTEX */ - if (resource.omega) { /* for omega, first try 16-bit ovf's, then 8-bit vf's. */ - name = kpse_find_ovf(fontp->fontname); - if (name == NULL) |