Skip to content

is there a way to distinguish the regular font and pseudo bold in pymupdf #2881

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

You must be logged in to vote

This is a Discussions item and no issue.

There are multiple methods to let non-bold text appear bold:

  1. Write the same text twice, with a small offset the second time. The PDF author may have done this character-by-character or in greater chunks (word-by-word, line-by-line, etc.). This can be detected as doubled text in extractions, ("aaabbbccc", or "abcabcabc" etc.) and (largely) overlapping text positions.
  2. Thicken the single character borders: normally characters are written by only filling its interior with a fill color. In addition, one can add a stroke color to also write the characters' border lines. This cannot be detected in normal text extraction (and this will not change in the f…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zhangxiaojiawow
Comment options

Answer selected by zhangxiaojiawow
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 #2880 on December 12, 2023 09:56.