From 52437ef5df8c1abe6d62c74707f9099bbe2f912a Mon Sep 17 00:00:00 2001 From: TANAKA Takuji Date: Sat, 29 Apr 2023 14:46:47 +0900 Subject: [PATCH] [dvipdfmx] ChangeLog etc (#99) --- source/texk/dvipdfm-x/ChangeLog | 18 ++++++++++++++++++ source/texk/dvipdfm-x/configure.ac | 2 +- source/texk/dvipdfm-x/dvipdfmx-upjf.test | 3 +-- source/texk/dvipdfm-x/vf.c | 13 ++++++++----- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/source/texk/dvipdfm-x/ChangeLog b/source/texk/dvipdfm-x/ChangeLog index ead1d62d6e..3da6aa7faf 100644 --- a/source/texk/dvipdfm-x/ChangeLog +++ b/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,21 @@ +2023-04-29 TANAKA Takuji + + * {vf,tfm}.c: + Fallback multibyte characters in virtual fonts to + OFM fonts for (u)pTeX. + https://github.com/texjporg/tex-jp-build/issues/99 + * configure.ac: version 20230429. + * dvipdfmx-upjf.test, Makefile_upjf, tests/upjf-r00.{ofm,opl}, + tests/upjv-r00.{ofm,opl}, tests/upjf1-r.{tfm,pl}, + tests/upjf1_{full,omit}.{vf,zvp0}: + Add new tests for fallback virtual font to OFM. + + The rule for virtual fonts (VF) fallback is extended: + If a VF has no entry of a codepoint and the first + MAPFONT designates an OFM for (u)pTeX, then we designate the + glyph (usually with a fullwidth metric) of the same codepoint + with the same metrics of the codepoint in the OFM. + 2023-03-09 Karl Berry * TL'23 release. diff --git a/source/texk/dvipdfm-x/configure.ac b/source/texk/dvipdfm-x/configure.ac index 3caa2a4c99..4997dff948 100644 --- a/source/texk/dvipdfm-x/configure.ac +++ b/source/texk/dvipdfm-x/configure.ac @@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -AC_INIT([dvipdfm-x (TeX Live)], [20220710], [dvipdfmx@tug.org]) +AC_INIT([dvipdfm-x (TeX Live)], [20230429], [dvipdfmx@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([agl.c]) AC_CONFIG_AUX_DIR([../../build-aux]) diff --git a/source/texk/dvipdfm-x/dvipdfmx-upjf.test b/source/texk/dvipdfm-x/dvipdfmx-upjf.test index 8826e2db73..88a007a475 100755 --- a/source/texk/dvipdfm-x/dvipdfmx-upjf.test +++ b/source/texk/dvipdfm-x/dvipdfmx-upjf.test @@ -1,6 +1,6 @@ #! /bin/sh -vx # $Id$ -# Copyright 2020-2022 Japanese TeX Development Community +# Copyright 2020-2023 Japanese TeX Development Community # You may freely use, modify and/or distribute this file. TEXMFCNF=$srcdir/../kpathsea @@ -86,4 +86,3 @@ test -z "$failed" && exit 0 echo echo "failed tests:$failed" exit 1 - diff --git a/source/texk/dvipdfm-x/vf.c b/source/texk/dvipdfm-x/vf.c index 835e85de70..79fe93b3ee 100644 --- a/source/texk/dvipdfm-x/vf.c +++ b/source/texk/dvipdfm-x/vf.c @@ -414,18 +414,21 @@ void vf_set_char(int32_t ch, int vf_font) dvi_vf_init (default_font); if (ch >= vf_fonts[vf_font].num_chars || !(start = (vf_fonts[vf_font].ch_pkt)[ch])) { - if (tfm_is_jfm(vf_fonts[vf_font].dev_fonts[0].tfm_id) && + int is_jfm = tfm_is_jfm(vf_fonts[vf_font].dev_fonts[0].tfm_id); + if (is_jfm && ch < 0x1000000 && dpx_conf.compat_mode != dpx_mode_xdv_mode) { /* fallback multibyte character for (u)pTeX */ if (dpx_conf.verbose_level == 1) if (vf_fonts[vf_font].message_flag == 0) { - WARN ("Fallback multibyte character in virtual font: VF:%s to TFM:%s", - vf_fonts[vf_font].tex_name, vf_fonts[vf_font].dev_fonts[0].name); + WARN ("Fallback multibyte character in virtual font: VF:%s to %s:%s", + vf_fonts[vf_font].tex_name, is_jfm==2 ? "OFM" : "TFM", + vf_fonts[vf_font].dev_fonts[0].name); vf_fonts[vf_font].message_flag = 1; } if (dpx_conf.verbose_level > 1) - WARN ("Fallback multibyte character in virtual font: VF:%s char=0x%06x(%d) to TFM:%s", - vf_fonts[vf_font].tex_name, ch, ch, vf_fonts[vf_font].dev_fonts[0].name); + WARN ("Fallback multibyte character in virtual font: VF:%s char=0x%06x(%d) to %s:%s", + vf_fonts[vf_font].tex_name, ch, ch, is_jfm==2 ? "OFM" : "TFM", + vf_fonts[vf_font].dev_fonts[0].name); dvi_set (ch); dvi_vf_finish(); return;