-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
I am trying to localize a PDF in Chinese, Korean, and Japanese.
I was able to get the Korean font to work, but for Chinese and Japanese I get
Error: Not a CFF Font
Here is my font def:
const fonts = {
// English
HelveticaNeue: {
normal: [`${fontsDir}/HelveticaNeue.ttc`, 'HelveticaNeueLTStd-Md'],
bold: [`${fontsDir}/HelveticaNeue.ttc`, 'HelveticaNeueLTStd-Bold'],
},
HelveticaNueuRoman: {
normal: [`${fontsDir}/HelveticaNeue.ttc`, 'HelveticaNeueLTStd-Roman'],
bold: [`${fontsDir}/HelveticaNeue.ttc`, 'HelveticaNeueLTStd-Bold'],
},
// Korean
AppleSDGothicNeo: {
normal: [`${fontsDir}/AppleSDGothicNeo.ttc`, 'AppleSDGothicNeo-Regular'],
bold: [`${fontsDir}/AppleSDGothicNeo.ttc`, 'AppleSDGothicNeo-Bold'],
},
// Chinese
PingFangSC: {
normal: [`${fontsDir}/PingFang.ttc`, 'PingFangSC-Regular'],
bold: [`${fontsDir}/PingFang.ttc`, 'PingFangSC-Semibold'],
},
// Japanese
HiraginoSansGB: {
normal: [`${fontsDir}/HiraginoSansGB.ttc`, 'HiraginoSansGB W3'],
bold: [`${fontsDir}/HiraginoSansGB.ttc`, 'HiraginoSansGB W6'],
},
};blueyestar