ashutoshvarma / pyxpdf

Fast and memory-efficient Python PDF Parser based on xpdf sources
https://pyxpdf.readthedocs.io/
Other
40 stars 16 forks source link

Better font detection [Enable fontconfig support] #4

Open ashutoshvarma opened 4 years ago

ashutoshvarma commented 4 years ago

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 :

Probable solutions:-