[dvipdfmx] xdvipdfmx VORG issue

Masamichi Hosoda trueroad at trueroad.jp
Sun Jan 17 16:01:47 CET 2021


Hi all,

Devs from Japan found that xdvipdfmx could not find the VORG parameter.
Here's a patch to fix it.

```
--- a/source/texk/dvipdfm-x/cidtype0.c
+++ b/source/texk/dvipdfm-x/cidtype0.c
@@ -205,7 +205,7 @@ add_CIDVMetrics (sfnt *sfont, pdf_obj *fontdict,
     vertOriginX   = PDFUNIT(hmtx[gid].advance*0.5);
     vertOriginY   = defaultVertOriginY;
     for (i = 0;
-         i < vorg->numVertOriginYMetrics && gid > vorg->vertOriginYMetrics[i].glyphIndex;
+         i < vorg->numVertOriginYMetrics && gid >= vorg->vertOriginYMetrics[i].glyphIndex;
          i++) {
       if (gid == vorg->vertOriginYMetrics[i].glyphIndex)
         vertOriginY = PDFUNIT(vorg->vertOriginYMetrics[i].vertOriginY);
```

I used the following source to verify that it works.

```
% plain XeTeX
\nopagenumbers
\font\f="[HaranoAjiMincho-Regular.otf]:vertical" \f%
□y□y□y□
\bye
```

The results with and without the patch are attached.

Thanks.

---
Masamichi Hosoda <trueroad at trueroad.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r57451-without-patch.png
Type: image/png
Size: 5623 bytes
Desc: not available
URL: <https://tug.org/pipermail/dvipdfmx/attachments/20210118/05e79603/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r57451-with-patch.png
Type: image/png
Size: 5629 bytes
Desc: not available
URL: <https://tug.org/pipermail/dvipdfmx/attachments/20210118/05e79603/attachment-0001.png>


More information about the dvipdfmx mailing list.