フォント名の文字化けの原因をさぐる

目次

公開日 2026-02-01 更新日 -

概要

前回の「フォント名の文字化け-フォント側に問題がないことを確認」でttfファイルに書かれているフォント名のバイト列をさまざまにデコードして調べるというのを、色々なフォントで行っています。

YOzフォントについては、WindowsやMacでも使用できるはずですが、問題が起こっていないと思います。Debianでも12まではこの現象はありませんでした。この記事を必要とされる方は限られていると思います。

Debianでフォント名を管理するのは、fontconfig であろうと思います。Debian13ではversionは 2.15.0-2.3 です。fc-list コマンドでフォント名の文字化けをみせてくれるので、ttfファイルと比較して何が問題なのかをさぐってみました。

フォントによっては、エンコード名の設定を間違えたりして、そこでfontconfigの考えていることが判明する部分もあってなかなか興味深いことがあります。

この記事では、YOzフォントから始めたために、fontconfigはmac用の日本語フォント名を優先して採用しようとしているという仮説で調べていきますが、途中"IPA P明朝"で考え直さなければならなくなっています。ですから、解釈部分は信用せず、データのみ参考にしてください。

各フォントごとに次のような手順を踏んでいます。

次回の記事で、データを必要最小限のものにして、新しい解釈とともにまとめる予定です。

■YOzS90iは文字化けしていない

YOzS90bi、ファイル名でYOzBS_90i.ttfのフォントが化けているのを前回見ましたが、YOzのフォントのうち約半分は化けていないか、style=䉯汤,Boldの部分だけが化けます。

adachi@banach:~$ fc-list YOzS90bi
/usr/share/fonts/truetype/yozvox-yozfont/YOzBS_90i.ttf: 奏穓㤰扩,YOzS90bi:style=䉯汤,Bold

YOzS90biに名前の似ているYOzS90iについて違いを調べてみます。

adachi@banach:~$ fc-list YOzS90i
/usr/share/fonts/truetype/yozvox-yozfont/YOzRS_90i.ttf: YOzS90i:style=Regular

日本語名がないことを-vオプションでも確認します。

adachi@banach:~$ fc-list -vb YOzS90i
Pattern has 26 elts (size 32)
	family: "YOzS90i"(s)
	familylang: "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "YOzS90i"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)
	...以下略

YOzS90iフォントのオフセットテーブル

YOzS90iフォントのファイルである、YOzRS_90i.ttfのオフセットテーブルを見ていきます。

adachi@banach:~$ hd /usr/share/fonts/truetype/yozvox-yozfont/YOzRS_90i.ttf|head -19
00000000  00 01 00 00 00 12 01 00  00 04 00 20 47 53 55 42  |........... GSUB|
00000010  39 b5 89 69 00 00 01 2c  00 00 09 a0 4f 53 2f 32  |9..i...,....OS/2|
00000020  7b bb 9c 48 00 00 0a cc  00 00 00 56 63 6d 61 70  |{..H.......Vcmap|
00000030  81 65 89 ac 00 00 0b 24  00 00 85 8c 63 76 74 20  |.e.....$....cvt |
00000040  0f c0 10 00 00 00 90 b0  00 00 02 00 66 70 67 6d  |............fpgm|
00000050  01 52 9c 18 00 00 92 b0  00 00 00 b3 67 61 73 70  |.R..........gasp|
00000060  00 07 00 07 00 00 93 64  00 00 00 0c 67 6c 79 66  |.......d....glyf|
00000070  4b 54 0f 8e 00 00 93 70  00 95 69 30 68 65 61 64  |KT.....p..i0head|
00000080  09 a8 2c ed 00 95 fc a0  00 00 00 36 68 68 65 61  |..,........6hhea|
00000090  07 73 58 0b 00 95 fc d8  00 00 00 24 68 6d 74 78  |.sX........$hmtx|
000000a0  aa ad c9 34 00 95 fc fc  00 01 57 2c 6c 6f 63 61  |...4......W,loca|
000000b0  77 15 1d 8c 00 97 54 28  00 01 57 30 6d 61 78 70  |w.....T(..W0maxp|
000000c0  6e 28 04 4d 00 98 ab 58  00 00 00 20 6d 6f 72 74  |n(.M...X... mort|
000000d0  bd c7 3f 9b 00 98 ab 78  00 00 09 a8 6e 61 6d 65  |..?....x....name|
000000e0  8a 5a e4 dd 00 98 b5 20  00 00 02 03 70 6f 73 74  |.Z..... ....post|
000000f0  ff a3 00 30 00 98 b7 24  00 00 00 20 70 72 65 70  |...0...$... prep|
00000100  0f 25 3e a5 00 98 b7 44  00 00 02 82 76 68 65 61  |.%>....D....vhea|
00000110  06 04 56 98 00 98 b9 c8  00 00 00 24 76 6d 74 78  |..V........$vmtx|
00000120  2a 31 bc aa 00 98 b9 ec  00 01 57 2c 00 01 00 00  |*1........W,....|

fileコマンドで簡単に

やはりnameテーブルのオフセットは fileコマンドで知ることができます。

adachi@banach:~$ file /usr/share/fonts/truetype/yozvox-yozfont/YOzRS_90i.ttf
/usr/share/fonts/truetype/yozvox-yozfont/YOzRS_90i.ttf: TrueType Font data, 18 tables, 1st "GSUB", name offset 0x98b520

YOzS90iフォントのnameテーブル

nameのデータはオフセットが 00 98 b5 20 長さが 00 00 02 03 なので、0098b520の行の 00 00から、0098b720 の行の 39 30 69 までです。

adachi@banach:~$ hd /usr/share/fonts/truetype/yozvox-yozfont/YOzRS_90i.ttf|grep 0098b520 -A32
0098b520  00 00 00 21 01 92 00 01  00 00 00 00 00 00 00 08  |...!............|
0098b530  00 53 00 01 00 00 00 00  00 01 00 07 00 6a 00 01  |.S...........j..|
0098b540  00 00 00 00 00 02 00 07  00 63 00 01 00 00 00 00  |.........c......|
0098b550  00 03 00 07 00 6a 00 01  00 00 00 00 00 04 00 07  |.....j..........|
0098b560  00 6a 00 01 00 00 00 00  00 05 00 0d 00 46 00 01  |.j...........F..|
0098b570  00 00 00 00 00 06 00 07  00 6a 00 01 00 00 00 00  |.........j......|
0098b580  00 07 00 07 00 6a 00 01  00 01 00 0b 00 00 00 08  |.....j..........|
0098b590  00 53 00 01 00 01 00 0b  00 01 00 07 00 6a 00 01  |.S...........j..|
0098b5a0  00 01 00 0b 00 02 00 07  00 63 00 01 00 01 00 0b  |.........c......|
0098b5b0  00 03 00 07 00 6a 00 01  00 01 00 0b 00 04 00 07  |.....j..........|
0098b5c0  00 6a 00 01 00 01 00 0b  00 05 00 0d 00 46 00 01  |.j...........F..|
0098b5d0  00 01 00 0b 00 06 00 07  00 6a 00 01 00 01 00 0b  |.........j......|
0098b5e0  00 07 00 07 00 6a 00 03  00 01 04 09 00 00 00 10  |.....j..........|
0098b5f0  00 1a 00 03 00 01 04 09  00 01 00 0e 00 2a 00 03  |.............*..|
0098b600  00 01 04 09 00 02 00 0e  00 38 00 03 00 01 04 09  |.........8......|
0098b610  00 03 00 0e 00 2a 00 03  00 01 04 09 00 04 00 0e  |.....*..........|
0098b620  00 2a 00 03 00 01 04 09  00 05 00 1a 00 00 00 03  |.*..............|
0098b630  00 01 04 09 00 06 00 0e  00 2a 00 03 00 01 04 09  |.........*......|
0098b640  00 07 00 0e 00 2a 00 03  00 01 04 11 00 00 00 10  |.....*..........|
0098b650  00 1a 00 03 00 01 04 11  00 01 00 0e 00 2a 00 03  |.............*..|
0098b660  00 01 04 11 00 02 00 0e  00 38 00 03 00 01 04 11  |.........8......|
0098b670  00 03 00 0e 00 2a 00 03  00 01 04 11 00 04 00 0e  |.....*..........|
0098b680  00 2a 00 03 00 01 04 11  00 05 00 1a 00 00 00 03  |.*..............|
0098b690  00 01 04 11 00 06 00 0e  00 2a 00 03 00 01 04 11  |.........*......|
0098b6a0  00 07 00 0e 00 2a 00 03  00 01 04 11 00 0d 00 08  |.....*..........|
0098b6b0  00 5b 00 56 00 65 00 72  00 73 00 69 00 6f 00 6e  |.[.V.e.r.s.i.o.n|
0098b6c0  00 20 00 31 00 34 00 2e  00 30 00 34 00 59 00 2e  |. .1.4...0.4.Y..|
0098b6d0  00 4f 00 7a 00 20 00 56  00 6f 00 78 00 59 00 4f  |.O.z. .V.o.x.Y.O|
0098b6e0  00 7a 00 53 00 39 00 30  00 69 00 52 00 65 00 67  |.z.S.9.0.i.R.e.g|
0098b6f0  00 75 00 6c 00 61 00 72  56 65 72 73 69 6f 6e 20  |.u.l.a.rVersion |
0098b700  31 34 2e 30 34 59 2e 4f  7a 20 56 6f 78 00 2d 00  |14.04Y.Oz Vox.-.|
0098b710  2d 00 2d 00 2d 52 65 67  75 6c 61 72 59 4f 7a 53  |-.-.-RegularYOzS|
0098b720  39 30 69 00 00 03 00 00  00 00 00 00 ff a0 00 30  |90i............0|

YOzS90iフォントのnameオフセットテーブル

面倒になってきたので、python3のプログラムを書いて自動化してみました。確認しながらすすみます。

filename='/usr/share/fonts/truetype/yozvox-yozfont/YOzRS_90i.ttf'
offset=0x98b520
formatOfNameRecord=0x0000
numOfNameRecord=0x0021
stringOffsetOfNameRecord=0x0192
nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 00 00 en 00 00 00 08 00 53
01 00 01 mac 00 00 rom 00 00 en 00 01 00 07 00 6a
02 00 01 mac 00 00 rom 00 00 en 00 02 00 07 00 63
03 00 01 mac 00 00 rom 00 00 en 00 03 00 07 00 6a
04 00 01 mac 00 00 rom 00 00 en 00 04 00 07 00 6a
05 00 01 mac 00 00 rom 00 00 en 00 05 00 0d 00 46
06 00 01 mac 00 00 rom 00 00 en 00 06 00 07 00 6a
07 00 01 mac 00 00 rom 00 00 en 00 07 00 07 00 6a
08 00 01 mac 00 01 jap 00 0b ja 00 00 00 08 00 53
09 00 01 mac 00 01 jap 00 0b ja 00 01 00 07 00 6a
0a 00 01 mac 00 01 jap 00 0b ja 00 02 00 07 00 63
0b 00 01 mac 00 01 jap 00 0b ja 00 03 00 07 00 6a
0c 00 01 mac 00 01 jap 00 0b ja 00 04 00 07 00 6a
0d 00 01 mac 00 01 jap 00 0b ja 00 05 00 0d 00 46
0e 00 01 mac 00 01 jap 00 0b ja 00 06 00 07 00 6a
0f 00 01 mac 00 01 jap 00 0b ja 00 07 00 07 00 6a
10 00 03 win 00 01 uni 04 09 en 00 00 00 10 00 1a
11 00 03 win 00 01 uni 04 09 en 00 01 00 0e 00 2a
12 00 03 win 00 01 uni 04 09 en 00 02 00 0e 00 38
13 00 03 win 00 01 uni 04 09 en 00 03 00 0e 00 2a
14 00 03 win 00 01 uni 04 09 en 00 04 00 0e 00 2a
15 00 03 win 00 01 uni 04 09 en 00 05 00 1a 00 00
16 00 03 win 00 01 uni 04 09 en 00 06 00 0e 00 2a
17 00 03 win 00 01 uni 04 09 en 00 07 00 0e 00 2a
18 00 03 win 00 01 uni 04 11 ja 00 00 00 10 00 1a
19 00 03 win 00 01 uni 04 11 ja 00 01 00 0e 00 2a
1a 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 00 38
1b 00 03 win 00 01 uni 04 11 ja 00 03 00 0e 00 2a
1c 00 03 win 00 01 uni 04 11 ja 00 04 00 0e 00 2a
1d 00 03 win 00 01 uni 04 11 ja 00 05 00 1a 00 00
1e 00 03 win 00 01 uni 04 11 ja 00 06 00 0e 00 2a
1f 00 03 win 00 01 uni 04 11 ja 00 07 00 0e 00 2a
20 00 03 win 00 01 uni 04 11 ja 00 0d 00 08 00 5b

文字列の数は、0~0x20 で 0x21(10進33個)で全部読めています。

オフセットが同じということは、同じ文字列が設定されているということです。win_enなどの定義は前のページと同じです。

文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
0000001a win_en_05, win_ja_05,
001a0010 win_en_00, win_ja_00,
002a000e win_en_01, win_en_03, win_en_04, win_en_06, win_en_07, win_ja_01, win_ja_03, win_ja_04, win_ja_06, win_ja_07,
0038000e win_en_02, win_ja_02,
0046000d mac_en_05, mac_ja_05,
00530008 mac_en_00, mac_ja_00,
005b0008 win_ja_13,
00630007 mac_en_02, mac_ja_02,
006a0007 mac_en_01, mac_en_03, mac_en_04, mac_en_06, mac_en_07, mac_ja_01, mac_ja_03, mac_ja_04, mac_ja_06, mac_ja_07,

YOzS90iフォントの名前文字列のデコード一覧

文字列はバイト列として格納されているので、指定されたエンコード形式でエンコードされているとしてデコードして読める文字列となります。

エンコード形式は platformID encodingID languageID で決まりますが、ここではすべて utf_16_be shift_jis の両方でデコードしています。 shift_jisは、20~7eまでは ascii と同じなので、ASCII を兼ねています。

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
000026 0x98b6b2win_en,win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 34 00 2e 00 30 00 34 Version 14.04Version 14.04
001a16 0x98b6ccwin_en,win_ja00 00 59 00 2e 00 4f 00 7a 00 20 00 56 00 6f 00 78 Y.Oz VoxY.Oz Vox
002a14 0x98b6dcwin_en,win_ja01,03,04,06,07 00 59 00 4f 00 7a 00 53 00 39 00 30 00 69 YOzS90iYOzS90i
003814 0x98b6eawin_en,win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
004613 0x98b6f8mac_en,mac_ja05 56 65 72 73 69 6f 6e 20 31 34 2e 30 34 噥牳楯渠ㄴ⸰�Version 14.04
00538 0x98b705mac_en,mac_ja00 59 2e 4f 7a 20 56 6f 78 央佺⁖潸Y.Oz Vox
005b8 0x98b70dwin_ja13 00 2d 00 2d 00 2d 00 2d --------
00637 0x98b715mac_en,mac_ja02 52 65 67 75 6c 61 72 剥杵污�Regular
006a7 0x98b71cmac_en,mac_ja01,03,04,06,07 59 4f 7a 53 39 30 69 奏穓㤰�YOzS90i

前回の YOzS90bi では、英語名はmac_enからasciiで、、日本語名はmac_jaからutf_16_beでデコードしたと推測されました。

今回の YOzS90i でも同様とすると、日本語名はmac_jaからutf_16_beでデコードすると、7バイトと奇数なので失敗します。最後が�になっているのがその証拠です。そこで、日本語名をないものとした、と考えられます。

styleについても、Regularは7バイトなのでutf_16_beでのデコードに失敗して、英語名だけになったと考えられます。

Boldは4バイトなので、utf_16_beでのデコードに成功したと考え、"䉯汤"が日本語名になった。これがBoldのフォントに限ってstyleが化けている原因のような気がします。

adachi@banach:~$ fc-list -vb YOzS90i
Pattern has 26 elts (size 32)
	family: "YOzS90i"(s)
	familylang: "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "YOzS90i"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)
	...以下略

■YOzSはフォント名だけ文字化け

fc-list確認

adachi@banach:~$ fc-list YOzS
/usr/share/fonts/truetype/yozvox-yozfont/YOzRS_.ttf: 奏穓,YOzS:style=Regular
adachi@banach:~$ fc-list -vb YOzS
Pattern has 26 elts (size 32)
	family: "奏穓"(s) "YOzS"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "奏穓"(s) "YOzS"(s)
	fullnamelang: "ja"(s) "en"(s)
	slant: 0(i)(s)

fileの出力

adachi@banach:~$ file /usr/share/fonts/truetype/yozvox-yozfont/YOzRS_.ttf
/usr/share/fonts/truetype/yozvox-yozfont/YOzRS_.ttf: TrueType Font data, 17 tables, 1st "GSUB", name offset 0x8c8a34

一応、冒頭部分を確認して、

adachi@banach:~$ hd /usr/share/fonts/truetype/yozvox-yozfont/YOzRS_.ttf|head
00000000  00 01 00 00 00 11 01 00  00 04 00 10 47 53 55 42  |............GSUB|
00000010  c4 fe 68 df 00 00 01 1c  00 00 0e dc 4f 53 2f 32  |..h.........OS/2|
00000020  7c fd ce 48 00 00 0f f8  00 00 00 56 63 6d 61 70  ||..H.......Vcmap|
00000030  b7 db 30 70 00 00 10 50  00 01 8f 8f 63 76 74 20  |..0p...P....cvt |
...

YOzSフォントのnameオフセットテーブル

filename='/usr/share/fonts/truetype/yozvox-yozfont/YOzRS_.ttf'
offset=0x8c8a34
formatOfNameRecord=0x0000
numOfNameRecord=0x0021
stringOffsetOfNameRecord=0x0192
nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 00 00 en 00 00 00 08 00 45
01 00 01 mac 00 00 rom 00 00 en 00 01 00 04 00 64
02 00 01 mac 00 00 rom 00 00 en 00 02 00 07 00 5d
03 00 01 mac 00 00 rom 00 00 en 00 03 00 04 00 64
04 00 01 mac 00 00 rom 00 00 en 00 04 00 04 00 64
05 00 01 mac 00 00 rom 00 00 en 00 05 00 0d 00 38
06 00 01 mac 00 00 rom 00 00 en 00 06 00 04 00 64
07 00 01 mac 00 00 rom 00 00 en 00 07 00 04 00 64
08 00 01 mac 00 01 jap 00 0b ja 00 00 00 08 00 45
09 00 01 mac 00 01 jap 00 0b ja 00 01 00 04 00 64
0a 00 01 mac 00 01 jap 00 0b ja 00 02 00 07 00 5d
0b 00 01 mac 00 01 jap 00 0b ja 00 03 00 04 00 64
0c 00 01 mac 00 01 jap 00 0b ja 00 04 00 04 00 64
0d 00 01 mac 00 01 jap 00 0b ja 00 05 00 0d 00 38
0e 00 01 mac 00 01 jap 00 0b ja 00 06 00 04 00 64
0f 00 01 mac 00 01 jap 00 0b ja 00 07 00 04 00 64
10 00 03 win 00 01 uni 04 09 en 00 00 00 10 00 1a
11 00 03 win 00 01 uni 04 09 en 00 01 00 08 00 4d
12 00 03 win 00 01 uni 04 09 en 00 02 00 0e 00 2a
13 00 03 win 00 01 uni 04 09 en 00 03 00 08 00 4d
14 00 03 win 00 01 uni 04 09 en 00 04 00 08 00 4d
15 00 03 win 00 01 uni 04 09 en 00 05 00 1a 00 00
16 00 03 win 00 01 uni 04 09 en 00 06 00 08 00 4d
17 00 03 win 00 01 uni 04 09 en 00 07 00 08 00 4d
18 00 03 win 00 01 uni 04 11 ja 00 00 00 10 00 1a
19 00 03 win 00 01 uni 04 11 ja 00 01 00 08 00 4d
1a 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 00 2a
1b 00 03 win 00 01 uni 04 11 ja 00 03 00 08 00 4d
1c 00 03 win 00 01 uni 04 11 ja 00 04 00 08 00 4d
1d 00 03 win 00 01 uni 04 11 ja 00 05 00 1a 00 00
1e 00 03 win 00 01 uni 04 11 ja 00 06 00 08 00 4d
1f 00 03 win 00 01 uni 04 11 ja 00 07 00 08 00 4d
20 00 03 win 00 01 uni 04 11 ja 00 0d 00 08 00 55
文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
0000001a win_en_05, win_ja_05,
001a0010 win_en_00, win_ja_00,
002a000e win_en_02, win_ja_02,
0038000d mac_en_05, mac_ja_05,
00450008 mac_en_00, mac_ja_00,
004d0008 win_en_01, win_en_03, win_en_04, win_en_06, win_en_07, win_ja_01, win_ja_03, win_ja_04, win_ja_06, win_ja_07,
00550008 win_ja_13,
005d0007 mac_en_02, mac_ja_02,
00640004 mac_en_01, mac_en_03, mac_en_04, mac_en_06, mac_en_07, mac_ja_01, mac_ja_03, mac_ja_04, mac_ja_06, mac_ja_07,

YOzSフォントの名前文字列のデコード一覧

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
000026 0x8c8bc6win_en,win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 34 00 2e 00 30 00 34 Version 14.04Version 14.04
001a16 0x8c8be0win_en,win_ja00 00 59 00 2e 00 4f 00 7a 00 20 00 56 00 6f 00 78 Y.Oz VoxY.Oz Vox
002a14 0x8c8bf0win_en,win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
003813 0x8c8bfemac_en,mac_ja05 56 65 72 73 69 6f 6e 20 31 34 2e 30 34 噥牳楯渠ㄴ⸰�Version 14.04
00458 0x8c8c0bmac_en,mac_ja00 59 2e 4f 7a 20 56 6f 78 央佺⁖潸Y.Oz Vox
004d8 0x8c8c13win_en,win_ja01,03,04,06,07 00 59 00 4f 00 7a 00 53 YOzSYOzS
00558 0x8c8c1bwin_ja13 00 2d 00 2d 00 2d 00 2d --------
005d7 0x8c8c23mac_en,mac_ja02 52 65 67 75 6c 61 72 剥杵污�Regular
00644 0x8c8c2amac_en,mac_ja01,03,04,06,07 59 4f 7a 53 奏穓YOzS

YOzS では、日本語名はmac_jaのバイト列をutf_16_beでデコードして"奏穓"となりデコードは成功なのでこれを採用。英語名はasciiでデコードしてYOzSとなり、これを採用。

styleについては、日本語名はmac_jaのバイト列をutf_16_beでのデコード。Regularは7バイトなので失敗して、英語名だけになったと考えられます。

うまくついていけてます。

■YOzSF90biは奇数バイトなのに

手作業で化け文字フォントのフォントファイルを探っていたときに、気になるフォントがありました。YOzSF90biです。日本語名が、"奏穓䘹ぢ楘"ですが、対応するasciiが"YOzSF90biX"になって、文字数が合わないのです。これを探ります。

adachi@banach:/media/adachi/E1T/python3/work$ fc-list YOzSF90bi
/usr/share/fonts/truetype/yozvox-yozfont/YOzBSF90i.ttf: 奏穓䘹ぢ楘,YOzSF90bi:style=䉯汤,Bold
adachi@banach:/media/adachi/E1T/python3/work$ fc-list -vb YOzSF90bi
Pattern has 27 elts (size 32)
	family: "奏穓䘹ぢ楘"(s) "YOzSF90bi"(s)
	familylang: "ja"(s) "en"(s)
	style: "䉯汤"(s) "Bold"(s)
	stylelang: "ja"(s) "en"(s)
	fullname: "YOzSF90bi"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)

fileの出力

adachi@banach:~$ file /usr/share/fonts/truetype/yozvox-yozfont/YOzBSF90i.ttf
/usr/share/fonts/truetype/yozvox-yozfont/YOzBSF90i.ttf: TrueType Font data, 18 tables, 1st "GSUB", name offset 0x9ac974

一応、冒頭部分を確認して、

adachi@banach:~$ hd /usr/share/fonts/truetype/yozvox-yozfont/YOzBSF90i.ttf |head -5
00000000  00 01 00 00 00 12 01 00  00 04 00 20 47 53 55 42  |........... GSUB|
00000010  39 b5 89 69 00 00 01 2c  00 00 09 a0 4f 53 2f 32  |9..i...,....OS/2|
00000020  7b bb 9c 51 00 00 0a cc  00 00 00 56 63 6d 61 70  |{..Q.......Vcmap|
00000030  81 65 89 ac 00 00 0b 24  00 00 85 8c 63 76 74 20  |.e.....$....cvt |
00000040  0f c0 10 00 00 00 90 b0  00 00 02 00 66 70 67 6d  |............fpgm|

YOzSF90biフォントのnameオフセットテーブル

filename='/usr/share/fonts/truetype/yozvox-yozfont/YOzBSF90i.ttf'
offset=0x9ac974
formatOfNameRecord=0x0000
numOfNameRecord=0x0021
stringOffsetOfNameRecord=0x0192
nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 00 00 en 00 00 00 08 00 5b
01 00 01 mac 00 00 rom 00 00 en 00 01 00 09 00 49
02 00 01 mac 00 00 rom 00 00 en 00 02 00 04 00 6b
03 00 01 mac 00 00 rom 00 00 en 00 03 00 09 00 49
04 00 01 mac 00 00 rom 00 00 en 00 04 00 09 00 49
05 00 01 mac 00 00 rom 00 00 en 00 05 00 0d 00 3c
06 00 01 mac 00 00 rom 00 00 en 00 06 00 09 00 49
07 00 01 mac 00 00 rom 00 00 en 00 07 00 09 00 49
08 00 01 mac 00 01 jap 00 0b ja 00 00 00 08 00 5b
09 00 01 mac 00 01 jap 00 0b ja 00 01 00 0a 00 49
0a 00 01 mac 00 01 jap 00 0b ja 00 02 00 04 00 6b
0b 00 01 mac 00 01 jap 00 0b ja 00 03 00 09 00 49
0c 00 01 mac 00 01 jap 00 0b ja 00 04 00 09 00 49
0d 00 01 mac 00 01 jap 00 0b ja 00 05 00 0d 00 3c
0e 00 01 mac 00 01 jap 00 0b ja 00 06 00 09 00 49
0f 00 01 mac 00 01 jap 00 0b ja 00 07 00 09 00 49
10 00 03 win 00 01 uni 04 09 en 00 00 00 10 00 2c
11 00 03 win 00 01 uni 04 09 en 00 01 00 12 00 1a
12 00 03 win 00 01 uni 04 09 en 00 02 00 08 00 53
13 00 03 win 00 01 uni 04 09 en 00 03 00 12 00 1a
14 00 03 win 00 01 uni 04 09 en 00 04 00 12 00 1a
15 00 03 win 00 01 uni 04 09 en 00 05 00 1a 00 00
16 00 03 win 00 01 uni 04 09 en 00 06 00 12 00 1a
17 00 03 win 00 01 uni 04 09 en 00 07 00 12 00 1a
18 00 03 win 00 01 uni 04 11 ja 00 00 00 10 00 2c
19 00 03 win 00 01 uni 04 11 ja 00 01 00 12 00 1a
1a 00 03 win 00 01 uni 04 11 ja 00 02 00 08 00 53
1b 00 03 win 00 01 uni 04 11 ja 00 03 00 12 00 1a
1c 00 03 win 00 01 uni 04 11 ja 00 04 00 12 00 1a
1d 00 03 win 00 01 uni 04 11 ja 00 05 00 1a 00 00
1e 00 03 win 00 01 uni 04 11 ja 00 06 00 12 00 1a
1f 00 03 win 00 01 uni 04 11 ja 00 07 00 12 00 1a
20 00 03 win 00 01 uni 04 11 ja 00 0d 00 08 00 63

offset'0049'のlengthとして'0009'と'000a'と2つの値があります。これそのものは規格として間違っているわけではありませんが、mac_jaのnameIDの01だけ異なるというのは妙です。03,04,06,07も'000a'ならわかります。

文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
0000001a win_en_05, win_ja_05,
001a0012 win_en_01, win_en_03, win_en_04, win_en_06, win_en_07, win_ja_01, win_ja_03, win_ja_04, win_ja_06, win_ja_07,
002c0010 win_en_00, win_ja_00,
003c000d mac_en_05, mac_ja_05,
00490009 mac_en_01, mac_en_03, mac_en_04, mac_en_06, mac_en_07, mac_ja_03, mac_ja_04, mac_ja_06, mac_ja_07,
0049000a mac_ja_01,
00530008 win_en_02, win_ja_02,
005b0008 mac_en_00, mac_ja_00,
00630008 win_ja_13,
006b0004 mac_en_02, mac_ja_02,

YOzSF90biフォントの名前文字列のデコード一覧

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
000026 0x9acb06win_en,win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 34 00 2e 00 30 00 34 Version 14.04Version 14.04
001a18 0x9acb20win_en,win_ja01,03,04,06,07 00 59 00 4f 00 7a 00 53 00 46 00 39 00 30 00 62 00 69 YOzSF90biYOzSF90bi
002c16 0x9acb32win_en,win_ja00 00 59 00 2e 00 4f 00 7a 00 20 00 56 00 6f 00 78 Y.Oz VoxY.Oz Vox
003c13 0x9acb42mac_en,mac_ja05 56 65 72 73 69 6f 6e 20 31 34 2e 30 34 噥牳楯渠ㄴ⸰�Version 14.04
00499 0x9acb4fmac_en,mac_ja01,03,04,06,07 59 4f 7a 53 46 39 30 62 69 奏穓䘹ぢ�YOzSF90bi
004910 0x9acb4fmac_ja01 59 4f 7a 53 46 39 30 62 69 58 奏穓䘹ぢ楘YOzSF90biX
00538 0x9acb59win_en,win_ja02 00 42 00 6f 00 6c 00 64 BoldBold
005b8 0x9acb61mac_en,mac_ja00 59 2e 4f 7a 20 56 6f 78 央佺⁖潸Y.Oz Vox
00638 0x9acb69win_ja13 00 2d 00 2d 00 2d 00 2d --------
006b4 0x9acb71mac_en,mac_ja02 42 6f 6c 64 䉯汤Bold

YOzSF90bi では、日本語名はmac_jaのnameID 01のバイト列10バイトをutf_16_beでデコードして"奏穓䘹ぢ楘"となりデコードは成功なのでこれを採用。英語名はmac_enのnameID 01を読むので9バイト、asciiでデコードして"YOzSF90bi"となり、これを採用。

styleについては、日本語名はmac_jaのバイト列をutf_16_beでデコードして"䉯汤"となりこれを採用。英語名はasciiでデコードして"Bold"となり、これを採用。

いままで注目していなかったfullnameはnameID 04 です。こちらはmac_jaもmac_enも両方9バイトです。奇数バイトなのでutf_16_beでのデコードは失敗して無視。asciiでのデコードは"YOzSF90bi"となり、これを採用。

うまくついていけてます。

YOzの開発者が01だけ修正したのかもしれませんが、そのおかげでもう一歩理解できたかもしれません。

■衡山毛筆フォント行書-YOz以外のも見てみる

報告される名前は3つ

adachi@banach:~$ fc-list 衡山毛筆フォント行書
/usr/share/fonts/truetype/kouzan-mouhitsu/kouzan-mouhitsu-gyosho.ttf: 衡山毛筆フォント行書,KouzanBrushFontGyousyo,䭯畺慮䉲畳框潮瑇祯畳祯:style=Regular

-vbオプションで3つ目の言語がない

adachi@banach:~$ fc-list -vb 衡山毛筆フォント行書
Pattern has 26 elts (size 32)
	family: "衡山毛筆フォント行書"(s) "KouzanBrushFontGyousyo"(s) "䭯畺慮䉲畳框潮瑇祯畳祯"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "衡山毛筆フォント行書"(s) "KouzanBrushFontGyousyo"(s) "䭯畺慮䉲畳框潮瑇祯畳祯"(s)
	fullnamelang: "ja"(s) "en"(s)
	slant: 0(i)(s)

fileの出力

adachi@banach:~$$ file /usr/share/fonts/truetype/kouzan-mouhitsu/kouzan-mouhitsu-gyosho.ttf
/usr/share/fonts/truetype/kouzan-mouhitsu/kouzan-mouhitsu-gyosho.ttf: TrueType Font data, 18 tables, 1st "GSUB", 24 names, Macintosh, language 0x411, KouzanAoyagi

いつもの name offset が出ません。

一応、冒頭部分を確認して、

adachi@banach:~$ hd /usr/share/fonts/truetype/kouzan-mouhitsu/kouzan-mouhitsu-gyosho.ttf |head -19
00000000  00 01 00 00 00 12 01 00  00 04 00 20 47 53 55 42  |........... GSUB|
00000010  56 93 8d 69 00 02 a7 28  00 00 09 a0 4f 53 2f 32  |V..i...(....OS/2|
00000020  7b bb 8c 49 00 00 01 c8  00 00 00 56 63 6d 61 70  |{..I.......Vcmap|
00000030  4d 1d 4a 59 00 00 30 90  00 00 86 92 63 76 74 20  |M.JY..0.....cvt |
00000040  0f c0 10 00 00 00 2b 58  00 00 02 00 66 70 67 6d  |......+X....fpgm|
00000050  01 52 9c 18 00 00 2d 58  00 00 00 b3 67 61 73 70  |.R....-X....gasp|
00000060  00 17 00 06 00 00 2b 48  00 00 00 10 67 6c 79 66  |......+H....glyf|
00000070  a4 f9 aa 2f 00 03 a4 18  00 52 6b 54 68 65 61 64  |.../.....RkThead|
00000080  63 44 43 e1 00 00 01 2c  00 00 00 36 68 68 65 61  |cDC....,...6hhea|
00000090  07 96 40 5e 00 00 01 64  00 00 00 24 68 6d 74 78  |..@^...d...$hmtx|
000000a0  c3 d6 de 6a 00 01 aa 54  00 00 f3 2c 6c 6f 63 61  |...j...T...,loca|
000000b0  7c a3 a1 c8 00 00 b7 24  00 00 f3 30 6d 61 78 70  ||......$...0maxp|
000000c0  55 04 02 85 00 00 01 88  00 00 00 20 6d 6f 72 74  |U.......... mort|
000000d0  44 8c d9 9b 00 02 9d 80  00 00 09 a8 6e 61 6d 65  |D...........name|
000000e0  30 dc 8f a9 00 00 02 20  00 00 29 26 70 6f 73 74  |0...... ..)&post|
000000f0  ff a3 00 30 00 00 01 a8  00 00 00 20 70 72 65 70  |...0....... prep|
00000100  0f 25 3e a5 00 00 2e 0c  00 00 02 82 76 68 65 61  |.%>.........vhea|
00000110  07 6f 41 4b 00 02 b0 c8  00 00 00 24 76 6d 74 78  |.oAK.......$vmtx|
00000120  2c 19 6d a0 00 02 b0 ec  00 00 f3 2c 00 01 00 00  |,.m........,....|

0100なので単一ファイル。nameのオフセットは 00 00 02 20 と意外と近い。

衡山毛筆フォント行書のnameオフセットテーブル

filename='/usr/share/fonts/truetype/kouzan-mouhitsu/kouzan-mouhitsu-gyosho.ttf'
offset=0x220
formatOfNameRecord=0x0000
numOfNameRecord=0x0018
stringOffsetOfNameRecord=0x0126

たぶんフォント作成側で間違えています。

platformIDがMacintosh, encodingIDがRoman, で languageIDが 0x0411 となっています。platformIDがWindowsならば、0x0411 は japanese なのですが、Macintosh なので該当なしです。? としておきました。

nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 04 11 ? 00 00 00 0c 00 00
01 00 01 mac 00 00 rom 04 11 ? 00 01 00 16 01 00
02 00 01 mac 00 00 rom 04 11 ? 00 02 00 07 02 00
03 00 01 mac 00 00 rom 04 11 ? 00 03 00 16 03 00
04 00 01 mac 00 00 rom 04 11 ? 00 04 00 16 04 00
05 00 01 mac 00 00 rom 04 11 ? 00 05 00 0b 05 00
06 00 01 mac 00 00 rom 04 11 ? 00 06 00 16 06 00
07 00 01 mac 00 00 rom 04 11 ? 00 07 00 16 07 00
08 00 03 win 00 01 uni 04 09 en 00 00 00 18 08 00
09 00 03 win 00 01 uni 04 09 en 00 01 00 2c 0a 00
0a 00 03 win 00 01 uni 04 09 en 00 02 00 0e 0c 00
0b 00 03 win 00 01 uni 04 09 en 00 03 00 2c 0e 00
0c 00 03 win 00 01 uni 04 09 en 00 04 00 2c 10 00
0d 00 03 win 00 01 uni 04 09 en 00 05 00 16 12 00
0e 00 03 win 00 01 uni 04 09 en 00 06 00 2c 14 00
0f 00 03 win 00 01 uni 04 09 en 00 07 00 2c 16 00
10 00 03 win 00 01 uni 04 11 ja 00 00 00 08 18 00
11 00 03 win 00 01 uni 04 11 ja 00 01 00 14 1a 00
12 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 1c 00
13 00 03 win 00 01 uni 04 11 ja 00 03 00 14 1e 00
14 00 03 win 00 01 uni 04 11 ja 00 04 00 14 20 00
15 00 03 win 00 01 uni 04 11 ja 00 05 00 16 22 00
16 00 03 win 00 01 uni 04 11 ja 00 06 00 2c 24 00
17 00 03 win 00 01 uni 04 11 ja 00 07 00 14 26 00

同じバイト列でも、それぞれ別の場所において別々にしています。

macintosh,Roman,0x0411 は略称を作っていないので、macrom? としています。

文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
0000000c macrom?_00,
01000016 macrom?_01,
02000007 macrom?_02,
03000016 macrom?_03,
04000016 macrom?_04,
0500000b macrom?_05,
06000016 macrom?_06,
07000016 macrom?_07,
08000018 win_en_00,
0a00002c win_en_01,
0c00000e win_en_02,
0e00002c win_en_03,
1000002c win_en_04,
12000016 win_en_05,
1400002c win_en_06,
1600002c win_en_07,
18000008 win_ja_00,
1a000014 win_ja_01,
1c00000e win_ja_02,
1e000014 win_ja_03,
20000014 win_ja_04,
22000016 win_ja_05,
2400002c win_ja_06,
26000014 win_ja_07,

衡山毛筆フォント行書の名前文字列のデコード一覧

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
000012 0x346macrom?00 4b 6f 75 7a 61 6e 41 6f 79 61 67 69 䭯畺慮䅯祡杩KouzanAoyagi
010022 0x446macrom?01 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 47 79 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑇祯畳祯KouzanBrushFontGyousyo
02007 0x546macrom?02 52 65 67 75 6c 61 72 剥杵污�Regular
030022 0x646macrom?03 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 47 79 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑇祯畳祯KouzanBrushFontGyousyo
040022 0x746macrom?04 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 47 79 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑇祯畳祯KouzanBrushFontGyousyo
050011 0x846macrom?05 56 65 72 73 69 6f 6e 20 32 2e 31 噥牳楯渠㈮�Version 2.1
060022 0x946macrom?06 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 47 79 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑇祯畳祯KouzanBrushFontGyousyo
070022 0xa46macrom?07 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 47 79 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑇祯畳祯KouzanBrushFontGyousyo
080024 0xb46win_en00 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 41 00 6f 00 79 00 61 00 67 00 69 KouzanAoyagiKouzanAoyagi
0a0044 0xd46win_en01 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 47 00 79 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontGyousyoKouzanBrushFontGyousyo
0c0014 0xf46win_en02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
0e0044 0x1146win_en03 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 47 00 79 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontGyousyoKouzanBrushFontGyousyo
100044 0x1346win_en04 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 47 00 79 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontGyousyoKouzanBrushFontGyousyo
120022 0x1546win_en05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 32 00 2e 00 31 Version 2.1Version 2.1
140044 0x1746win_en06 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 47 00 79 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontGyousyoKouzanBrushFontGyousyo
160044 0x1946win_en07 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 47 00 79 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontGyousyoKouzanBrushFontGyousyo
18008 0x1b46win_ja00 97 52 67 f3 88 61 5c 71 青柳衡山由ga\q
1a0020 0x1d46win_ja01 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 88 4c 66 f8 衡山毛筆フォント行書�a\qkロ{F0ユ0ゥ0�0ネ�Lf�
1c0014 0x1f46win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
1e0020 0x2146win_ja03 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 88 4c 66 f8 衡山毛筆フォント行書�a\qkロ{F0ユ0ゥ0�0ネ�Lf�
200020 0x2346win_ja04 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 88 4c 66 f8 衡山毛筆フォント行書�a\qkロ{F0ユ0ゥ0�0ネ�Lf�
220022 0x2546win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 32 00 2e 00 31 Version 2.1Version 2.1
240044 0x2746win_ja06 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 47 00 79 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontGyousyoKouzanBrushFontGyousyo
260020 0x2946win_ja07 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 88 4c 66 f8 衡山毛筆フォント行書�a\qkロ{F0ユ0ゥ0�0ネ�Lf�
  1. まず、いままでの経験から、日本語名をmac_jaから取ろうとするはずです。ところがmac_jaがありません。多分次の候補はwin_jaでないでしょうか。だとすると、win_jaをutf_16_beでデコードして"衡山毛筆フォント行書"に行き着きます。styleも同様に動けばwin_jaの02を utf_16_be でデコードして "Regular"のはずですが、ありません。
  2. 英語名は、mac_enですが、mac,roma,en はやはりありませんから、win_enから取るのではないでしょうか。win_enは windows,utf_16_be,en-US の略ですから utf_16_beでデコードして "KouzanBrushFontGyousyo" となります。styleも同様に動いて"Regular"でしょう。
  3. 3つめのfamilynameですが、ja,enと扱ってきて、macintosh,Roman,0x0411 は そのどちらとも違う第三の言語に見えるのではないでしょうか。すると、とりあえず utf_16_be でデコードして"䭯畺慮䉲畳框潮瑇祯畳祯"。デコード自体は成功なのでこれを採用するも、言語は不明なのでつけない。styleも同様に動くのですが、奇数バイトのため utf_16_be でデコードできないのでなしです。
  4. fullnameについても同様に解釈できます。

かなりいい線いってます。styleについて、mac_enがない⇨win_enを読む⇨"Regular"となるはず、という所だけ合致しません

adachi@banach:~$ fc-list -vb 衡山毛筆フォント行書
Pattern has 26 elts (size 32)
	family: "衡山毛筆フォント行書"(s) "KouzanBrushFontGyousyo"(s) "䭯畺慮䉲畳框潮瑇祯畳祯"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s) ⇦ここにもう一つ"Regular"
	stylelang: "en"(s)  ⇦ここにもう一つ"ja"

同じ文字列だと省かれるのか??

■衡山毛筆フォント草書はどうか

衡山毛筆フォント草書はja,enの2つだけです。

adachi@banach:~$ fc-list 衡山毛筆フォント草書
/usr/share/fonts/truetype/kouzan-mouhitsu/KouzanBrushFontSousyo.ttf: 衡山毛筆フォント草書,KouzanBrushFontSousyo:style=Regular

-vbオプション

adachi@banach:~$ fc-list -vb 衡山毛筆フォント草書
Pattern has 26 elts (size 32)
	family: "衡山毛筆フォント草書"(s) "KouzanBrushFontSousyo"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "衡山毛筆フォント草書"(s) "KouzanBrushFontSousyo"(s)
	fullnamelang: "ja"(s) "en"(s)
	slant: 0(i)(s)

fileの出力

adachi@banach:~$ file /usr/share/fonts/truetype/kouzan-mouhitsu/KouzanBrushFontSousyo.ttf
/usr/share/fonts/truetype/kouzan-mouhitsu/KouzanBrushFontSousyo.ttf: TrueType Font data, 18 tables, 1st "GSUB", 24 names, Macintosh, language 0x411, KouzanAoyagi

行書と同じで name offset が出ません。

これも、冒頭部分を確認して、

adachi@banach:/media/adachi/E1T/python3/work$ hd /usr/share/fonts/truetype/kouzan-mouhitsu/KouzanBrushFontSousyo.ttf |head -19
00000000  00 01 00 00 00 12 01 00  00 04 00 20 47 53 55 42  |........... GSUB|
00000010  56 93 8d 69 00 02 a7 28  00 00 09 a0 4f 53 2f 32  |V..i...(....OS/2|
00000020  7b bb 8c 49 00 00 01 c8  00 00 00 56 63 6d 61 70  |{..I.......Vcmap|
00000030  4d 1d 4a 59 00 00 30 90  00 00 86 92 63 76 74 20  |M.JY..0.....cvt |
00000040  0f c0 10 00 00 00 2b 58  00 00 02 00 66 70 67 6d  |......+X....fpgm|
00000050  01 52 9c 18 00 00 2d 58  00 00 00 b3 67 61 73 70  |.R....-X....gasp|
00000060  00 17 00 06 00 00 2b 48  00 00 00 10 67 6c 79 66  |......+H....glyf|
00000070  43 cb f0 67 00 03 a4 18  00 55 e9 6c 68 65 61 64  |C..g.....U.lhead|
00000080  38 51 e7 24 00 00 01 2c  00 00 00 36 68 68 65 61  |8Q.$...,...6hhea|
00000090  07 96 40 5e 00 00 01 64  00 00 00 24 68 6d 74 78  |..@^...d...$hmtx|
000000a0  c2 f1 fd ce 00 01 aa 54  00 00 f3 2c 6c 6f 63 61  |.......T...,loca|
000000b0  bc 28 38 38 00 00 b7 24  00 00 f3 30 6d 61 78 70  |.(88...$...0maxp|
000000c0  55 04 03 29 00 00 01 88  00 00 00 20 6d 6f 72 74  |U..)....... mort|
000000d0  44 8c d9 9b 00 02 9d 80  00 00 09 a8 6e 61 6d 65  |D...........name|
000000e0  26 2c 13 fb 00 00 02 20  00 00 29 26 70 6f 73 74  |&,..... ..)&post|
000000f0  ff a3 00 30 00 00 01 a8  00 00 00 20 70 72 65 70  |...0....... prep|
00000100  0f 25 3e a5 00 00 2e 0c  00 00 02 82 76 68 65 61  |.%>.........vhea|
00000110  07 6f 41 4b 00 02 b0 c8  00 00 00 24 76 6d 74 78  |.oAK.......$vmtx|
00000120  2c 1a 8a ea 00 02 b0 ec  00 00 f3 2c 00 01 00 00  |,..........,....|

行書同様、0100なので単一ファイル。nameのオフセットは 00 00 02 20 とこれも同じ。

衡山毛筆フォント草書のnameオフセットテーブル

filename='/usr/share/fonts/truetype/kouzan-mouhitsu/KouzanBrushFontSousyo.ttf'
offset=0x220
formatOfNameRecord=0x0000
numOfNameRecord=0x0018
stringOffsetOfNameRecord=0x0126

行書とおなじです。たぶんフォント作成側で間違えています。

platformIDがMacintosh, encodingIDがRoman, で languageIDが 0x0411 となっています。platformIDがWindowsならば、0x0411 は japanese なのですが、Macintosh なので該当なしです。? としておきました。

nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 04 11 ? 00 00 00 0c 00 00
01 00 01 mac 00 00 rom 04 11 ? 00 01 00 15 01 00
02 00 01 mac 00 00 rom 04 11 ? 00 02 00 07 02 00
03 00 01 mac 00 00 rom 04 11 ? 00 03 00 15 03 00
04 00 01 mac 00 00 rom 04 11 ? 00 04 00 15 04 00
05 00 01 mac 00 00 rom 04 11 ? 00 05 00 0b 05 00
06 00 01 mac 00 00 rom 04 11 ? 00 06 00 15 06 00
07 00 01 mac 00 00 rom 04 11 ? 00 07 00 15 07 00
08 00 03 win 00 01 uni 04 09 en 00 00 00 18 08 00
09 00 03 win 00 01 uni 04 09 en 00 01 00 2a 0a 00
0a 00 03 win 00 01 uni 04 09 en 00 02 00 0e 0c 00
0b 00 03 win 00 01 uni 04 09 en 00 03 00 2a 0e 00
0c 00 03 win 00 01 uni 04 09 en 00 04 00 2a 10 00
0d 00 03 win 00 01 uni 04 09 en 00 05 00 16 12 00
0e 00 03 win 00 01 uni 04 09 en 00 06 00 2a 14 00
0f 00 03 win 00 01 uni 04 09 en 00 07 00 2a 16 00
10 00 03 win 00 01 uni 04 11 ja 00 00 00 08 18 00
11 00 03 win 00 01 uni 04 11 ja 00 01 00 14 1a 00
12 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 1c 00
13 00 03 win 00 01 uni 04 11 ja 00 03 00 14 1e 00
14 00 03 win 00 01 uni 04 11 ja 00 04 00 14 20 00
15 00 03 win 00 01 uni 04 11 ja 00 05 00 16 22 00
16 00 03 win 00 01 uni 04 11 ja 00 06 00 2a 24 00
17 00 03 win 00 01 uni 04 11 ja 00 07 00 14 26 00

ここも行書とおなじです。同じバイト列でも、それぞれ別の場所において別々にしています。

macintosh,Roman,0x0411 は略称を作っていないので、macrom? としています。

文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
0000000c macrom?_00,
01000015 macrom?_01,
02000007 macrom?_02,
03000015 macrom?_03,
04000015 macrom?_04,
0500000b macrom?_05,
06000015 macrom?_06,
07000015 macrom?_07,
08000018 win_en_00,
0a00002a win_en_01,
0c00000e win_en_02,
0e00002a win_en_03,
1000002a win_en_04,
12000016 win_en_05,
1400002a win_en_06,
1600002a win_en_07,
18000008 win_ja_00,
1a000014 win_ja_01,
1c00000e win_ja_02,
1e000014 win_ja_03,
20000014 win_ja_04,
22000016 win_ja_05,
2400002a win_ja_06,
26000014 win_ja_07,

衡山毛筆フォント草書の名前文字列のデコード一覧

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
000012 0x346macrom?00 4b 6f 75 7a 61 6e 41 6f 79 61 67 69 䭯畺慮䅯祡杩KouzanAoyagi
010021 0x446macrom?01 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 53 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑓潵獹�KouzanBrushFontSousyo
02007 0x546macrom?02 52 65 67 75 6c 61 72 剥杵污�Regular
030021 0x646macrom?03 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 53 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑓潵獹�KouzanBrushFontSousyo
040021 0x746macrom?04 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 53 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑓潵獹�KouzanBrushFontSousyo
050011 0x846macrom?05 56 65 72 73 69 6f 6e 20 31 2e 32 噥牳楯渠ㄮ�Version 1.2
060021 0x946macrom?06 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 53 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑓潵獹�KouzanBrushFontSousyo
070021 0xa46macrom?07 4b 6f 75 7a 61 6e 42 72 75 73 68 46 6f 6e 74 53 6f 75 73 79 6f 䭯畺慮䉲畳框潮瑓潵獹�KouzanBrushFontSousyo
080024 0xb46win_en00 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 41 00 6f 00 79 00 61 00 67 00 69 KouzanAoyagiKouzanAoyagi
0a0042 0xd46win_en01 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 53 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontSousyoKouzanBrushFontSousyo
0c0014 0xf46win_en02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
0e0042 0x1146win_en03 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 53 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontSousyoKouzanBrushFontSousyo
100042 0x1346win_en04 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 53 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontSousyoKouzanBrushFontSousyo
120022 0x1546win_en05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 32 Version 1.2Version 1.2
140042 0x1746win_en06 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 53 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontSousyoKouzanBrushFontSousyo
160042 0x1946win_en07 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 53 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontSousyoKouzanBrushFontSousyo
18008 0x1b46win_ja00 97 52 67 f3 88 61 5c 71 青柳衡山由ga\q
1a0020 0x1d46win_ja01 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 83 49 66 f8 衡山毛筆フォント草書�a\qkロ{F0ユ0ゥ0�0ネオf�
1c0014 0x1f46win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
1e0020 0x2146win_ja03 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 83 49 66 f8 衡山毛筆フォント草書�a\qkロ{F0ユ0ゥ0�0ネオf�
200020 0x2346win_ja04 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 83 49 66 f8 衡山毛筆フォント草書�a\qkロ{F0ユ0ゥ0�0ネオf�
220022 0x2546win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 32 Version 1.2Version 1.2
240042 0x2746win_ja06 00 4b 00 6f 00 75 00 7a 00 61 00 6e 00 42 00 72 00 75 00 73 00 68 00 46 00 6f 00 6e 00 74 00 53 00 6f 00 75 00 73 00 79 00 6f KouzanBrushFontSousyoKouzanBrushFontSousyo
260020 0x2946win_ja07 88 61 5c 71 6b db 7b 46 30 d5 30 a9 30 f3 30 c8 83 49 66 f8 衡山毛筆フォント草書�a\qkロ{F0ユ0ゥ0�0ネオf�

行書と同様に考えていきます。

  1. まず、いままでの経験から、日本語名をmac_jaから取ろうとするはずです。ところがmac_jaがありません。多分次の候補はwin_jaでないでしょうか。だとすると、win_jaをutf_16_beでデコードして"衡山毛筆フォント草書"に行き着きます。styleも同様に動けばwin_jaの02を utf_16_be でデコードして "Regular"のはずですが、ありません。
  2. 英語名は、mac_enですが、mac,roma,en はやはりありませんから、win_enから取るのではないでしょうか。win_enは windows,utf_16_be,en-US の略ですから utf_16_beでデコードして "KouzanBrushFontGyousyo" となります。styleも同様に動いて"Regular"でしょう。
  3. 行書にあった3つ目のfamilynameですが、草書でもja,enと扱ってきて、macintosh,Roman,0x0411 は そのどちらとも違う第三の言語に見えるはずです。すると、とりあえず utf_16_be でデコードして"䭯畺慮䉲畳框潮瑓潵獹�"。21バイトと奇数なのでデコードは成功しません。そこでこれを無視します。styleも同様に動いて、奇数バイトのため utf_16_be でデコードできないのでなしです。
  4. fullnameについても同様に解釈できます。

かなりいい線いってます。やはりstyleについて、mac_enがない⇨win_enを読む⇨"Regular"となるはず、という所だけ合致しません

adachi@banach:~$ fc-list -vb 衡山毛筆フォント草書
Pattern has 26 elts (size 32)
	family: "衡山毛筆フォント草書"(s) "KouzanBrushFontSousyo"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s) ⇦ここにもう一つ"Regular"
	stylelang: "en"(s)  ⇦ここにもう一つ"ja"

同じ文字列だと省かれるのか??

■'VL Pゴシック'はデフォルトの日本語フォント

Debian13にデフォルトで入っているフォントで日本語名があるのは、'VL ゴシック'と'VL Pゴシック'だけだと思います。

adachi@banach:~$ fc-list 'VL Pゴシック'
/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf: VL Pゴシック,VL PGothic:style=regular

-vbオプション

fullnameがfanilynameとstyleを' 'で結合したものになるというのは説明では読みましたが、実際にそうなっているのは初めて見ました。

adachi@banach:~$ fc-list -vb 'VL Pゴシック'
Pattern has 26 elts (size 32)
	family: "VL Pゴシック"(s) "VL PGothic"(s)
	familylang: "ja"(s) "en"(s)
	style: "regular"(s)
	stylelang: "en"(s)
	fullname: "VL PGothic Regular"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)

fileの出力

adachi@banach:~$ file /usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf
/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf: TrueType Font data, 18 tables, 1st "FFTM", name offset 0x3c6c5c

冒頭部分を確認して、

adachi@banach:/media/adachi/E1T/python3/work$ hd /usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf |head -5
00000000  00 01 00 00 00 12 01 00  00 04 00 20 46 46 54 4d  |........... FFTM|
00000010  76 ee 47 50 00 3f 50 0c  00 00 00 1c 47 44 45 46  |v.GP.?P.....GDEF|
00000020  01 35 44 d9 00 3f 19 dc  00 00 00 32 47 50 4f 53  |.5D..?.....2GPOS|
00000030  eb ce 5d fb 00 3f 1e 1c  00 00 31 ee 47 53 55 42  |..]..?....1.GSUB|
00000040  51 08 4e 78 00 3f 1a 10  00 00 04 0c 4f 53 2f 32  |Q.Nx.?......OS/2|

'VL Pゴシック'のnameオフセットテーブル

filename='/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf'
offset=0x3c6c5c
formatOfNameRecord=0x0000
numOfNameRecord=0x0011
stringOffsetOfNameRecord=0x00d2
nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 00 00 en 00 00 00 e1 01 c4
01 00 01 mac 00 00 rom 00 00 en 00 01 00 0a 02 bc
02 00 01 mac 00 00 rom 00 00 en 00 02 00 07 02 d7
03 00 01 mac 00 00 rom 00 00 en 00 03 00 2d 03 3b
04 00 01 mac 00 00 rom 00 00 en 00 04 00 12 03 8f
05 00 01 mac 00 00 rom 00 00 en 00 05 00 0e 03 c0
06 00 01 mac 00 00 rom 00 00 en 00 06 00 12 03 f5
07 00 01 mac 00 00 rom 00 00 en 00 0b 00 1a 04 3e
08 00 03 win 00 01 uni 04 09 en 00 00 01 c2 00 00
09 00 03 win 00 01 uni 04 09 en 00 01 00 14 02 a6
0a 00 03 win 00 01 uni 04 09 en 00 02 00 0e 02 c7
0b 00 03 win 00 01 uni 04 09 en 00 03 00 5a 02 df
0c 00 03 win 00 01 uni 04 09 en 00 04 00 24 03 69
0d 00 03 win 00 01 uni 04 09 en 00 05 00 1c 03 a2
0e 00 03 win 00 01 uni 04 09 en 00 06 00 24 03 cf
0f 00 03 win 00 01 uni 04 09 en 00 0b 00 34 04 08
10 00 03 win 00 01 uni 04 11 ja 00 01 00 10 04 59
文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
000001c2 win_en_00,
01c400e1 mac_en_00,
02a60014 win_en_01,
02bc000a mac_en_01,
02c7000e win_en_02,
02d70007 mac_en_02,
02df005a win_en_03,
033b002d mac_en_03,
03690024 win_en_04,
038f0012 mac_en_04,
03a2001c win_en_05,
03c0000e mac_en_05,
03cf0024 win_en_06,
03f50012 mac_en_06,
04080034 win_en_11,
043e001a mac_en_11,
04590010 win_ja_01,

日本語のフォント名はひとつしかありません。これは潔い。

'VL Pゴシック'の名前文字列のデコード一覧

著作権の部分が極端に大きくなっています。英語部分はWinとmacに同じものがエンコードを変えて格納されています。日本語部分はwin_jaの01familynameだけです。utf_16_beです。

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
0000450 0x3c6d2ewin_en00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 43 00 29 00 20 00 31 00 39 00 39 00 30 00 2d 00 32 00 30 00 30 00 33 00 20 00 57 00 61 00 64 00 61 00 20 00 4c 00 61 00 62 00 6f 00 72 00 61 00 74 00 6f 00 72 00 79 00 2c 00 20 00 55 00 6e 00 69 00 76 00 2e 00 20 00 6f 00 66 00 20 00 54 00 6f 00 6b 00 79 00 6f 00 2e 00 0a 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 43 00 29 00 20 00 32 00 30 00 30 00 33 00 2d 00 32 00 30 00 30 00 34 00 20 00 2f 00 65 00 66 00 6f 00 6e 00 74 00 2f 00 2e 00 0a 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 43 00 29 00 20 00 32 00 30 00 30 00 35 00 2d 00 32 00 30 00 31 00 35 00 20 00 4d 00 2b 00 20 00 46 00 4f 00 4e 00 54 00 53 00 20 00 50 00 52 00 4f 00 4a 00 45 00 43 00 54 00 2e 00 0a 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 43 00 29 00 20 00 32 00 30 00 30 00 36 00 2d 00 32 00 30 00 31 00 35 00 20 00 50 00 72 00 6f 00 6a 00 65 00 63 00 74 00 20 00 56 00 69 00 6e 00 65 00 2e 00 0a 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 43 00 29 00 20 00 32 00 30 00 30 00 36 00 2d 00 32 00 30 00 31 00 35 00 20 00 44 00 61 00 69 00 73 00 75 00 6b 00 65 00 20 00 53 00 55 00 5a 00 55 00 4b 00 49 00 2e 00 0a 00 41 00 6c 00 6c 00 20 00 72 00 69 00 67 00 68 00 74 00 73 00 20 00 72 00 65 00 73 00 65 00 72 00 76 00 65 00 64 00 2e Copyright(C) 1990-2003 Wada Laboratory, Univ. of Tokyo. Copyright(C) 2003-2004 /efont/. Copyright(C) 2005-2015 M+ FONTS PROJECT. Copyright(C) 2006-2015 Project Vine. Copyright(C) 2006-2015 Daisuke SUZUKI. All rights reserved.Copyright(C) 1990-2003 Wada Laboratory, Univ. of Tokyo. Copyright(C) 2003-2004 /efont/. Copyright(C) 2005-2015 M+ FONTS PROJECT. Copyright(C) 2006-2015 Project Vine. Copyright(C) 2006-2015 Daisuke SUZUKI. All rights reserved.
01c4225 0x3c6ef2mac_en00 43 6f 70 79 72 69 67 68 74 28 43 29 20 31 39 39 30 2d 32 30 30 33 20 57 61 64 61 20 4c 61 62 6f 72 61 74 6f 72 79 2c 20 55 6e 69 76 2e 20 6f 66 20 54 6f 6b 79 6f 2e 0a 43 6f 70 79 72 69 67 68 74 28 43 29 20 32 30 30 33 2d 32 30 30 34 20 2f 65 66 6f 6e 74 2f 2e 0a 43 6f 70 79 72 69 67 68 74 28 43 29 20 32 30 30 35 2d 32 30 31 35 20 4d 2b 20 46 4f 4e 54 53 20 50 52 4f 4a 45 43 54 2e 0a 43 6f 70 79 72 69 67 68 74 28 43 29 20 32 30 30 36 2d 32 30 31 35 20 50 72 6f 6a 65 63 74 20 56 69 6e 65 2e 0a 43 6f 70 79 72 69 67 68 74 28 43 29 20 32 30 30 36 2d 32 30 31 35 20 44 61 69 73 75 6b 65 20 53 55 5a 55 4b 49 2e 0a 41 6c 6c 20 72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 2e 䍯灹物杨琨䌩‱㤹〭㈰〳⁗慤愠䱡扯牡瑯特Ⱐ啮楶⸠潦⁔潫祯⸊䍯灹物杨琨䌩′〰㌭㈰〴 敦潮琯⸊䍯灹物杨琨䌩′〰㔭㈰ㄵ⁍⬠䙏乔匠偒佊䕃吮੃潰祲楧桴⡃⤠㈰〶ⴲ〱㔠偲潪散琠噩湥⸊䍯灹物杨琨䌩′〰㘭㈰ㄵ⁄慩獵步⁓啚啋䤮ੁ汬⁲楧桴猠牥獥牶敤�Copyright(C) 1990-2003 Wada Laboratory, Univ. of Tokyo. Copyright(C) 2003-2004 /efont/. Copyright(C) 2005-2015 M+ FONTS PROJECT. Copyright(C) 2006-2015 Project Vine. Copyright(C) 2006-2015 Daisuke SUZUKI. All rights reserved.
02a620 0x3c6fd4win_en01 00 56 00 4c 00 20 00 50 00 47 00 6f 00 74 00 68 00 69 00 63 VL PGothicVL PGothic
02bc10 0x3c6feamac_en01 56 4c 20 50 47 6f 74 68 69 63 噌⁐䝯瑨楣VL PGothic
02c714 0x3c6ff5win_en02 00 72 00 65 00 67 00 75 00 6c 00 61 00 72 regularregular
02d77 0x3c7005mac_en02 72 65 67 75 6c 61 72 牥杵污�regular
02df90 0x3c700dwin_en03 00 46 00 6f 00 6e 00 74 00 46 00 6f 00 72 00 67 00 65 00 20 00 31 00 2e 00 30 00 20 00 3a 00 20 00 56 00 4c 00 20 00 50 00 47 00 6f 00 74 00 68 00 69 00 63 00 20 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 00 20 00 3a 00 20 00 32 00 2d 00 39 00 2d 00 32 00 30 00 30 00 36 FontForge 1.0 : VL PGothic Regular : 2-9-2006FontForge 1.0 : VL PGothic Regular : 2-9-2006
033b45 0x3c7069mac_en03 46 6f 6e 74 46 6f 72 67 65 20 31 2e 30 20 3a 20 56 4c 20 50 47 6f 74 68 69 63 20 52 65 67 75 6c 61 72 20 3a 20 32 2d 39 2d 32 30 30 36 䙯湴䙯牧攠ㄮ〠㨠噌⁐䝯瑨楣⁒敧畬慲›′ⴹⴲ〰�FontForge 1.0 : VL PGothic Regular : 2-9-2006
036936 0x3c7097win_en04 00 56 00 4c 00 20 00 50 00 47 00 6f 00 74 00 68 00 69 00 63 00 20 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 VL PGothic RegularVL PGothic Regular
038f18 0x3c70bdmac_en04 56 4c 20 50 47 6f 74 68 69 63 20 52 65 67 75 6c 61 72 噌⁐䝯瑨楣⁒敧畬慲VL PGothic Regular
03a228 0x3c70d0win_en05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 32 00 2e 00 31 00 32 00 31 00 20 Version 2.121 Version 2.121
03c014 0x3c70eemac_en05 56 65 72 73 69 6f 6e 20 32 2e 31 32 31 20 噥牳楯渠㈮ㄲㄠVersion 2.121
03cf36 0x3c70fdwin_en06 00 56 00 4c 00 2d 00 50 00 47 00 6f 00 74 00 68 00 69 00 63 00 2d 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 VL-PGothic-RegularVL-PGothic-Regular
03f518 0x3c7123mac_en06 56 4c 2d 50 47 6f 74 68 69 63 2d 52 65 67 75 6c 61 72 噌ⵐ䝯瑨楣ⵒ敧畬慲VL-PGothic-Regular
040852 0x3c7136win_en11 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 64 00 69 00 63 00 65 00 79 00 2e 00 6f 00 72 00 67 00 2f 00 76 00 6c 00 67 00 6f 00 74 00 68 00 69 00 63 00 2f http://dicey.org/vlgothic/http://dicey.org/vlgothic/
043e26 0x3c716cmac_en11 68 74 74 70 3a 2f 2f 64 69 63 65 79 2e 6f 72 67 2f 76 6c 67 6f 74 68 69 63 2f 桴瑰㨯⽤楣敹⹯牧⽶汧潴桩振http://dicey.org/vlgothic/
045916 0x3c7187win_ja01 00 56 00 4c 00 20 00 50 30 b4 30 b7 30 c3 30 af VL PゴシックVL P0エ0キ0テ0ッ
  1. 日本語名をmac_jaから取ろうとするが、mac_jaがありません。次の候補はwin_jaでこれをutf_16_beでデコードすると" VL Pゴシック"になります。styleにはmac_jaもなくwin_jaもないのですが、mac_en に流れるのか諦めるのかは不明です。mac_enの02を ascii でデコードすれば"Regular"です。
  2. 英語名は、mac_enがあります。これをasciiでデコードすれば "VL PGothic" になります。styleも同様に動いて"Regular"でしょう。
  3. fullnameについては日本語名がないのではじめから英語で拾っているはずです。

■'IPA P明朝'で困った

もう一つフォント名が3つになるものがあります。

adachi@banach:~$ fc-list 'IPA P明朝'
/usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf: IPA P明朝,IPAPMincho,䥐䅐䵩湣桯:style=Regular

言語も3つです。

adachi@banach:~$ fc-list -vb 'IPA P明朝'
Pattern has 26 elts (size 32)
	family: "IPA P明朝"(s) "IPAPMincho"(s) "䥐䅐䵩湣桯"(s)
	familylang: "ja"(s) "en"(s) "ja"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "IPA P明朝"(s) "IPAPMincho"(s) "䥐䅐䵩湣桯"(s)
	fullnamelang: "ja"(s) "en"(s) "ja"(s)
	slant: 0(i)(s)

fileコマンドでoffsetもわかります。

adachi@banach:~$ file /usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf
/usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf: TrueType Font data, 18 tables, 1st "GDEF", name offset 0x781ea8

一応冒頭のハージョンを確認

adachi@banach:~$ hd /usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf|head -5
00000000  00 01 00 00 00 12 01 00  00 04 00 20 47 44 45 46  |........... GDEF|
00000010  00 26 31 bd 00 00 01 2c  00 00 00 1e 47 53 55 42  |.&1....,....GSUB|
00000020  9d cc fa 49 00 00 01 4c  00 00 0d da 4f 53 2f 32  |...I...L....OS/2|
00000030  55 70 6f 79 00 00 0f 28  00 00 00 60 63 6d 61 70  |Upoy...(...`cmap|
00000040  81 75 07 ec 00 00 0f 88  00 03 97 b6 63 76 74 20  |.u..........cvt |

'IPA P明朝'のnameオフセットテーブル

filename='/usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf'
offset=0x781ea8
formatOfNameRecord=0x0000
numOfNameRecord=0x0024
stringOffsetOfNameRecord=0x01b6

platformID encodingID languageID は例の4つの組み合わせしかありません。

nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 00 00 en 00 00 00 a6 00 00
01 00 01 mac 00 00 rom 00 00 en 00 01 00 0a 00 a6
02 00 01 mac 00 00 rom 00 00 en 00 02 00 07 00 b0
03 00 01 mac 00 00 rom 00 00 en 00 03 00 19 00 b7
04 00 01 mac 00 00 rom 00 00 en 00 04 00 0a 00 d0
05 00 01 mac 00 00 rom 00 00 en 00 05 00 0e 00 da
06 00 01 mac 00 00 rom 00 00 en 00 06 00 0a 00 e8
07 00 01 mac 00 00 rom 00 00 en 00 0d 00 31 00 f2
08 00 01 mac 00 00 rom 00 00 en 00 0e 00 31 01 23
09 00 01 mac 00 01 jap 00 0b ja 00 00 00 a6 01 54
0a 00 01 mac 00 01 jap 00 0b ja 00 01 00 0a 01 fa
0b 00 01 mac 00 01 jap 00 0b ja 00 02 00 07 02 04
0c 00 01 mac 00 01 jap 00 0b ja 00 03 00 19 02 0b
0d 00 01 mac 00 01 jap 00 0b ja 00 04 00 0a 02 24
0e 00 01 mac 00 01 jap 00 0b ja 00 05 00 0e 02 2e
0f 00 01 mac 00 01 jap 00 0b ja 00 06 00 0a 02 3c
10 00 01 mac 00 01 jap 00 0b ja 00 0d 00 31 02 46
11 00 01 mac 00 01 jap 00 0b ja 00 0e 00 31 02 77
12 00 03 win 00 01 uni 04 09 en 00 00 01 4c 02 a8
13 00 03 win 00 01 uni 04 09 en 00 01 00 14 03 f4
14 00 03 win 00 01 uni 04 09 en 00 02 00 0e 04 08
15 00 03 win 00 01 uni 04 09 en 00 03 00 32 04 16
16 00 03 win 00 01 uni 04 09 en 00 04 00 14 04 48
17 00 03 win 00 01 uni 04 09 en 00 05 00 1c 04 5c
18 00 03 win 00 01 uni 04 09 en 00 06 00 14 04 78
19 00 03 win 00 01 uni 04 09 en 00 0d 00 62 04 8c
1a 00 03 win 00 01 uni 04 09 en 00 0e 00 62 04 ee
1b 00 03 win 00 01 uni 04 11 ja 00 00 01 4c 05 50
1c 00 03 win 00 01 uni 04 11 ja 00 01 00 0e 06 9c
1d 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 06 aa
1e 00 03 win 00 01 uni 04 11 ja 00 03 00 32 06 b8
1f 00 03 win 00 01 uni 04 11 ja 00 04 00 0e 06 ea
20 00 03 win 00 01 uni 04 11 ja 00 05 00 1c 06 f8
21 00 03 win 00 01 uni 04 11 ja 00 06 00 14 07 14
22 00 03 win 00 01 uni 04 11 ja 00 0d 00 62 07 28
23 00 03 win 00 01 uni 04 11 ja 00 0e 00 62 07 8a

同じバイト列でも、それぞれ別の場所において別々にしています。

文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
000000a6 mac_en_00,
00a6000a mac_en_01,
00b00007 mac_en_02,
00b70019 mac_en_03,
00d0000a mac_en_04,
00da000e mac_en_05,
00e8000a mac_en_06,
00f20031 mac_en_13,
01230031 mac_en_14,
015400a6 mac_ja_00,
01fa000a mac_ja_01,
02040007 mac_ja_02,
020b0019 mac_ja_03,
0224000a mac_ja_04,
022e000e mac_ja_05,
023c000a mac_ja_06,
02460031 mac_ja_13,
02770031 mac_ja_14,
02a8014c win_en_00,
03f40014 win_en_01,
0408000e win_en_02,
04160032 win_en_03,
04480014 win_en_04,
045c001c win_en_05,
04780014 win_en_06,
048c0062 win_en_13,
04ee0062 win_en_14,
0550014c win_ja_00,
069c000e win_ja_01,
06aa000e win_ja_02,
06b80032 win_ja_03,
06ea000e win_ja_04,
06f8001c win_ja_05,
07140014 win_ja_06,
07280062 win_ja_13,
078a0062 win_ja_14,

'IPA P明朝'の名前文字列のデコード一覧

重複していてもそれぞれ用意していることと、著作権の記述が長いことで全体が膨らんでいます。nameID=01~04だけを抜書したものを下に用意しました。

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
0000166 0x78205emac_en00 43 6f 70 79 72 69 67 68 74 28 63 29 20 49 6e 66 6f 72 6d 61 74 69 6f 6e 2d 74 65 63 68 6e 6f 6c 6f 67 79 20 50 72 6f 6d 6f 74 69 6f 6e 20 41 67 65 6e 63 79 2c 20 4a 61 70 61 6e 20 28 49 50 41 29 2c 20 32 30 30 33 2d 32 30 31 31 2e 20 59 6f 75 20 6d 75 73 74 20 61 63 63 65 70 74 20 22 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 22 20 74 6f 20 75 73 65 20 74 68 69 73 20 70 72 6f 64 75 63 74 2e 䍯灹物杨琨挩⁉湦潲浡瑩潮⵴散桮潬潧礠偲潭潴楯渠䅧敮捹Ⱐ䩡灡渠⡉偁⤬′〰㌭㈰ㄱ⸠奯甠浵獴⁡捣数琠≨瑴瀺⼯楰慦潮琮楰愮杯⹪瀯楰慟景湴彬楣敮獥彶ㄮ桴浬∠瑯⁵獥⁴桩猠灲潤畣琮Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
00a610 0x782104mac_en01 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
00b07 0x78210emac_en02 52 65 67 75 6c 61 72 剥杵污�Regular
00b725 0x782115mac_en03 49 50 41 50 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅐䵩湣桯⁖敲獩潮‰〳⸰�IPAPMincho Version 003.03
00d010 0x78212emac_en04 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
00da14 0x782138mac_en05 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 噥牳楯渠〰㌮〳Version 003.03
00e810 0x782146mac_en06 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
00f249 0x782150mac_en13 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
012349 0x782181mac_en14 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
0154166 0x7821b2mac_ja00 43 6f 70 79 72 69 67 68 74 28 63 29 20 49 6e 66 6f 72 6d 61 74 69 6f 6e 2d 74 65 63 68 6e 6f 6c 6f 67 79 20 50 72 6f 6d 6f 74 69 6f 6e 20 41 67 65 6e 63 79 2c 20 4a 61 70 61 6e 20 28 49 50 41 29 2c 20 32 30 30 33 2d 32 30 31 31 2e 20 59 6f 75 20 6d 75 73 74 20 61 63 63 65 70 74 20 22 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 22 20 74 6f 20 75 73 65 20 74 68 69 73 20 70 72 6f 64 75 63 74 2e 䍯灹物杨琨挩⁉湦潲浡瑩潮⵴散桮潬潧礠偲潭潴楯渠䅧敮捹Ⱐ䩡灡渠⡉偁⤬′〰㌭㈰ㄱ⸠奯甠浵獴⁡捣数琠≨瑴瀺⼯楰慦潮琮楰愮杯⹪瀯楰慟景湴彬楣敮獥彶ㄮ桴浬∠瑯⁵獥⁴桩猠灲潤畣琮Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
01fa10 0x782258mac_ja01 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
02047 0x782262mac_ja02 52 65 67 75 6c 61 72 剥杵污�Regular
020b25 0x782269mac_ja03 49 50 41 50 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅐䵩湣桯⁖敲獩潮‰〳⸰�IPAPMincho Version 003.03
022410 0x782282mac_ja04 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
022e14 0x78228cmac_ja05 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 噥牳楯渠〰㌮〳Version 003.03
023c10 0x78229amac_ja06 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
024649 0x7822a4mac_ja13 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
027749 0x7822d5mac_ja14 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
02a8332 0x782306win_en00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 63 00 29 00 20 00 49 00 6e 00 66 00 6f 00 72 00 6d 00 61 00 74 00 69 00 6f 00 6e 00 2d 00 74 00 65 00 63 00 68 00 6e 00 6f 00 6c 00 6f 00 67 00 79 00 20 00 50 00 72 00 6f 00 6d 00 6f 00 74 00 69 00 6f 00 6e 00 20 00 41 00 67 00 65 00 6e 00 63 00 79 00 2c 00 20 00 4a 00 61 00 70 00 61 00 6e 00 20 00 28 00 49 00 50 00 41 00 29 00 2c 00 20 00 32 00 30 00 30 00 33 00 2d 00 32 00 30 00 31 00 31 00 2e 00 20 00 59 00 6f 00 75 00 20 00 6d 00 75 00 73 00 74 00 20 00 61 00 63 00 63 00 65 00 70 00 74 00 20 00 22 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c 00 22 00 20 00 74 00 6f 00 20 00 75 00 73 00 65 00 20 00 74 00 68 00 69 00 73 00 20 00 70 00 72 00 6f 00 64 00 75 00 63 00 74 00 2e Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
03f420 0x782452win_en01 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAPMinchoIPAPMincho
040814 0x782466win_en02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
041650 0x782474win_en03 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAPMincho Version 003.03IPAPMincho Version 003.03
044820 0x7824a6win_en04 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAPMinchoIPAPMincho
045c28 0x7824bawin_en05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 Version 003.03Version 003.03
047820 0x7824d6win_en06 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAPMinchoIPAPMincho
048c98 0x7824eawin_en13 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
04ee98 0x78254cwin_en14 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
0550332 0x7825aewin_ja00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 63 00 29 00 20 00 49 00 6e 00 66 00 6f 00 72 00 6d 00 61 00 74 00 69 00 6f 00 6e 00 2d 00 74 00 65 00 63 00 68 00 6e 00 6f 00 6c 00 6f 00 67 00 79 00 20 00 50 00 72 00 6f 00 6d 00 6f 00 74 00 69 00 6f 00 6e 00 20 00 41 00 67 00 65 00 6e 00 63 00 79 00 2c 00 20 00 4a 00 61 00 70 00 61 00 6e 00 20 00 28 00 49 00 50 00 41 00 29 00 2c 00 20 00 32 00 30 00 30 00 33 00 2d 00 32 00 30 00 31 00 31 00 2e 00 20 00 59 00 6f 00 75 00 20 00 6d 00 75 00 73 00 74 00 20 00 61 00 63 00 63 00 65 00 70 00 74 00 20 00 22 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c 00 22 00 20 00 74 00 6f 00 20 00 75 00 73 00 65 00 20 00 74 00 68 00 69 00 73 00 20 00 70 00 72 00 6f 00 64 00 75 00 63 00 74 00 2e Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
069c14 0x7826fawin_ja01 00 49 00 50 00 41 00 20 00 50 66 0e 67 1d IPA P明朝IPA Pfg
06aa14 0x782708win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
06b850 0x782716win_ja03 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAPMincho Version 003.03IPAPMincho Version 003.03
06ea14 0x782748win_ja04 00 49 00 50 00 41 00 20 00 50 66 0e 67 1d IPA P明朝IPA Pfg
06f828 0x782756win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 Version 003.03Version 003.03
071420 0x782772win_ja06 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAPMinchoIPAPMincho
072898 0x782786win_ja13 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
078a98 0x7827e8win_ja14 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
文字列へのオフセット計算、バイト列とデコード例 01~04抜書
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
00a610 0x782104mac_en01 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
00b07 0x78210emac_en02 52 65 67 75 6c 61 72 剥杵污�Regular
00b725 0x782115mac_en03 49 50 41 50 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅐䵩湣桯⁖敲獩潮‰〳⸰�IPAPMincho Version 003.03
00d010 0x78212emac_en04 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
01fa10 0x782258mac_ja01 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
02047 0x782262mac_ja02 52 65 67 75 6c 61 72 剥杵污�Regular
020b25 0x782269mac_ja03 49 50 41 50 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅐䵩湣桯⁖敲獩潮‰〳⸰�IPAPMincho Version 003.03
022410 0x782282mac_ja04 49 50 41 50 4d 69 6e 63 68 6f 䥐䅐䵩湣桯IPAPMincho
03f420 0x782452win_en01 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAPMinchoIPAPMincho
040814 0x782466win_en02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
041650 0x782474win_en03 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAPMincho Version 003.03IPAPMincho Version 003.03
044820 0x7824a6win_en04 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAPMinchoIPAPMincho
069c14 0x7826fawin_ja01 00 49 00 50 00 41 00 20 00 50 66 0e 67 1d IPA P明朝IPA Pfg
06aa14 0x782708win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
06b850 0x782716win_ja03 00 49 00 50 00 41 00 50 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAPMincho Version 003.03IPAPMincho Version 003.03
06ea14 0x782748win_ja04 00 49 00 50 00 41 00 20 00 50 66 0e 67 1d IPA P明朝IPA Pfg
  1. 今までmac_jaの値をutf-16でデコードするところからスタートしたのは、YOzにおいて日本名が文字化けしていたからでした。今回もそうすると、䥐䅐䵩湣桯 となるはずです。それは3つ目の名前になっています。1つめの名前は"IPA P明朝"です。これはwin_jaをデコードしなければ出てきません。mac_jaの値をshift_JISでデコードするとIPAPMinchoです。これはjaの名前としてはでていません。
  2. mac_enの値をshift_JISでデコードするとIPAPMinchoです。win_enをutf-16でデコードしても同じです。これはまあ、いいでしょう。
  3. ちょっと予想したルールを変更する必要が出てきました。䥐䅐䵩湣桯が出てくるように考えなければなりません。
adachi@banach:~$ fc-list -vb 'IPA P明朝'
Pattern has 26 elts (size 32)
	family: "IPA P明朝"(s) "IPAPMincho"(s) "䥐䅐䵩湣桯"(s)
	familylang: "ja"(s) "en"(s) "ja"(s)
	style: "Regular"(s)
	stylelang: "en"(s)

考え直します。

  1. 英語名から考えていきます。mac_en では ascii で IPAPMincho, win_en では utf_16_be で IPAMincho。同一なので一つにまとめます。
  2. 日本語名は mac_ja が間違いですが、utf_16_be で 䥐䅐䵩湣桯、win_ja で 'IPA P明朝' 異なりますが両方有効です。
  3. 理由は付きませんが、win_ja を先に、'IPA P明朝'(ja), IPAPMincho(en), 䥐䅐䵩湣桯(ja) となります。
  4. styleもenは同様ですが、mac_ja は失敗し、win_ja では Regular ですが、enと同じなので省略し、Regular(en)のみとします。

どうでしょうか。win_ja を優先するのが説明できません。

■IPA明朝は名前が2つ

これは問題ないと思いますが。

adachi@banach:~$ fc-list -vb IPA明朝
Pattern has 27 elts (size 32)
	family: "IPA明朝"(s) "IPAMincho"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "IPA明朝"(s) "IPAMincho"(s)
	fullnamelang: "ja"(s) "en"(s)
	slant: 0(i)(s)
	weight: 80(f)(s)
	width: 100(f)(s)
	spacing: 90(i)(s)
	foundry: "IPA "(s)
	file: "/usr/share/fonts/opentype/ipafont-mincho/ipam.ttf"(s)
adachi@banach:~$ file /usr/share/fonts/opentype/ipafont-mincho/ipam.ttf
/usr/share/fonts/opentype/ipafont-mincho/ipam.ttf: TrueType Font data, 18 tables, 1st "GDEF", name offset 0x78215c
adachi@banach:~$ hd /usr/share/fonts/opentype/ipafont-mincho/ipam.ttf|head -5
00000000  00 01 00 00 00 12 01 00  00 04 00 20 47 44 45 46  |........... GDEF|
00000010  00 26 31 bd 00 00 01 2c  00 00 00 1e 47 53 55 42  |.&1....,....GSUB|
00000020  31 8e 85 6a 00 00 01 4c  00 00 0d be 4f 53 2f 32  |1..j...L....OS/2|
00000030  55 b8 6f f6 00 00 0f 0c  00 00 00 60 63 6d 61 70  |U.o........`cmap|
00000040  38 f7 3e 61 00 00 0f 6c  00 03 9a 86 63 76 74 20  |8.>a...l....cvt |

IPA明朝のnameオフセットテーブル

filename='/usr/share/fonts/opentype/ipafont-mincho/ipam.ttf'
offset=0x78215c
formatOfNameRecord=0x0000
numOfNameRecord=0x0024
stringOffsetOfNameRecord=0x01b6
nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 00 00 en 00 00 00 a6 00 00
01 00 01 mac 00 00 rom 00 00 en 00 01 00 09 00 a6
02 00 01 mac 00 00 rom 00 00 en 00 02 00 07 00 af
03 00 01 mac 00 00 rom 00 00 en 00 03 00 18 00 b6
04 00 01 mac 00 00 rom 00 00 en 00 04 00 09 00 ce
05 00 01 mac 00 00 rom 00 00 en 00 05 00 0e 00 d7
06 00 01 mac 00 00 rom 00 00 en 00 06 00 09 00 e5
07 00 01 mac 00 00 rom 00 00 en 00 0d 00 31 00 ee
08 00 01 mac 00 00 rom 00 00 en 00 0e 00 31 01 1f
09 00 01 mac 00 01 jap 00 0b ja 00 00 00 a6 01 50
0a 00 01 mac 00 01 jap 00 0b ja 00 01 00 09 01 f6
0b 00 01 mac 00 01 jap 00 0b ja 00 02 00 07 01 ff
0c 00 01 mac 00 01 jap 00 0b ja 00 03 00 18 02 06
0d 00 01 mac 00 01 jap 00 0b ja 00 04 00 09 02 1e
0e 00 01 mac 00 01 jap 00 0b ja 00 05 00 0e 02 27
0f 00 01 mac 00 01 jap 00 0b ja 00 06 00 09 02 35
10 00 01 mac 00 01 jap 00 0b ja 00 0d 00 31 02 3e
11 00 01 mac 00 01 jap 00 0b ja 00 0e 00 31 02 6f
12 00 03 win 00 01 uni 04 09 en 00 00 01 4c 02 a0
13 00 03 win 00 01 uni 04 09 en 00 01 00 12 03 ec
14 00 03 win 00 01 uni 04 09 en 00 02 00 0e 03 fe
15 00 03 win 00 01 uni 04 09 en 00 03 00 30 04 0c
16 00 03 win 00 01 uni 04 09 en 00 04 00 12 04 3c
17 00 03 win 00 01 uni 04 09 en 00 05 00 1c 04 4e
18 00 03 win 00 01 uni 04 09 en 00 06 00 12 04 6a
19 00 03 win 00 01 uni 04 09 en 00 0d 00 62 04 7c
1a 00 03 win 00 01 uni 04 09 en 00 0e 00 62 04 de
1b 00 03 win 00 01 uni 04 11 ja 00 00 01 4c 05 40
1c 00 03 win 00 01 uni 04 11 ja 00 01 00 0a 06 8c
1d 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 06 96
1e 00 03 win 00 01 uni 04 11 ja 00 03 00 30 06 a4
1f 00 03 win 00 01 uni 04 11 ja 00 04 00 0a 06 d4
20 00 03 win 00 01 uni 04 11 ja 00 05 00 1c 06 de
21 00 03 win 00 01 uni 04 11 ja 00 06 00 12 06 fa
22 00 03 win 00 01 uni 04 11 ja 00 0d 00 62 07 0c
23 00 03 win 00 01 uni 04 11 ja 00 0e 00 62 07 6e
文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
000000a6 mac_en_00,
00a60009 mac_en_01,
00af0007 mac_en_02,
00b60018 mac_en_03,
00ce0009 mac_en_04,
00d7000e mac_en_05,
00e50009 mac_en_06,
00ee0031 mac_en_13,
011f0031 mac_en_14,
015000a6 mac_ja_00,
01f60009 mac_ja_01,
01ff0007 mac_ja_02,
02060018 mac_ja_03,
021e0009 mac_ja_04,
0227000e mac_ja_05,
02350009 mac_ja_06,
023e0031 mac_ja_13,
026f0031 mac_ja_14,
02a0014c win_en_00,
03ec0012 win_en_01,
03fe000e win_en_02,
040c0030 win_en_03,
043c0012 win_en_04,
044e001c win_en_05,
046a0012 win_en_06,
047c0062 win_en_13,
04de0062 win_en_14,
0540014c win_ja_00,
068c000a win_ja_01,
0696000e win_ja_02,
06a40030 win_ja_03,
06d4000a win_ja_04,
06de001c win_ja_05,
06fa0012 win_ja_06,
070c0062 win_ja_13,
076e0062 win_ja_14,

IPA明朝の名前文字列のデコード一覧

これも全体が膨らんでいるので、nameID=01~04だけを抜書したものを下に用意しました。

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
0000166 0x782312mac_en00 43 6f 70 79 72 69 67 68 74 28 63 29 20 49 6e 66 6f 72 6d 61 74 69 6f 6e 2d 74 65 63 68 6e 6f 6c 6f 67 79 20 50 72 6f 6d 6f 74 69 6f 6e 20 41 67 65 6e 63 79 2c 20 4a 61 70 61 6e 20 28 49 50 41 29 2c 20 32 30 30 33 2d 32 30 31 31 2e 20 59 6f 75 20 6d 75 73 74 20 61 63 63 65 70 74 20 22 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 22 20 74 6f 20 75 73 65 20 74 68 69 73 20 70 72 6f 64 75 63 74 2e 䍯灹物杨琨挩⁉湦潲浡瑩潮⵴散桮潬潧礠偲潭潴楯渠䅧敮捹Ⱐ䩡灡渠⡉偁⤬′〰㌭㈰ㄱ⸠奯甠浵獴⁡捣数琠≨瑴瀺⼯楰慦潮琮楰愮杯⹪瀯楰慟景湴彬楣敮獥彶ㄮ桴浬∠瑯⁵獥⁴桩猠灲潤畣琮Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
00a69 0x7823b8mac_en01 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
00af7 0x7823c1mac_en02 52 65 67 75 6c 61 72 剥杵污�Regular
00b624 0x7823c8mac_en03 49 50 41 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅍楮捨漠噥牳楯渠〰㌮〳IPAMincho Version 003.03
00ce9 0x7823e0mac_en04 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
00d714 0x7823e9mac_en05 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 噥牳楯渠〰㌮〳Version 003.03
00e59 0x7823f7mac_en06 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
00ee49 0x782400mac_en13 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
011f49 0x782431mac_en14 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
0150166 0x782462mac_ja00 43 6f 70 79 72 69 67 68 74 28 63 29 20 49 6e 66 6f 72 6d 61 74 69 6f 6e 2d 74 65 63 68 6e 6f 6c 6f 67 79 20 50 72 6f 6d 6f 74 69 6f 6e 20 41 67 65 6e 63 79 2c 20 4a 61 70 61 6e 20 28 49 50 41 29 2c 20 32 30 30 33 2d 32 30 31 31 2e 20 59 6f 75 20 6d 75 73 74 20 61 63 63 65 70 74 20 22 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 22 20 74 6f 20 75 73 65 20 74 68 69 73 20 70 72 6f 64 75 63 74 2e 䍯灹物杨琨挩⁉湦潲浡瑩潮⵴散桮潬潧礠偲潭潴楯渠䅧敮捹Ⱐ䩡灡渠⡉偁⤬′〰㌭㈰ㄱ⸠奯甠浵獴⁡捣数琠≨瑴瀺⼯楰慦潮琮楰愮杯⹪瀯楰慟景湴彬楣敮獥彶ㄮ桴浬∠瑯⁵獥⁴桩猠灲潤畣琮Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
01f69 0x782508mac_ja01 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
01ff7 0x782511mac_ja02 52 65 67 75 6c 61 72 剥杵污�Regular
020624 0x782518mac_ja03 49 50 41 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅍楮捨漠噥牳楯渠〰㌮〳IPAMincho Version 003.03
021e9 0x782530mac_ja04 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
022714 0x782539mac_ja05 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 噥牳楯渠〰㌮〳Version 003.03
02359 0x782547mac_ja06 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
023e49 0x782550mac_ja13 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
026f49 0x782581mac_ja14 68 74 74 70 3a 2f 2f 69 70 61 66 6f 6e 74 2e 69 70 61 2e 67 6f 2e 6a 70 2f 69 70 61 5f 66 6f 6e 74 5f 6c 69 63 65 6e 73 65 5f 76 31 2e 68 74 6d 6c 桴瑰㨯⽩灡景湴⹩灡⹧漮橰⽩灡彦潮瑟汩捥湳敟瘱⹨瑭�http://ipafont.ipa.go.jp/ipa_font_license_v1.html
02a0332 0x7825b2win_en00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 63 00 29 00 20 00 49 00 6e 00 66 00 6f 00 72 00 6d 00 61 00 74 00 69 00 6f 00 6e 00 2d 00 74 00 65 00 63 00 68 00 6e 00 6f 00 6c 00 6f 00 67 00 79 00 20 00 50 00 72 00 6f 00 6d 00 6f 00 74 00 69 00 6f 00 6e 00 20 00 41 00 67 00 65 00 6e 00 63 00 79 00 2c 00 20 00 4a 00 61 00 70 00 61 00 6e 00 20 00 28 00 49 00 50 00 41 00 29 00 2c 00 20 00 32 00 30 00 30 00 33 00 2d 00 32 00 30 00 31 00 31 00 2e 00 20 00 59 00 6f 00 75 00 20 00 6d 00 75 00 73 00 74 00 20 00 61 00 63 00 63 00 65 00 70 00 74 00 20 00 22 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c 00 22 00 20 00 74 00 6f 00 20 00 75 00 73 00 65 00 20 00 74 00 68 00 69 00 73 00 20 00 70 00 72 00 6f 00 64 00 75 00 63 00 74 00 2e Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
03ec18 0x7826fewin_en01 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAMinchoIPAMincho
03fe14 0x782710win_en02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
040c48 0x78271ewin_en03 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAMincho Version 003.03IPAMincho Version 003.03
043c18 0x78274ewin_en04 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAMinchoIPAMincho
044e28 0x782760win_en05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 Version 003.03Version 003.03
046a18 0x78277cwin_en06 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAMinchoIPAMincho
047c98 0x78278ewin_en13 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
04de98 0x7827f0win_en14 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
0540332 0x782852win_ja00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 63 00 29 00 20 00 49 00 6e 00 66 00 6f 00 72 00 6d 00 61 00 74 00 69 00 6f 00 6e 00 2d 00 74 00 65 00 63 00 68 00 6e 00 6f 00 6c 00 6f 00 67 00 79 00 20 00 50 00 72 00 6f 00 6d 00 6f 00 74 00 69 00 6f 00 6e 00 20 00 41 00 67 00 65 00 6e 00 63 00 79 00 2c 00 20 00 4a 00 61 00 70 00 61 00 6e 00 20 00 28 00 49 00 50 00 41 00 29 00 2c 00 20 00 32 00 30 00 30 00 33 00 2d 00 32 00 30 00 31 00 31 00 2e 00 20 00 59 00 6f 00 75 00 20 00 6d 00 75 00 73 00 74 00 20 00 61 00 63 00 63 00 65 00 70 00 74 00 20 00 22 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c 00 22 00 20 00 74 00 6f 00 20 00 75 00 73 00 65 00 20 00 74 00 68 00 69 00 73 00 20 00 70 00 72 00 6f 00 64 00 75 00 63 00 74 00 2e Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.Copyright(c) Information-technology Promotion Agency, Japan (IPA), 2003-2011. You must accept "http://ipafont.ipa.go.jp/ipa_font_license_v1.html" to use this product.
068c10 0x78299ewin_ja01 00 49 00 50 00 41 66 0e 67 1d IPA明朝IPAfg
069614 0x7829a8win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
06a448 0x7829b6win_ja03 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAMincho Version 003.03IPAMincho Version 003.03
06d410 0x7829e6win_ja04 00 49 00 50 00 41 66 0e 67 1d IPA明朝IPAfg
06de28 0x7829f0win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 Version 003.03Version 003.03
06fa18 0x782a0cwin_ja06 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAMinchoIPAMincho
070c98 0x782a1ewin_ja13 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
076e98 0x782a80win_ja14 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 70 00 61 00 66 00 6f 00 6e 00 74 00 2e 00 69 00 70 00 61 00 2e 00 67 00 6f 00 2e 00 6a 00 70 00 2f 00 69 00 70 00 61 00 5f 00 66 00 6f 00 6e 00 74 00 5f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 5f 00 76 00 31 00 2e 00 68 00 74 00 6d 00 6c http://ipafont.ipa.go.jp/ipa_font_license_v1.htmlhttp://ipafont.ipa.go.jp/ipa_font_license_v1.html
文字列へのオフセット計算、バイト列とデコード例 01~04抜書
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
00a69 0x7823b8mac_en01 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
00af7 0x7823c1mac_en02 52 65 67 75 6c 61 72 剥杵污�Regular
00b624 0x7823c8mac_en03 49 50 41 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅍楮捨漠噥牳楯渠〰㌮〳IPAMincho Version 003.03
00ce9 0x7823e0mac_en04 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
01f69 0x782508mac_ja01 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
01ff7 0x782511mac_ja02 52 65 67 75 6c 61 72 剥杵污�Regular
020624 0x782518mac_ja03 49 50 41 4d 69 6e 63 68 6f 20 56 65 72 73 69 6f 6e 20 30 30 33 2e 30 33 䥐䅍楮捨漠噥牳楯渠〰㌮〳IPAMincho Version 003.03
021e9 0x782530mac_ja04 49 50 41 4d 69 6e 63 68 6f 䥐䅍楮捨�IPAMincho
03ec18 0x7826fewin_en01 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAMinchoIPAMincho
03fe14 0x782710win_en02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
040c48 0x78271ewin_en03 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAMincho Version 003.03IPAMincho Version 003.03
043c18 0x78274ewin_en04 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f IPAMinchoIPAMincho
068c10 0x78299ewin_ja01 00 49 00 50 00 41 66 0e 67 1d IPA明朝IPAfg
069614 0x7829a8win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
06a448 0x7829b6win_ja03 00 49 00 50 00 41 00 4d 00 69 00 6e 00 63 00 68 00 6f 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 30 00 30 00 33 00 2e 00 30 00 33 IPAMincho Version 003.03IPAMincho Version 003.03
06d410 0x7829e6win_ja04 00 49 00 50 00 41 66 0e 67 1d IPA明朝IPAfg
  1. 英語名から考えていきます。mac_enでは IPAMincho , win_enでも IPAMincho なので一つにまとめます。
  2. 日本語名は mac_ja が間違いですが、utf_16_be で デコード失敗、win_ja で IPA明朝 でこれを採用。
  3. styleも同様ですが、win_ja でも Regular なので 省略し、Regular(en)のみとします。
adachi@banach:~$ fc-list -vb IPA明朝
Pattern has 27 elts (size 32)
	family: "IPA明朝"(s) "IPAMincho"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)

■'BIZ UDゴシック'

Regular と Bold がそれぞれ別ファイルで、名前が共通です。

adachi@banach:~$ fc-list  'BIZ UDゴシック'
/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Bold.ttf: BIZ UDゴシック,BIZ UDGothic:style=Bold
/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Regular.ttf: BIZ UDゴシック,BIZ UDGothic:style=Regular

fullname では区別されていますが、これを fc-list に使っても認識されません。postscriptname の "BIZUDGothic-Bold" を使っても2つ出てきます。

adachi@banach:~$ fc-list -vb 'BIZ UDゴシック'
Pattern has 27 elts (size 32)
	family: "BIZ UDゴシック"(s) "BIZ UDGothic"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "BIZ UDゴシック"(s) "BIZ UDGothic"(s)
	fullnamelang: "ja"(s) "en"(s)
	slant: 0(i)(s)
	weight: 80(f)(s)
	width: 100(f)(s)
	spacing: 90(i)(s)
	foundry: "MRSW"(s)
	file: "/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Regular.ttf"(s)
	index: 0(i)(s)
	outline: True(s)
	scalable: True(s)
	fontversion: 68878(i)(s)
	capability: "otlayout:DFLT otlayout:cyrl otlayout:grek otlayout:hani otlayout:kana otlayout:latn"(s)
	fontformat: "TrueType"(s)
	decorative: False(s)
	postscriptname: "BIZUDGothic-Regular"(s)
	color: False(s)
	symbol: False(s)
	variable: False(s)
	fonthashint: True(s)
	order: 0(i)(s)
	namedinstance: False(s)
	fontwrapper: "SFNT"(s)

Pattern has 27 elts (size 32)
	family: "BIZ UDゴシック"(s) "BIZ UDGothic"(s)
	familylang: "ja"(s) "en"(s)
	style: "Bold"(s)
	stylelang: "en"(s)
	fullname: "BIZ UDゴシック Bold"(s) "BIZ UDGothic Bold"(s)
	fullnamelang: "ja"(s) "en"(s)
	slant: 0(i)(s)
	weight: 200(f)(s)
	width: 100(f)(s)
	spacing: 90(i)(s)
	foundry: "MRSW"(s)
	file: "/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Bold.ttf"(s)
	index: 0(i)(s)
	outline: True(s)
	scalable: True(s)
	fontversion: 68878(i)(s)
	capability: "otlayout:DFLT otlayout:cyrl otlayout:grek otlayout:hani otlayout:kana otlayout:latn"(s)
	fontformat: "TrueType"(s)
	decorative: False(s)
	postscriptname: "BIZUDGothic-Bold"(s)
	color: False(s)
	symbol: False(s)
	variable: False(s)
	fonthashint: True(s)
	order: 0(i)(s)
	namedinstance: False(s)
	fontwrapper: "SFNT"(s)

■'BIZ UDゴシック Regular' から先に

adachi@banach:~$ file /usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Regular.ttf
/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Regular.ttf: TrueType Font data, digitally signed, 19 tables, 1st "DSIG", name offset 0x45b910
adachi@banach:~$ hd /usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Regular.ttf |head -5
00000000  00 01 00 00 00 13 01 00  00 04 00 30 44 53 49 47  |...........0DSIG|
00000010  00 00 00 01 00 47 37 ec  00 00 00 08 47 53 55 42  |.....G7.....GSUB|
00000020  04 71 76 e6 00 45 bd c8  00 00 a0 de 4f 53 2f 32  |.qv..E......OS/2|
00000030  66 94 96 dd 00 00 01 b8  00 00 00 60 63 6d 61 70  |f..........`cmap|
00000040  ec c8 06 70 00 00 db bc  00 03 15 ab 63 76 74 20  |...p........cvt |

'BIZ UDゴシック Regular'のnameオフセットテーブル

filename='/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Regular.ttf'
offset=0x45b910
formatOfNameRecord=0x0000
numOfNameRecord=0x0014
stringOffsetOfNameRecord=0x00f6

nameオフセットテーブルはWinだけで、すべてutf_16_beでデコードします。

nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 03 win 00 01 uni 04 09 en 00 00 00 ce 00 00
01 00 03 win 00 01 uni 04 09 en 00 01 00 18 00 ce
02 00 03 win 00 01 uni 04 09 en 00 02 00 0e 00 e6
03 00 03 win 00 01 uni 04 09 en 00 03 00 2a 00 f4
04 00 03 win 00 01 uni 04 09 en 00 04 00 18 00 ce
05 00 03 win 00 01 uni 04 09 en 00 05 00 1a 01 1e
06 00 03 win 00 01 uni 04 09 en 00 06 00 26 01 38
07 00 03 win 00 01 uni 04 09 en 00 07 00 58 01 5e
08 00 03 win 00 01 uni 04 09 en 00 08 00 1a 01 b6
09 00 03 win 00 01 uni 04 09 en 00 09 00 24 01 d0
0a 00 03 win 00 01 uni 04 09 en 00 0b 00 34 01 f4
0b 00 03 win 00 01 uni 04 09 en 00 0c 00 34 01 f4
0c 00 03 win 00 01 uni 04 09 en 00 0d 01 22 02 28
0d 00 03 win 00 01 uni 04 09 en 00 0e 00 36 03 4a
0e 00 03 win 00 01 uni 04 11 ja 00 00 00 ce 00 00
0f 00 03 win 00 01 uni 04 11 ja 00 01 00 14 03 80
10 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 00 e6
11 00 03 win 00 01 uni 04 11 ja 00 03 00 2a 00 f4
12 00 03 win 00 01 uni 04 11 ja 00 04 00 14 03 80
13 00 03 win 00 01 uni 04 11 ja 00 05 00 1a 01 1e

文字列の割当は合理的に設計されています。

文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
000000ce win_en_00, win_ja_00,
00ce0018 win_en_01, win_en_04,
00e6000e win_en_02, win_ja_02,
00f4002a win_en_03, win_ja_03,
011e001a win_en_05, win_ja_05,
01380026 win_en_06,
015e0058 win_en_07,
01b6001a win_en_08,
01d00024 win_en_09,
01f40034 win_en_11, win_en_12,
02280122 win_en_13,
034a0036 win_en_14,
03800014 win_ja_01, win_ja_04,

'BIZ UDゴシック Regular'の名前文字列のデコード一覧

これも全体が膨らんでいるので、nameID=01~04だけを抜書したものを下に用意しました。

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
0000206 0x45ba06win_en,win_ja00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 20 00 32 00 30 00 32 00 32 00 20 00 54 00 68 00 65 00 20 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 20 00 50 00 72 00 6f 00 6a 00 65 00 63 00 74 00 20 00 41 00 75 00 74 00 68 00 6f 00 72 00 73 00 20 00 28 00 68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 67 00 69 00 74 00 68 00 75 00 62 00 2e 00 63 00 6f 00 6d 00 2f 00 67 00 6f 00 6f 00 67 00 6c 00 65 00 66 00 6f 00 6e 00 74 00 73 00 2f 00 6d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 2d 00 62 00 69 00 7a 00 2d 00 75 00 64 00 2d 00 67 00 6f 00 74 00 68 00 69 00 63 00 29 Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-gothic)Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-gothic)
00ce24 0x45bad4win_en01,04 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 BIZ UDGothicBIZ UDGothic
00e614 0x45baecwin_en,win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
00f442 0x45bafawin_en,win_ja03 00 30 00 30 00 31 00 3b 00 4d 00 52 00 53 00 57 00 3b 00 42 00 49 00 5a 00 2d 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 001;MRSW;BIZ-UDGothic001;MRSW;BIZ-UDGothic
011e26 0x45bb24win_en,win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 30 00 35 00 31 Version 1.051Version 1.051
013838 0x45bb3ewin_en06 00 42 00 49 00 5a 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 2d 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 BIZUDGothic-RegularBIZUDGothic-Regular
015e88 0x45bb64win_en07 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 20 00 69 00 73 00 20 00 61 00 20 00 74 00 72 00 61 00 64 00 65 00 6d 00 61 00 72 00 6b 00 20 00 6f 00 66 00 20 00 4d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 20 00 49 00 6e 00 63 00 2e BIZ UDGothic is a trademark of Morisawa Inc.BIZ UDGothic is a trademark of Morisawa Inc.
01b626 0x45bbbcwin_en08 00 4d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 20 00 49 00 6e 00 63 00 2e Morisawa Inc.Morisawa Inc.
01d036 0x45bbd6win_en09 00 54 00 79 00 70 00 65 00 42 00 61 00 6e 00 6b 00 20 00 43 00 6f 00 2e 00 2c 00 20 00 4c 00 74 00 64 00 2e TypeBank Co., Ltd.TypeBank Co., Ltd.
01f452 0x45bbfawin_en11,12 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 77 00 77 00 77 00 2e 00 6d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 2e 00 63 00 6f 00 2e 00 6a 00 70 00 2f http://www.morisawa.co.jp/http://www.morisawa.co.jp/
0228290 0x45bc2ewin_en13 00 54 00 68 00 69 00 73 00 20 00 46 00 6f 00 6e 00 74 00 20 00 53 00 6f 00 66 00 74 00 77 00 61 00 72 00 65 00 20 00 69 00 73 00 20 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 64 00 20 00 75 00 6e 00 64 00 65 00 72 00 20 00 74 00 68 00 65 00 20 00 53 00 49 00 4c 00 20 00 4f 00 70 00 65 00 6e 00 20 00 46 00 6f 00 6e 00 74 00 20 00 4c 00 69 00 63 00 65 00 6e 00 73 00 65 00 2c 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 31 00 2e 00 20 00 54 00 68 00 69 00 73 00 20 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 20 00 69 00 73 00 20 00 61 00 76 00 61 00 69 00 6c 00 61 00 62 00 6c 00 65 00 20 00 77 00 69 00 74 00 68 00 20 00 61 00 20 00 46 00 41 00 51 00 20 00 61 00 74 00 3a 00 20 00 68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 73 00 63 00 72 00 69 00 70 00 74 00 73 00 2e 00 73 00 69 00 6c 00 2e 00 6f 00 72 00 67 00 2f 00 4f 00 46 00 4c This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFLThis Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL
034a54 0x45bd50win_en14 00 68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 73 00 63 00 72 00 69 00 70 00 74 00 73 00 2e 00 73 00 69 00 6c 00 2e 00 6f 00 72 00 67 00 2f 00 4f 00 46 00 4c https://scripts.sil.org/OFLhttps://scripts.sil.org/OFL
038020 0x45bd86win_ja01,04 00 42 00 49 00 5a 00 20 00 55 00 44 30 b4 30 b7 30 c3 30 af BIZ UDゴシックBIZ UD0エ0キ0テ0ッ
文字列へのオフセット計算、バイト列とデコード例 01~04抜書
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
00ce24 0x45bad4win_en01,04 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 BIZ UDGothicBIZ UDGothic
00e614 0x45baecwin_en,win_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegular
038020 0x45bd86win_ja01,04 00 42 00 49 00 5a 00 20 00 55 00 44 30 b4 30 b7 30 c3 30 af BIZ UDゴシックBIZ UD0エ0キ0テ0ッ

winだけなので文句なしだと思います。

  1. 英語名から考えていきます。win_enで 'BIZ UDGothic'
  2. 日本語名も win_ja だけで 'BIZ UDゴシック' 。
  3. styleも、win_en,win_ja ともに Regular なので統一し Regular(en) のみとします。
   family: "BIZ UDゴシック"(s) "BIZ UDGothic"(s)
	familylang: "ja"(s) "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)

■'BIZ UDゴシック Bold'

adachi@banach:~$ file /usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Bold.ttf 
/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Bold.ttf: TrueType Font data, digitally signed, 19 tables, 1st "DSIG", name offset 0x454690
adachi@banach:~$ hd /usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Bold.ttf|head -5
00000000  00 01 00 00 00 13 01 00  00 04 00 30 44 53 49 47  |...........0DSIG|
00000010  00 00 00 01 00 46 c5 a8  00 00 00 08 47 53 55 42  |.....F......GSUB|
00000020  04 71 76 e6 00 45 4b 84  00 00 a0 de 4f 53 2f 32  |.qv..EK.....OS/2|
00000030  67 c0 9a be 00 00 01 b8  00 00 00 60 63 6d 61 70  |g..........`cmap|
00000040  ec c8 06 70 00 00 db bc  00 03 15 ab 63 76 74 20  |...p........cvt |

'BIZ UDゴシック Bold'のnameオフセットテーブル

filename='/usr/share/fonts/truetype/bizud-gothic/BIZUDGothic-Bold.ttf'
offset=0x454690
formatOfNameRecord=0x0000
numOfNameRecord=0x0014
stringOffsetOfNameRecord=0x00f6
nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 03 win 00 01 uni 04 09 en 00 00 00 ce 00 00
01 00 03 win 00 01 uni 04 09 en 00 01 00 18 00 ce
02 00 03 win 00 01 uni 04 09 en 00 02 00 08 00 e6
03 00 03 win 00 01 uni 04 09 en 00 03 00 34 00 ee
04 00 03 win 00 01 uni 04 09 en 00 04 00 22 01 22
05 00 03 win 00 01 uni 04 09 en 00 05 00 1a 01 44
06 00 03 win 00 01 uni 04 09 en 00 06 00 20 01 5e
07 00 03 win 00 01 uni 04 09 en 00 07 00 58 01 7e
08 00 03 win 00 01 uni 04 09 en 00 08 00 1a 01 d6
09 00 03 win 00 01 uni 04 09 en 00 09 00 24 01 f0
0a 00 03 win 00 01 uni 04 09 en 00 0b 00 34 02 14
0b 00 03 win 00 01 uni 04 09 en 00 0c 00 34 02 14
0c 00 03 win 00 01 uni 04 09 en 00 0d 01 22 02 48
0d 00 03 win 00 01 uni 04 09 en 00 0e 00 36 03 6a
0e 00 03 win 00 01 uni 04 11 ja 00 00 00 ce 00 00
0f 00 03 win 00 01 uni 04 11 ja 00 01 00 14 03 a0
10 00 03 win 00 01 uni 04 11 ja 00 02 00 08 00 e6
11 00 03 win 00 01 uni 04 11 ja 00 03 00 34 00 ee
12 00 03 win 00 01 uni 04 11 ja 00 04 00 1e 03 b4
13 00 03 win 00 01 uni 04 11 ja 00 05 00 1a 01 44
文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
000000ce win_en_00, win_ja_00,
00ce0018 win_en_01,
00e60008 win_en_02, win_ja_02,
00ee0034 win_en_03, win_ja_03,
01220022 win_en_04,
0144001a win_en_05, win_ja_05,
015e0020 win_en_06,
017e0058 win_en_07,
01d6001a win_en_08,
01f00024 win_en_09,
02140034 win_en_11, win_en_12,
02480122 win_en_13,
036a0036 win_en_14,
03a00014 win_ja_01,
03b4001e win_ja_04,

'BIZ UDゴシック Bold'の名前文字列のデコード一覧

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jis
0000206 0x454786win_en,win_ja00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 20 00 32 00 30 00 32 00 32 00 20 00 54 00 68 00 65 00 20 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 20 00 50 00 72 00 6f 00 6a 00 65 00 63 00 74 00 20 00 41 00 75 00 74 00 68 00 6f 00 72 00 73 00 20 00 28 00 68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 67 00 69 00 74 00 68 00 75 00 62 00 2e 00 63 00 6f 00 6d 00 2f 00 67 00 6f 00 6f 00 67 00 6c 00 65 00 66 00 6f 00 6e 00 74 00 73 00 2f 00 6d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 2d 00 62 00 69 00 7a 00 2d 00 75 00 64 00 2d 00 67 00 6f 00 74 00 68 00 69 00 63 00 29 Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-gothic)Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-gothic)
00ce24 0x454854win_en01 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 BIZ UDGothicBIZ UDGothic
00e68 0x45486cwin_en,win_ja02 00 42 00 6f 00 6c 00 64 BoldBold
00ee52 0x454874win_en,win_ja03 00 30 00 30 00 31 00 3b 00 4d 00 52 00 53 00 57 00 3b 00 42 00 49 00 5a 00 2d 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 2d 00 42 00 6f 00 6c 00 64 001;MRSW;BIZ-UDGothic-Bold001;MRSW;BIZ-UDGothic-Bold
012234 0x4548a8win_en04 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 20 00 42 00 6f 00 6c 00 64 BIZ UDGothic BoldBIZ UDGothic Bold
014426 0x4548cawin_en,win_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 30 00 35 00 31 Version 1.051Version 1.051
015e32 0x4548e4win_en06 00 42 00 49 00 5a 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 2d 00 42 00 6f 00 6c 00 64 BIZUDGothic-BoldBIZUDGothic-Bold
017e88 0x454904win_en07 00 42 00 49 00 5a 00 20 00 55 00 44 00 47 00 6f 00 74 00 68 00 69 00 63 00 20 00 69 00 73 00 20 00 61 00 20 00 74 00 72 00 61 00 64 00 65 00 6d 00 61 00 72 00 6b 00 20 00 6f 00 66 00 20 00 4d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 20 00 49 00 6e 00 63 00 2e BIZ UDGothic is a trademark of Morisawa Inc.BIZ UDGothic is a trademark of Morisawa Inc.
01d626 0x45495cwin_en08 00 4d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 20 00 49 00 6e 00 63 00 2e Morisawa Inc.Morisawa Inc.
01f036 0x454976win_en09 00 54 00 79 00 70 00 65 00 42 00 61 00 6e 00 6b 00 20 00 43 00 6f 00 2e 00 2c 00 20 00 4c 00 74 00 64 00 2e TypeBank Co., Ltd.TypeBank Co., Ltd.
021452 0x45499awin_en11,12 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 77 00 77 00 77 00 2e 00 6d 00 6f 00 72 00 69 00 73 00 61 00 77 00 61 00 2e 00 63 00 6f 00 2e 00 6a 00 70 00 2f http://www.morisawa.co.jp/http://www.morisawa.co.jp/
0248290 0x4549cewin_en13 00 54 00 68 00 69 00 73 00 20 00 46 00 6f 00 6e 00 74 00 20 00 53 00 6f 00 66 00 74 00 77 00 61 00 72 00 65 00 20 00 69 00 73 00 20 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 64 00 20 00 75 00 6e 00 64 00 65 00 72 00 20 00 74 00 68 00 65 00 20 00 53 00 49 00 4c 00 20 00 4f 00 70 00 65 00 6e 00 20 00 46 00 6f 00 6e 00 74 00 20 00 4c 00 69 00 63 00 65 00 6e 00 73 00 65 00 2c 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 31 00 2e 00 20 00 54 00 68 00 69 00 73 00 20 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 20 00 69 00 73 00 20 00 61 00 76 00 61 00 69 00 6c 00 61 00 62 00 6c 00 65 00 20 00 77 00 69 00 74 00 68 00 20 00 61 00 20 00 46 00 41 00 51 00 20 00 61 00 74 00 3a 00 20 00 68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 73 00 63 00 72 00 69 00 70 00 74 00 73 00 2e 00 73 00 69 00 6c 00 2e 00 6f 00 72 00 67 00 2f 00 4f 00 46 00 4c This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFLThis Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL
036a54 0x454af0win_en14 00 68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 73 00 63 00 72 00 69 00 70 00 74 00 73 00 2e 00 73 00 69 00 6c 00 2e 00 6f 00 72 00 67 00 2f 00 4f 00 46 00 4c https://scripts.sil.org/OFLhttps://scripts.sil.org/OFL
03a020 0x454b26win_ja01 00 42 00 49 00 5a 00 20 00 55 00 44 30 b4 30 b7 30 c3 30 af BIZ UDゴシックBIZ UD0エ0キ0テ0ッ
03b430 0x454b3awin_ja04 00 42 00 49 00 5a 00 20 00 55 00 44 30 b4 30 b7 30 c3 30 af 00 20 00 42 00 6f 00 6c 00 64 BIZ UDゴシック BoldBIZ UD0エ0キ0テ0ッ Bold

これもwinだけなので文句なしだと思います。

  1. 英語名から考えていきます。win_enで 'BIZ UDGothic'
  2. 日本語名も win_ja だけで 'BIZ UDゴシック' 。
  3. styleも、win_en,win_ja ともに Bold なので統一し Bold(en) のみとします。
	family: "BIZ UDゴシック"(s) "BIZ UDGothic"(s)
	familylang: "ja"(s) "en"(s)
	style: "Bold"(s)
	stylelang: "en"(s)

■モトヤLマルベリ3等幅

adachi@banach:~$ fc-list  モトヤLマルベリ3等幅
/usr/share/fonts/truetype/motoya-l-maruberi/MTLmr3m.ttf: モトヤLマルベリ3等幅,MotoyaLMaru,莂荧莄䲃綃讃碃訳鎙閝:style=Regular,W3 mono
adachi@banach:~$ fc-list -vb モトヤLマルベリ3等幅
Pattern has 27 elts (size 32)
	family: "モトヤLマルベリ3等幅"(s) "MotoyaLMaru"(s) "莂荧莄䲃綃讃碃訳鎙閝"(s)
	familylang: "ja"(s) "en"(s) "ja"(s)
	style: "Regular"(s) "W3 mono"(s)
	stylelang: "ja"(s) "en"(s)
	fullname: "モトヤLマルベリ3等幅"(s) "MotoyaLMaru W3 mono"(s) "莂荧莄䲃綃讃碃訳鎙閝"(s)
	fullnamelang: "ja"(s) "en"(s) "ja"(s)
	slant: 0(i)(s)
	weight: 80(f)(s)
	width: 100(f)(s)
	spacing: 90(i)(s)
	foundry: "MTY "(s)
	file: "/usr/share/fonts/truetype/motoya-l-maruberi/MTLmr3m.ttf"(s)
	index: 0(i)(s)
	outline: True(s)
	scalable: True(s)
	fontversion: 262144(i)(s)
	capability: "otlayout:kana"(s)
	fontformat: "TrueType"(s)
	decorative: False(s)
	postscriptname: "MotoyaLMaru-W3-90ms-RKSJ-H"(s)
	color: False(s)
	symbol: False(s)
	variable: False(s)
	fonthashint: True(s)
	order: 0(i)(s)
	namedinstance: False(s)
	fontwrapper: "SFNT"(s)
adachi@banach:~$ file /usr/share/fonts/truetype/motoya-l-maruberi/MTLmr3m.ttf
/usr/share/fonts/truetype/motoya-l-maruberi/MTLmr3m.ttf: TrueType Font data, 16 tables, 1st "GSUB", name offset 0x2b8dbc
adachi@banach:~$ hd /usr/share/fonts/truetype/motoya-l-maruberi/MTLmr3m.ttf|head -5
00000000  00 01 00 00 00 10 01 00  00 04 00 00 47 53 55 42  |............GSUB|
00000010  71 59 58 68 00 00 01 0c  00 00 01 6c 4f 53 2f 32  |qYXh.......lOS/2|
00000020  db 6f e2 09 00 00 02 78  00 00 00 56 63 6d 61 70  |.o.....x...Vcmap|
00000030  67 6e a9 84 00 00 02 d0  00 00 85 ea 67 61 73 70  |gn..........gasp|
00000040  00 17 00 09 00 00 88 bc  00 00 00 10 67 6c 79 66  |............glyf|

モトヤLマルベリ3等幅のnameオフセットテーブル

filename='/usr/share/fonts/truetype/motoya-l-maruberi/MTLmr3m.ttf'
offset=0x2b8dbc
formatOfNameRecord=0x0000
numOfNameRecord=0x001e
stringOffsetOfNameRecord=0x016e

platformID encodingID languageID は例の4つの組み合わせのうち、mac,jap,ja がありません。mac,rom,ja になっています。

nameオフセットテーブル
platformIDencodingIDlanguageID nameIDlengthoffset
00 00 01 mac 00 00 rom 00 00 en 00 00 00 20 00 00
01 00 01 mac 00 00 rom 00 00 en 00 01 00 0b 00 20
02 00 01 mac 00 00 rom 00 00 en 00 02 00 07 00 2b
03 00 01 mac 00 00 rom 00 00 en 00 03 00 1e 00 32
04 00 01 mac 00 00 rom 00 00 en 00 04 00 13 00 50
05 00 01 mac 00 00 rom 00 00 en 00 05 00 0c 00 63
06 00 01 mac 00 00 rom 00 00 en 00 06 00 1a 00 6f
07 00 01 mac 00 00 rom 00 0b ja 00 00 00 20 00 89
08 00 01 mac 00 00 rom 00 0b ja 00 01 00 14 00 a9
09 00 01 mac 00 00 rom 00 0b ja 00 02 00 07 00 bd
0a 00 01 mac 00 00 rom 00 0b ja 00 03 00 1e 00 c4
0b 00 01 mac 00 00 rom 00 0b ja 00 04 00 14 00 e2
0c 00 01 mac 00 00 rom 00 0b ja 00 05 00 0c 00 f6
0d 00 01 mac 00 00 rom 00 0b ja 00 06 00 1a 01 02
0e 00 03 win 00 01 uni 04 09 en 00 00 00 40 01 1c
0f 00 03 win 00 01 uni 04 09 en 00 01 00 16 01 5c
10 00 03 win 00 01 uni 04 09 en 00 02 00 0e 01 72
11 00 03 win 00 01 uni 04 09 en 00 03 00 3c 01 80
12 00 03 win 00 01 uni 04 09 en 00 04 00 26 01 bc
13 00 03 win 00 01 uni 04 09 en 00 05 00 18 01 e2
14 00 03 win 00 01 uni 04 09 en 00 06 00 34 01 fa
15 00 03 win 00 01 uni 04 09 en 00 0d 00 5c 02 2e
16 00 03 win 00 01 uni 04 09 en 00 0e 00 54 02 8a
17 00 03 win 00 01 uni 04 11 ja 00 00 00 40 02 de
18 00 03 win 00 01 uni 04 11 ja 00 01 00 16 03 1e
19 00 03 win 00 01 uni 04 11 ja 00 02 00 0e 03 34
1a 00 03 win 00 01 uni 04 11 ja 00 03 00 3c 03 42
1b 00 03 win 00 01 uni 04 11 ja 00 04 00 16 03 7e
1c 00 03 win 00 01 uni 04 11 ja 00 05 00 18 03 94
1d 00 03 win 00 01 uni 04 11 ja 00 06 00 34 03 ac

macromja が mac, roma, japanese です。asciiだけだったら問題ないのですが。

文字列へのオフセット、長さと、呼び出し元の一覧
offsetlength呼出元plat_lang_nameID
00000020 mac_en_00,
0020000b mac_en_01,
002b0007 mac_en_02,
0032001e mac_en_03,
00500013 mac_en_04,
0063000c mac_en_05,
006f001a mac_en_06,
00890020 macromja_00,
00a90014 macromja_01,
00bd0007 macromja_02,
00c4001e macromja_03,
00e20014 macromja_04,
00f6000c macromja_05,
0102001a macromja_06,
011c0040 win_en_00,
015c0016 win_en_01,
0172000e win_en_02,
0180003c win_en_03,
01bc0026 win_en_04,
01e20018 win_en_05,
01fa0034 win_en_06,
022e005c win_en_13,
028a0054 win_en_14,
02de0040 win_ja_00,
031e0016 win_ja_01,
0334000e win_ja_02,
0342003c win_ja_03,
037e0016 win_ja_04,
03940018 win_ja_05,
03ac0034 win_ja_06,

モトヤLマルベリ3等幅の名前文字列のデコード一覧

mac-roma-japaneseの組み合わせがあるので、shift_jis に加えて ascii でのデコードを追加しました。

これも全体が膨らんでいるので、nameID=01~04だけを抜書したものを下に用意しました。

文字列へのオフセット計算、バイト列とデコード例
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jisascii
000032 0x2b8f2amac_en00 43 6f 70 79 72 69 67 68 74 28 43 29 32 30 31 30 20 4d 4f 54 4f 59 41 20 43 4f 2e 2c 4c 54 44 2e 䍯灹物杨琨䌩㈰㄰⁍佔余䄠䍏⸬䱔䐮Copyright(C)2010 MOTOYA CO.,LTD.Copyright(C)2010 MOTOYA CO.,LTD.
002011 0x2b8f4amac_en01 4d 6f 74 6f 79 61 4c 4d 61 72 75 䵯瑯祡䱍慲�MotoyaLMaruMotoyaLMaru
002b7 0x2b8f55mac_en02 57 33 20 6d 6f 6e 6f 圳潮�W3 monoW3 mono
003230 0x2b8f5cmac_en03 4d 54 59 20 4d 6f 74 6f 79 61 4c 4d 61 72 75 2d 57 33 2d 39 30 6d 73 2d 52 4b 53 4a 2d 48 䵔夠䵯瑯祡䱍慲甭圳ⴹね猭剋半ⵈMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
005019 0x2b8f7amac_en04 4d 6f 74 6f 79 61 4c 4d 61 72 75 20 57 33 20 6d 6f 6e 6f 䵯瑯祡䱍慲甠圳潮�MotoyaLMaru W3 monoMotoyaLMaru W3 mono
006312 0x2b8f8dmac_en05 56 65 72 73 69 6f 6e 20 31 2e 30 31 噥牳楯渠ㄮ〱Version 1.01Version 1.01
006f26 0x2b8f99mac_en06 4d 6f 74 6f 79 61 4c 4d 61 72 75 2d 57 33 2d 39 30 6d 73 2d 52 4b 53 4a 2d 48 䵯瑯祡䱍慲甭圳ⴹね猭剋半ⵈMotoyaLMaru-W3-90ms-RKSJ-HMotoyaLMaru-W3-90ms-RKSJ-H
008932 0x2b8fb3macromja00 43 6f 70 79 72 69 67 68 74 28 43 29 32 30 31 30 20 4d 4f 54 4f 59 41 20 43 4f 2e 2c 4c 54 44 2e 䍯灹物杨琨䌩㈰㄰⁍佔余䄠䍏⸬䱔䐮Copyright(C)2010 MOTOYA CO.,LTD.Copyright(C)2010 MOTOYA CO.,LTD.
00a920 0x2b8fd3macromja01 83 82 83 67 83 84 4c 83 7d 83 8b 83 78 83 8a 33 93 99 95 9d 莂荧莄䲃綃讃碃訳鎙閝モトヤLマルベリ3等幅���g��L�}���x��3����
00bd7 0x2b8fe7macromja02 52 65 67 75 6c 61 72 剥杵污�RegularRegular
00c430 0x2b8feemacromja03 4d 54 59 20 4d 6f 74 6f 79 61 4c 4d 61 72 75 2d 57 33 2d 39 30 6d 73 2d 52 4b 53 4a 2d 48 䵔夠䵯瑯祡䱍慲甭圳ⴹね猭剋半ⵈMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
00e220 0x2b900cmacromja04 83 82 83 67 83 84 4c 83 7d 83 8b 83 78 83 8a 33 93 99 95 9d 莂荧莄䲃綃讃碃訳鎙閝モトヤLマルベリ3等幅���g��L�}���x��3����
00f612 0x2b9020macromja05 56 65 72 73 69 6f 6e 20 31 2e 30 31 噥牳楯渠ㄮ〱Version 1.01Version 1.01
010226 0x2b902cmacromja06 4d 6f 74 6f 79 61 4c 4d 61 72 75 2d 57 33 2d 39 30 6d 73 2d 52 4b 53 4a 2d 48 䵯瑯祡䱍慲甭圳ⴹね猭剋半ⵈMotoyaLMaru-W3-90ms-RKSJ-HMotoyaLMaru-W3-90ms-RKSJ-H
011c64 0x2b9046win_en00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 43 00 29 00 32 00 30 00 31 00 30 00 20 00 4d 00 4f 00 54 00 4f 00 59 00 41 00 20 00 43 00 4f 00 2e 00 2c 00 4c 00 54 00 44 00 2e Copyright(C)2010 MOTOYA CO.,LTD.Copyright(C)2010 MOTOYA CO.,LTD.Copyright(C)2010 MOTOYA CO.,LTD.
015c22 0x2b9086win_en01 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 MotoyaLMaruMotoyaLMaruMotoyaLMaru
017214 0x2b909cwin_en02 00 57 00 33 00 20 00 6d 00 6f 00 6e 00 6f W3 monoW3 monoW3 mono
018060 0x2b90aawin_en03 00 4d 00 54 00 59 00 20 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 2d 00 57 00 33 00 2d 00 39 00 30 00 6d 00 73 00 2d 00 52 00 4b 00 53 00 4a 00 2d 00 48 MTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
01bc38 0x2b90e6win_en04 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 20 00 57 00 33 00 20 00 6d 00 6f 00 6e 00 6f MotoyaLMaru W3 monoMotoyaLMaru W3 monoMotoyaLMaru W3 mono
01e224 0x2b910cwin_en05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 30 00 31 Version 1.01Version 1.01Version 1.01
01fa52 0x2b9124win_en06 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 2d 00 57 00 33 00 2d 00 39 00 30 00 6d 00 73 00 2d 00 52 00 4b 00 53 00 4a 00 2d 00 48 MotoyaLMaru-W3-90ms-RKSJ-HMotoyaLMaru-W3-90ms-RKSJ-HMotoyaLMaru-W3-90ms-RKSJ-H
022e92 0x2b9158win_en13 00 4c 00 69 00 63 00 65 00 6e 00 73 00 65 00 64 00 20 00 75 00 6e 00 64 00 65 00 72 00 20 00 74 00 68 00 65 00 20 00 41 00 70 00 61 00 63 00 68 00 65 00 20 00 4c 00 69 00 63 00 65 00 6e 00 73 00 65 00 2c 00 20 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 32 00 2e 00 30 Licensed under the Apache License, Version 2.0Licensed under the Apache License, Version 2.0Licensed under the Apache License, Version 2.0
028a84 0x2b91b4win_en14 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 77 00 77 00 77 00 2e 00 61 00 70 00 61 00 63 00 68 00 65 00 2e 00 6f 00 72 00 67 00 2f 00 6c 00 69 00 63 00 65 00 6e 00 73 00 65 00 73 00 2f 00 4c 00 49 00 43 00 45 00 4e 00 53 00 45 00 2d 00 32 00 2e 00 30 http://www.apache.org/licenses/LICENSE-2.0http://www.apache.org/licenses/LICENSE-2.0http://www.apache.org/licenses/LICENSE-2.0
02de64 0x2b9208win_ja00 00 43 00 6f 00 70 00 79 00 72 00 69 00 67 00 68 00 74 00 28 00 43 00 29 00 32 00 30 00 31 00 30 00 20 00 4d 00 4f 00 54 00 4f 00 59 00 41 00 20 00 43 00 4f 00 2e 00 2c 00 4c 00 54 00 44 00 2e Copyright(C)2010 MOTOYA CO.,LTD.Copyright(C)2010 MOTOYA CO.,LTD.Copyright(C)2010 MOTOYA CO.,LTD.
031e22 0x2b9248win_ja01 30 e2 30 c8 30 e4 00 4c 30 de 30 eb 30 d9 30 ea 00 33 7b 49 5e 45 モトヤLマルベリ3等幅0�0ネ0�L0゙0�0ル0�3{I^E0�0�0�L0�0�0�0�3{I^E
033414 0x2b925ewin_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegularRegular
034260 0x2b926cwin_ja03 00 4d 00 54 00 59 00 20 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 2d 00 57 00 33 00 2d 00 39 00 30 00 6d 00 73 00 2d 00 52 00 4b 00 53 00 4a 00 2d 00 48 MTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
037e22 0x2b92a8win_ja04 30 e2 30 c8 30 e4 00 4c 30 de 30 eb 30 d9 30 ea 00 33 7b 49 5e 45 モトヤLマルベリ3等幅0�0ネ0�L0゙0�0ル0�3{I^E0�0�0�L0�0�0�0�3{I^E
039424 0x2b92bewin_ja05 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 20 00 31 00 2e 00 30 00 31 Version 1.01Version 1.01Version 1.01
03ac52 0x2b92d6win_ja06 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 2d 00 57 00 33 00 2d 00 39 00 30 00 6d 00 73 00 2d 00 52 00 4b 00 53 00 4a 00 2d 00 48 MotoyaLMaru-W3-90ms-RKSJ-HMotoyaLMaru-W3-90ms-RKSJ-HMotoyaLMaru-W3-90ms-RKSJ-H
文字列へのオフセット計算、バイト列とデコード例 01~04抜書
offsetlength開始位置呼出元plat_lang 呼出元nameIDバイト列(デコード前の文字列)utf_16_beshift_jisascii
002011 0x2b8f4amac_en01 4d 6f 74 6f 79 61 4c 4d 61 72 75 䵯瑯祡䱍慲�MotoyaLMaruMotoyaLMaru
002b7 0x2b8f55mac_en02 57 33 20 6d 6f 6e 6f 圳潮�W3 monoW3 mono
003230 0x2b8f5cmac_en03 4d 54 59 20 4d 6f 74 6f 79 61 4c 4d 61 72 75 2d 57 33 2d 39 30 6d 73 2d 52 4b 53 4a 2d 48 䵔夠䵯瑯祡䱍慲甭圳ⴹね猭剋半ⵈMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
005019 0x2b8f7amac_en04 4d 6f 74 6f 79 61 4c 4d 61 72 75 20 57 33 20 6d 6f 6e 6f 䵯瑯祡䱍慲甠圳潮�MotoyaLMaru W3 monoMotoyaLMaru W3 mono
00a920 0x2b8fd3macromja01 83 82 83 67 83 84 4c 83 7d 83 8b 83 78 83 8a 33 93 99 95 9d 莂荧莄䲃綃讃碃訳鎙閝モトヤLマルベリ3等幅���g��L�}���x��3����
00bd7 0x2b8fe7macromja02 52 65 67 75 6c 61 72 剥杵污�RegularRegular
00c430 0x2b8feemacromja03 4d 54 59 20 4d 6f 74 6f 79 61 4c 4d 61 72 75 2d 57 33 2d 39 30 6d 73 2d 52 4b 53 4a 2d 48 䵔夠䵯瑯祡䱍慲甭圳ⴹね猭剋半ⵈMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
00e220 0x2b900cmacromja04 83 82 83 67 83 84 4c 83 7d 83 8b 83 78 83 8a 33 93 99 95 9d 莂荧莄䲃綃讃碃訳鎙閝モトヤLマルベリ3等幅���g��L�}���x��3����
015c22 0x2b9086win_en01 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 MotoyaLMaruMotoyaLMaruMotoyaLMaru
017214 0x2b909cwin_en02 00 57 00 33 00 20 00 6d 00 6f 00 6e 00 6f W3 monoW3 monoW3 mono
018060 0x2b90aawin_en03 00 4d 00 54 00 59 00 20 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 2d 00 57 00 33 00 2d 00 39 00 30 00 6d 00 73 00 2d 00 52 00 4b 00 53 00 4a 00 2d 00 48 MTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
01bc38 0x2b90e6win_en04 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 20 00 57 00 33 00 20 00 6d 00 6f 00 6e 00 6f MotoyaLMaru W3 monoMotoyaLMaru W3 monoMotoyaLMaru W3 mono
031e22 0x2b9248win_ja01 30 e2 30 c8 30 e4 00 4c 30 de 30 eb 30 d9 30 ea 00 33 7b 49 5e 45 モトヤLマルベリ3等幅0�0ネ0�L0゙0�0ル0�3{I^E0�0�0�L0�0�0�0�3{I^E
033414 0x2b925ewin_ja02 00 52 00 65 00 67 00 75 00 6c 00 61 00 72 RegularRegularRegular
034260 0x2b926cwin_ja03 00 4d 00 54 00 59 00 20 00 4d 00 6f 00 74 00 6f 00 79 00 61 00 4c 00 4d 00 61 00 72 00 75 00 2d 00 57 00 33 00 2d 00 39 00 30 00 6d 00 73 00 2d 00 52 00 4b 00 53 00 4a 00 2d 00 48 MTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-HMTY MotoyaLMaru-W3-90ms-RKSJ-H
037e22 0x2b92a8win_ja04 30 e2 30 c8 30 e4 00 4c 30 de 30 eb 30 d9 30 ea 00 33 7b 49 5e 45 モトヤLマルベリ3等幅0�0ネ0�L0゙0�0ル0�3{I^E0�0�0�L0�0�0�0�3{I^E
  1. 英語名から考えていきます。mac_enでは MotoyaLMaru , win_enでも MotoyaLMaru なので一つにまとめます。
  2. 日本語名は macromja と ascii との指定ですが、それは失敗します。utf_16_be で デコードすると、莂荧莄䲃綃讃碃訳鎙閝。shift_JISだと、モトヤLマルベリ3等幅になるはず。win_ja で モトヤLマルベリ3等幅 です。macで2つの名前を登録するとは考えにくいので、asciiで失敗して、utf_16_be で デコードしたものを採用すると考えます。結果、winでモトヤLマルベリ3等幅(ja)、macで莂荧莄䲃綃讃碃訳鎙閝(ja)となります。
  3. styleはmac_enで、'W3 mono'。win_en でも 'W3 mono'。 macronja では ascii で読めて Regular 、win_ja でも Regular なので、Regular(ja), 'W3 mono'(en)とします。

ここも、macよりwinを優先する理由がないこと以外は納得できます。

adachi@banach:~$ fc-list -vb モトヤLマルベリ3等幅
Pattern has 27 elts (size 32)
	family: "モトヤLマルベリ3等幅"(s) "MotoyaLMaru"(s) "莂荧莄䲃綃讃碃訳鎙閝"(s)
	familylang: "ja"(s) "en"(s) "ja"(s)
	style: "Regular"(s) "W3 mono"(s)
	stylelang: "ja"(s) "en"(s)