matching fonts from page.get_text("dict") to fitz.Font object #4104
Unanswered
alexander-fried
asked this question in
Looking for help
Replies: 1 comment 2 replies
-
There is no way to do this securely.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When extracting font labels for specific text indicated in
page.get_text("dict")
, those labels are different from the fitz.Font objects extracted by first getting thexref
fromPage.get_fonts()
, then getting the font content databuffer
fromDocument.extract_font(xref)
, and lastly defining thefitz.Font(fontbuffer=buffer)
. How does one map the fontnames recovered from the former to a specificfitz.Font
object?Beta Was this translation helpful? Give feedback.
All reactions