のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

fonttools cmap

fonttoolsのテストより引用

f:id:none53:20200606061651p:plain
cmap

github.com

cmap_org = font_org["cmap"]

font_temp = ttLib.TTFont()
cmap_temp = table__c_m_a_p()
cmap_temp.tableVersion = 0 <=これを入れないと、エラーになった。
cmap_temp.tables = [c0, c1, c2] <=入れ替えたりできる
font_Temp["cmap"] = cmap_temp