gonum / plot

A repository for plotting and visualizing data
BSD 3-Clause "New" or "Revised" License
2.72k stars 202 forks source link

vg/vgpdf: add a per-package cache of PDF fonts #695

Closed sbinet closed 3 years ago

sbinet commented 3 years ago

This CL adds a package-wide, goroutine-safe cache of fonts data that can be re-used across vgpdf.Canvas values.

Fixes gonum/plot#694.

Please take a look.

sbinet commented 3 years ago

I don't understand why lint is failing (while trying to install cgo dependencies) whereas the ci builds don't.

kortschak commented 3 years ago

The only difference I can see between the two is that the ci build does an apt update. This should make any difference, but maybe try adding it? I note that the failure seen in the linting is real; I get a 404 trying to hit that from my laptop.

kortschak commented 3 years ago

Well, disturbingly, that fixed it.

sbinet commented 3 years ago

yeah... I've also s/apt install/apt-get install/.

¯\_(ツ)_/¯

(ah! I can't believe github doesn't render very well "shruggie" in normal mode and I have to go "verbatim"...)

kortschak commented 3 years ago

To shrug, you need to \\ to get a single \ and \_ to get a _. Complicated? ¯\_(ツ)_/¯ (In matrix, you can just \shrug to get it).