gofpdf icon indicating copy to clipboard operation
gofpdf copied to clipboard

Composite Fonts

Open d1ngd0 opened this issue 6 years ago • 7 comments

currently only simple fonts are allowed, and any attempt to render using a composite font will just drop anything outside the 256 glyphs. I have been digging into Composite fonts here and have also dug into TCPDF's addTTFfont method. I was considering trying to port that method over here in the following weeks. I figured I would open a dialog with you first to see if you had any other options in mind to enable this.

d1ngd0 avatar Jan 10 '19 19:01 d1ngd0

Thanks for your offer to help in fixing gopdf's most glaring limitation. I'm not too familiar with composite fonts but they appear to be a pre-Unicode attempt to deal with fonts having more than 256 glyphs. Two concerns:

  • Might it be more future-proof to implement a Unicode solution than a CID solution?
  • Using code from TCPDF would require gofpdf to give up its use of the MIT license. See some of my recent notes about Unicode in #168, in particular some thoughts about applying gofpdf's API to a PDF package that already supports Unicode.

jung-kurt avatar Jan 10 '19 21:01 jung-kurt

https://github.com/signintech/gopdf/issues/98 I reached out to the author of gopdf so he can pull code if he wants.

I have been making some good progress, I feel like this will be a good way of moving forward. Just wanted to jump in here quick and let you know I am still working on this. I am working on Templates now. So far I have not been creating any tests, that is next on the list after templates. I can put together some kind of strategy after those are done, then maybe we can pull some other people in.

d1ngd0 avatar Jan 25 '19 16:01 d1ngd0

All good! Thanks for the update.

I can put together some kind of strategy after those are done, then maybe we can pull some other people in.

Good plan.

jung-kurt avatar Jan 25 '19 17:01 jung-kurt

Templates are done. I will likely get a plan moving forward written up today and put it here. Then do you have any preferences on where the code should be managed? At some point I assume you will pull my branch over without merging it.

d1ngd0 avatar Jan 31 '19 14:01 d1ngd0

Templates are done.

Super!

Then do you have any preferences on where the code should be managed? At some point I assume you will pull my branch over without merging it.

If the plan is to have people begin using, testing and commenting on your new work, maybe I can just add a message and link from gofpdf's landing page to your repository. This way people can get right to your latest work.

I see that the gopdf maintainer is actively merging your changes, so it looks like all pieces are in place for that project to become the defacto PDF generator for Go. When you complete a roadmap, I can put it on gofpdf's landing page to let people know about that.

jung-kurt avatar Jan 31 '19 16:01 jung-kurt

How's this project going, @d1ngd0?

joewestcott avatar Mar 02 '19 21:03 joewestcott

I've gotten pulled off this temporarily because I needed to get some other internal projects done. I believe I got most of the harder things pulled over. At this point I really need to set up a roadmap and start getting external help to finish.

d1ngd0 avatar Mar 04 '19 02:03 d1ngd0