Skip to content

Use TextWriter with specified font #2273

Answered by JorjMcKie
hgdhot asked this question in Q&A
Discussion options

You must be logged in to vote

Answering directly here - then I will transfer this to "Discussions", where we may handle any additional questions.
This is not issue / bug.

Ad (1)

The displayed fontname as you are showing it probably is incomplete, because most creator software will build font subsets - resulting in an extended name like "ABCDEF+CMMI7". The first 6 characters are random, so you must extract the text after setting a global parameter which causes returning the full subset name in text extraction. Once you know this name, inspect this output to find the font xref:

In [4]: page.get_fonts()
Out[4]:
[(12, 'cff', 'Type1', 'EAMKOQ+FrutigerLT-Roman', 'T1_0', 'WinAnsiEncoding'),
 (14, 'cff', 'Type1', 'DWXEAS+Frut…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@JorjMcKie
Comment options

@hgdhot
Comment options

@JorjMcKie
Comment options

@hgdhot
Comment options

@JorjMcKie
Comment options

Answer selected by hgdhot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2272 on March 01, 2023 12:27.