Skip to content
Discussion options

You must be logged in to vote

This script works as desired:

import fitz

fontfile = "GothamNarrow-Medium.240109-1605.otf"
text = f"{chr(0x2032)}{chr(0x2032)}{chr(0x2032)}"
doc = fitz.open()
page = doc.new_page()
page.insert_font(fontname="F0", fontfile=fontfile)
page.insert_text((100, 100), text, fontname="F0", fontsize=14.8)
doc.save("test.pdf")

Replies: 10 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

@Andreasox
Comment options

@JorjMcKie
Comment options

@JorjMcKie
Comment options

@Andreasox
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Andreasox
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 #2992 on January 08, 2024 21:05.