On Fri, 11 Nov 2016 12:27:25 +0100
Arie van Wingerden <xapw...@gmail.com> wrote:

> when I use AddFont I need a font specification in JSON format.
> But I really have no idea what should go in such a JSON file.
> 
> I had this:
> 
>   pdf.AddFont("Ravie", "B", "c:\\windows\\fonts\\RAVIE.TTF")
> 
> which is obviously wrong, since it only points to the font location
> in Windows.

Aren't they what's located in the "font" directory of the fpdf project's
root?  For instance, see [1].

Since AFAIK fpdf is a rather direct port of the PHP project with the
same name to Go, I think researching the docs of that source projects
could help to understand what fpdf for Go expects to see, and which are
other ways to specify fonts.

In addition, I can see that [2] refers to [3] for examples and provides
other useful pointers.

1. https://github.com/roblillack/gofpdf/blob/master/font/times.json
2. https://github.com/roblillack/gofpdf/blob/master/doc.go
3. https://github.com/roblillack/gofpdf/blob/master/fpdf_test.go

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to