vg/vgsvg: add switch to embed fonts to SVG plot#705
Conversation
Codecov Report
@@ Coverage Diff @@
## master #705 +/- ##
==========================================
+ Coverage 71.91% 71.96% +0.04%
==========================================
Files 56 58 +2
Lines 4957 5272 +315
==========================================
+ Hits 3565 3794 +229
- Misses 1206 1281 +75
- Partials 186 197 +11
Continue to review full report at Codecov.
|
|
PTAL. |
kortschak
left a comment
There was a problem hiding this comment.
We still need docs for the case when the fonts aren't embedded, otherwise we are bound to see issues from people complaining about the effect that I show in this comment.
kortschak
left a comment
There was a problem hiding this comment.
Sorry, I missed these, but the golden files need regeneration anyway.
|
PTAL. I've added a simple mechanism that should preserve the old behaviour when relying on the |
|
No, that doesn't fix the issue. |
|
(sorry, comments/PRs crossed each others... PS4 should address your latest comments) |
|
ok. I'll remove the mechanism and add a comment linking to the example, then. where should I hang it? |
|
I would suggest that there also be documentation for installation of the liberation fonts, both in the package-level docs and in a README for the package. |
|
installing fonts is widely OS (flavour) dependent... (and I actually don't know how to install fonts on darwin nor Windows nor *BSDs...) (alternatively, we could switch to "embed-fonts=true", like for PDFs: this would make |
|
Yeah, I think just embedding it probably the right thing to do. I just checked my install and I do have them installed, so even then we can't guaranteed the correct behaviour. |
|
PTAL |
kortschak
left a comment
There was a problem hiding this comment.
The fonts in the originally incorrectly rendering fonts are still incorrectly rendering, but this has gone on long enough, so I'll approve.
|
ok. thanks. out of curiosity, what's your setup? (browser, OS) |
|
(the force-push is just to lump the |
|
ff89.0.1 on ubuntu 18.04.4. |
|
aha! it seems that the culprit is specifying
instead of, say: let me see if there isn't some deeper flaw at work... |
|
aha! I'll fix that. |
If it works with that, then SGTM |
|
PTAL. now |
This CL drops the use of the internal fontMap that was associating some pre-defined set of fonts with a set of SVG naming schemes (derived from PostScript). Instead, use the informations contained in plot/font.Font to derive the expected SVG font-family (and friends) font style string. Updates gonum#702.
|
PTAL (just rebased off the new |
Fixes #703.