El dimarts, 14 d’octubre del 2025, a les 1:24:21 (Hora d’estiu d’Europa central), Martin Owens va escriure: > Dear Poppler project, > > I am Martin Owens, one of the senior developers and maintainers of the > Inkscape project.
Hello :) > > Inkscape uses poppler to import PDF files into Inkscape by converting > instructions into SVG constructs. Because SVG can not have embedded > fonts in the same way that a PDF can the font must either be 1) Matched > with a system font by name allowing it to both be editable as text and > look the same as it does in the PDF, 2) Be given a fallback font, so > it's editable at the expense of looking the same or 3) Converted to > paths, so it looks the same at the expense of being editable (as text). > > This third option was not possible using poppler as the paths are > stored inside poppler's private font engine API. > > To get around this limitation some of poppler's code was copied into > Inkscape's codebase to provide access to the required data. The amount > of the API is as follows: > > 1. CairoFontEngine > - getFont > > 2. CairoFont > - getFontFace > - getGlyph > > Your advice on harmonising our two projects so we only use your public > API would be greatly appreciated. If these API calls could be made > public then we can remove a large section of copied code and depend > entirely on poppler's. We can not make CairoFontEngine public, it uses GfxFont and PDFDoc on its API. That would mean basically mean all poppler core public and it's not what we want. What you would need to do is add some API (would you use the glib frontend? or the cpp one?) that exercises CairoFontEngine internally and returns classes that don't have dependency on the poppler internals, i.e. something like poppler_page_get_text_page that uses TextOutputDev internally but the user of the API never sees that. Cheers, Albert > > Thank you for your time. > > Best Regards, Martin Owens
