galkahana / PDF-Writer

High performance library for creating, modiyfing and parsing PDF files in C++
http://www.pdfhummus.com
Apache License 2.0
891 stars 211 forks source link

How to use font embedded in the application ? #283

Open devilsclaw opened 3 weeks ago

devilsclaw commented 3 weeks ago

I would like to embed the fonts in my application like I do the PDF template. If possible I don't want to have to write the fonts into a temporary location and then point the PDF writer to there location. I would like to just point to a memory location with the size and then access the font information via PDFUsedFont*.

I was wondering if this is currently possible and how to do it. Or is it something that is even possible with the current font libraries used ?

galkahana commented 3 weeks ago

Hi, not currently possible, oyu can only create pdfusedfont objects with full path. Probably possible to enhance, but i never bothered. Theres both freetype integration for font info to deal with and the library embedding code to adapt