Use embedded font with Identity-H encoding and write to other document or image #3693
Unanswered
terminalh2t3
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all.
Working on a printing project so I need to make some measurements on fonts that are used in the design.
We need to use that embedded font subset write all the supported unique characters to the black and white image and do some processing to measure the font thickness.
But, I work perfectly with
WinAnsiEncoding
but not working forIdentity-H
encodingHere is all fonts we have in the sample PDF doc:
[(14, 'ttf', 'Type0', 'IOXPLM+Arial-BoldMT', 'C2_0', 'Identity-H'),
(5, 'cff', 'Type1', 'IOXPLM+MyriadPro-BoldCond', 'T1_0', 'WinAnsiEncoding'),
(6, 'cff', 'Type1', 'IOXPLM+UTMBryantLGBold', 'T1_1', 'WinAnsiEncoding'),
...
With 'WinAnsiEncoding' font, there is no problem using that and display using ImageFont or
fitz.Font
.But if apply for Identity-H font, it is not working.
font_info = all_fonts[0]
=> (14, 'ttf', 'Type0', 'IOXPLM+Arial-BoldMT', 'C2_0', 'Identity-H').Checklist:
fitz.Font
but nothing helped.Here is my buffer of this font if anyone can help.
Many many thanks
buffer-Arial-MT.txt
Beta Was this translation helpful? Give feedback.
All reactions