Skip to content

Instantly share code, notes, and snippets.

@zr-tex8r zr-tex8r/test.enc
Created Feb 21, 2019

Embed
What would you like to do?
TeX: IPAex明朝で欧文TFMしてdvipdfmxするとアレ
/test [
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/zero /one /two /three /four /five /six /seven
/eight /nine /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
] def
test test ipaexm.ttf
(FAMILY TEST)
(FACE F MRR)
(CODINGSCHEME TEST)
(FONTDIMEN
(SLANT R 0.0)
(SPACE R 0.5)
(STRETCH R 0.0)
(SHRINK R 0.0)
(XHEIGHT R 0.5)
(QUAD R 1.0)
(EXTRASPACE R 0.0)
)
(CHARACTER C 0
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 1
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 2
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 3
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 4
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 5
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 6
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 7
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 8
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
(CHARACTER C 9
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
)
\font\test=test \test 2019\bye
@zr-tex8r

This comment has been minimized.

Copy link
Owner Author

commented Feb 21, 2019

pltotf test test
tex test
dvipdfmx -f test.map test.dvi

を実行すると、dvipdfmxが黙って異常終了して0バイトのtest.pdfができる。

ipam.ttf や ipamp.ttf では正常に動作する。

@zr-tex8r

This comment has been minimized.

Copy link
Owner Author

commented Feb 23, 2019

dvipdfmx -vvvの結果:

C>dvipdfmx -f test.map -vvv test.dvi
<FONTMAP:c:/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map><FONTMAP:c:/texlive/2018/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map><FONTMAP:c:/texlive/2018/texmf-dist/fonts/map/dvipdfmx/ckx.map><FONTMAP:./test.map>test.dvi -> test.pdf
DVI File Info
Unit: 25400000 / 473628672
Magnification: 1000
Media Height: 43725786
Media Width: 30785863
Stack Depth: 2
Page count:         1
DVI Comment:  TeX output 2019.02.22:0055

DVI file font info
TeX Font:       test loaded at ID=   50, size= 9.96pt (scaled 100.0%)
TeX Font:      cmr10 loaded at ID=    0, size= 9.96pt (scaled 100.0%)
<AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1<test@9.96pt(TFM:test[./test.tfm])
fontmap: test -> ipaexm.ttf(test)
(Encoding:test[test])
pdf_font>> Simple font "ipaexm.ttf" enc_id=<test,3> opened at font_id=<test,0>.
><cmr10@9.96pt(TFM:cmr10[c:/texlive/2018/texmf-dist/fonts/tfm/public/cm/cmr10.tfm])
fontmap: cmr10 -> cmr10.pfb

pdf_font>> Simple font "cmr10.pfb" enc_id=<builtin,-1> opened at font_id=<cmr10,1>.
>](ipaexm.ttf[VRKXXM+IPAexMincho][test][TrueType]
C>

これ以上verboseにしても落ちている付近のログは増えない。

@aminophen

This comment has been minimized.

Copy link

commented Feb 23, 2019

私の環境 (macOS, x86_64-darwin) では ipaexm.ttf でも正常終了します。この時の dvipdfmx -vvv のログ:

<FONTMAP:/usr/local/texlive/2019dev/texmf-var/fonts/map/pdftex/updmap/pdftex.map><FONTMAP:/usr/local/texlive/2019dev/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map><FONTMAP:/usr/local/texlive/2019dev/texmf-dist/fonts/map/dvipdfmx/ckx.map>test -> test.pdf
DVI File Info
Unit: 25400000 / 473628672
Magnification: 1000
Media Height: 43725786
Media Width: 30785863
Stack Depth: 2
Page count:	    1
DVI Comment:  TeX output 2019.02.23:1628

DVI file font info
TeX Font:       test loaded at ID=   50, size= 9.96pt (scaled 100.0%)
TeX Font:      cmr10 loaded at ID=    0, size= 9.96pt (scaled 100.0%)
<FONTMAP:./test.map><AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1<test@9.96pt(TFM:test[./test.tfm])
fontmap: test -> ipaexm.ttf(test)
(Encoding:test[test])
pdf_font>> Simple font "ipaexm.ttf" enc_id=<test,3> opened at font_id=<test,0>.
><cmr10@9.96pt(TFM:cmr10[/usr/local/texlive/2019dev/texmf-dist/fonts/tfm/public/cm/cmr10.tfm])
fontmap: cmr10 -> cmr10.pfb

pdf_font>> Simple font "cmr10.pfb" enc_id=<builtin,-1> opened at font_id=<cmr10,1>.
>](ipaexm.ttf[PECOLV+IPAexMincho][test][TrueType]truetype>> Glyph glyph-name="zero" found at glyph-id="19".
truetype>> Glyph glyph-name="one" found at glyph-id="20".
truetype>> Glyph glyph-name="two" found at glyph-id="21".
truetype>> Glyph glyph-name="nine" found at glyph-id="28".
[5 glyphs][4326 bytes])(cmr10.pfb[DKKNBY+CMR10][built-in][Type1][glyphs:/.notdef/one][2 glyphs][348 bytes])
Compression saved 2996 bytes
4239 bytes written

また,ipaexm.ttf ではなく ipam.ttf に変えた場合の dvipdfmx -vvv のログ:

<FONTMAP:/usr/local/texlive/2019dev/texmf-var/fonts/map/pdftex/updmap/pdftex.map><FONTMAP:/usr/local/texlive/2019dev/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map><FONTMAP:/usr/local/texlive/2019dev/texmf-dist/fonts/map/dvipdfmx/ckx.map>test -> test.pdf
DVI File Info
Unit: 25400000 / 473628672
Magnification: 1000
Media Height: 43725786
Media Width: 30785863
Stack Depth: 2
Page count:	    1
DVI Comment:  TeX output 2019.02.23:1628

DVI file font info
TeX Font:       test loaded at ID=   50, size= 9.96pt (scaled 100.0%)
TeX Font:      cmr10 loaded at ID=    0, size= 9.96pt (scaled 100.0%)
<FONTMAP:./test.map><AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1<test@9.96pt(TFM:test[./test.tfm])
fontmap: test -> ipam.ttf(test)
(Encoding:test[test])
pdf_font>> Simple font "ipam.ttf" enc_id=<test,3> opened at font_id=<test,0>.
><cmr10@9.96pt(TFM:cmr10[/usr/local/texlive/2019dev/texmf-dist/fonts/tfm/public/cm/cmr10.tfm])
fontmap: cmr10 -> cmr10.pfb

pdf_font>> Simple font "cmr10.pfb" enc_id=<builtin,-1> opened at font_id=<cmr10,1>.
>](ipam.ttf[PPPWDT+IPAMincho][test][TrueType]truetype>> Glyph glyph-name="zero" found at glyph-id="214".
truetype>> Glyph glyph-name="one" found at glyph-id="215".
truetype>> Glyph glyph-name="two" found at glyph-id="216".
truetype>> Glyph glyph-name="nine" found at glyph-id="223".
[5 glyphs][4334 bytes])(cmr10.pfb[BQQGZH+CMR10][built-in][Type1][glyphs:/.notdef/one][2 glyphs][348 bytes])
Compression saved 2978 bytes
4261 bytes written

めぼしい違いは glyph-id が ipaexm.ttf だと小さいことでしょうか…。

@aminophen

This comment has been minimized.

Copy link

commented Feb 23, 2019

glyph-id が ipaexm.ttf だと小さい

でもそれは ipamp.ttf や ipagp.ttf と同じ(それらは Windows でも正常)なので,理由にはならないですね…。

@aminophen

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.