Re: Plotinum SVG Font problems in Vegeta

16 views
Skip to first unread message

Ethan Burns

unread,
Sep 8, 2013, 5:52:18 PM9/8/13
to Tomás Senart, plotinum...@googlegroups.com

Hi Tomás,

+plotinum-discuss

I'm glad that you found Plotinum to be helpful.

Plotinum includes some data files, specifically it includes some true type fonts (see plotinum/vg/fonts).  When you "install" Plotinum with go get, these files are put in a place where Plotinum can find them, since they are checked out with the source repository into your go path. If you want to distribute a binary that imports Plotinum, however, then you need to distribute these files yourself, and you need to tell Plotinum where they are by either setting vg.FontDirs before using Plotinum or by setting the environment variable VGFONTPATH.

Hope this helps.

Best,
Ethan

On Sep 8, 2013 5:18 PM, "Tomás Senart" <tse...@gmail.com> wrote:
Hello Ethan,

First of all thank you for building Plotinum. It made it really easy to add ploting capabilities to Vegeta.

Some users of my tool are, however, running into issues with runtime dependencies on fonts with SVG rendering.
You can have a look at the error message here: https://github.com/tsenart/vegeta/issues/12#issuecomment-23582446

Would be so kind as to let me know what is the best way to move forward in fixing this?

Thank you,
Tomás


Tomás Senart

unread,
Sep 8, 2013, 6:28:16 PM9/8/13
to Ethan Burns, plotinum...@googlegroups.com
Hello Ethan,

Thanks for the quick reply!

Is there a way for plotinum to fallback to a default system font? I rather not ask my users to, besides downloading a pre-compiled binary, also install some special fonts and start the program with a env variable that points to those.

Tomás

Ethan Burns

unread,
Sep 8, 2013, 6:33:07 PM9/8/13
to Tomás Senart, plotinum...@googlegroups.com

This is a hard problem (I think that it is described in the Plotinum issue referenced in the github issue that you linked in your original email), and I have no good solution for it. Basically, Plotinum needs specific fonts, not just any fonts. Unfortunately, the fonts that it uses are under the GPL, so they can't be embedded directly into the source either, they must be distributed separately.

Ethan

Tomás Senart

unread,
Sep 8, 2013, 10:26:42 PM9/8/13
to Ethan Burns, plotinum...@googlegroups.com
Are the restrictions on which fonts plotinum uses solely legal? Or are there technical nuances I am not aware of as well?

Ethan Burns

unread,
Sep 9, 2013, 8:27:01 AM9/9/13
to Tomás Senart, plotinum...@googlegroups.com
The legal restriction is simply a restriction preventing one very easy
solution to this problem: embedding the font data directly in the
Plotinum code. The main technical restriction preventing the use of
arbitrary fonts is that some of the output formats (EPS, and
PostScript, and possibly SVG, but I'm not really sure) don't support
arbitrary fonts unless the font data is embedded---I don't know how to
implement font embedding, and unfortunately I don't have time to learn
it right now either.



Ethan

Tomás Senart

unread,
Sep 9, 2013, 8:37:05 AM9/9/13
to Ethan Burns, plotinum...@googlegroups.com
As I see it, then, we could create this hard dependency on embeddable fonts only for the output formats that require it.
Whereas the other formats could use any font available on the system.
I am also rather certain that SVG doesn't need the font embedding and can indeed use system fonts.

Does this make sense? Please tell me if I am missing some context.

Tomás

Ethan Burns

unread,
Sep 10, 2013, 8:05:51 PM9/10/13
to Tomás Senart, plotinum...@googlegroups.com
Hi Tomás,

Sorry for the delayed reply. I've been busy with my new job.

On Mon, Sep 9, 2013 at 8:37 AM, Tomás Senart <tse...@gmail.com> wrote:
> As I see it, then, we could create this hard dependency on embeddable fonts
> only for the output formats that require it.
> Whereas the other formats could use any font available on the system.
> I am also rather certain that SVG doesn't need the font embedding and can
> indeed use system fonts.
>
> Does this make sense? Please tell me if I am missing some context.

I don't see any reasons that wouldn't work. I didn't do it, because I
wanted all of the vg back ends to be the same, none more blessed than
the others.


Ethan
Reply all
Reply to author
Forward
0 new messages