gofpdf icon indicating copy to clipboard operation
gofpdf copied to clipboard

Possible to embed font-awesome ? tried makefont utility

Open lundin opened this issue 8 years ago • 3 comments

Hi,

Tried to run this ../makefont/makefont --embed --enc=fa1.map fontawesome-webfont-fa1.ttf

Where fa1.mp was found here: https://www.deweyartdesign.com/wiki/code/fpdf

However it list all characters as missing. Is there a way to embed it somehow ?

Thanks!

lundin avatar Feb 14 '17 15:02 lundin

I am not sure why this doesn't work. The font appears to be well-formed and all of the character indices are below 256. When I get a moment, I'll dig into this. If you have time, pay attention to what happens here and here.

jung-kurt avatar Feb 14 '17 15:02 jung-kurt

Hi Kurt, In any event, it actually work even though the parse complain. If i just embed it. Will not close this yet until i have had a deeper look into your code (hinted above).

But i would like to say thanks for your wonderful work with this library! It is great!

pdf.AddFont("fontawesome-webfont", "", "fontawesome-webfont.json")
fontSize := 16.0
pdf.SetFont("fontawesome-webfont", "", fontSize)
str :=(string(32))

lundin avatar Feb 14 '17 22:02 lundin

Interesting -- thanks for the update.

jung-kurt avatar Feb 15 '17 10:02 jung-kurt