ashutoshvarma / ashutoshvarma/pyxpdf
Better font detection [Enable fontconfig support]
- Dominant language
- Cython
- Stars
- 44
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
For the PDF's that does not embed fonts (mostly Adobe Base-14 fonts as they are not required to embed as per PDF specification) in them we have to search for fonts in user's system.
The best way for that should be using fontconfig as xpdf-4.02 has fontconfig support already but disabled in libxpdf.
**Why fontconfig support is disabled in libxpdf?**
Because goal of libxpdf was to provide static library with minimum dependencies by including them statically. But for fontconfig, including it in a static library is pretty difficult (at least for me) as :
- It requires a font.conf configuration file and without it spams the stdout with warnings.
- Also the search location for this font.conf file must be hardcoded during build which would make pyxpdf wheels error prone.
**Probable solutions:-**
- Include fontconfig statically in libxpdf and ship pyxpdf with it own custom font.conf which should work in all supported oses.
Contributor guide
Research direction
The issue names libxpdf, pyxpdf wheels, and xpdf-4.02 but no files or tests. First inspect how libxpdf is built and how font lookup and dependencies are handled, then compare xpdf-4.02's fontconfig support. Done means non-embedded fonts are found through fontconfig without introducing configuration warnings or breaking supported wheel builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100