DavBfr / dart_pdf

Pdf creation module for dart/flutter
https://pub.dev/packages/pdf
Apache License 2.0
1.42k stars 632 forks source link

Expose `TtfWriter` in public API? #1738

Closed tdenniston closed 2 months ago

tdenniston commented 2 months ago

Is your feature request related to a problem? Please describe.

I'm using this library for PDF generation as well as its font handling capabilities. I currently face a need to produce subset TTFs for another use orthogonal to my use of PDF generation. This library has already implemented the functionality in the internal TtfWriter class, and it would be excellent if it could be exposed to the public API as a counterpart to the already available TtfParser.

Describe the solution you'd like

Simply export the TtfWriter class to the public API. In my opinion this is a reasonable API to expose, as it forms the symmetrical counterpart to TtfParser.

Describe alternatives you've considered

Writing my own TTF subsetter, or forking this project to expose the API. Neither of these are preferable for me since the functionality already exists here.

tdenniston commented 2 months ago

Upon further experimentation, the subsetter in this package may be more specific to PDF than I initially thought, and so it likely does not make sense to make it available for general use.