Я пытаюсь печатать корейские символы шрифтом hygothic-medium.У меня есть шрифт как 'korean.h2gtrm.ttf'file в папке site-packages \ reportlab \ fonts.Я сделал следующее: -
pdfmetrics.registerFont(UnicodeCIDFont(TTFont('HYGothic-
Medium','korean.h2gtrm.ttf')))
pdfmetrics.registerFontFamily('HYGothic-Medium',normal='HYGothic-
Medium',bold='HYGothic-Medium',italic='HYGothic-
Medium',boldItalic='HYGothic-
Medium')
addMapping('HYGothic-Medium',0, 0, 'korean.h2gtrm') #normal
addMapping('HYGothic-Medium', 0, 1, 'korean.h2gtrm')
addMapping('HYGothic-Medium',1, 0, 'korean.h2gtrm')
addMapping('HYGothic-Medium',1, 1, 'korean.h2gtrm')
pstyle= ParagraphStyle(name='KOR', fontName = 'HYGothic-Medium',
fontSize = 10 ))
p=Paragraph(text,pstyle)) # where text is my Korean characters
story.append(p) # error !!
Я получаю следующую ошибку: -
Can't map determine family/bold/italic for hygothic-medium
paragraph text '<para>\uc724\uadfc Machine</para>' caused exception
Есть предложения?