michaelrsweet / pdfio

PDFio is a simple C library for reading and writing PDF files.
https://www.msweet.org/pdfio
Apache License 2.0
198 stars 44 forks source link

String measure routines. #17

Closed gabrielaexile closed 11 months ago

gabrielaexile commented 3 years ago

Will there be string measure routines like in libharu ?

And thank you for starting this project, there has been a lot of need for such after libharu went stale.

michaelrsweet commented 3 years ago

@gabrielaexile I can look at adding them, but the current text handling capabilities in PDFio are intentionally limited since doing proper Unicode rendering is more complicated than drawing each of the glyphs. My initial intent is for PDFio to provide the low-level support so that higher-level libraries can use it to handle the complex details of supporting the PDF format itself.

michaelrsweet commented 3 years ago

Oh, and FWIW my mini TrueType/OpenType library (embedded in PDFio and available separately can be used to get the extents of a string for a given font. I'm using this in HTMLCSS as well (which will ultimately be used with PDFio when I get around to doing a greatly enhanced version of HTMLDOC...)