New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vg/vgsvg: make user units equivalent to points #507
Conversation
The font size problem could be solved if the font size is specified in user units. Currently a font size of 12pt is specified as "12pt". I suggest to specify it as "12". Logicaly it is the same since we now use points everywhere. But apparently svg makes an error when scaling the font. |
@sbinet ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo minor nitpick.
vg/vgsvg/vgsvg.go
Outdated
@@ -39,7 +35,7 @@ const ( | |||
type Canvas struct { | |||
svg *svgo.SVG | |||
w, h vg.Length | |||
dpi float64 | |||
// dpi float64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW Do you know what ht
is for. It is not used AFAICS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea :)
according to blame, @eaburns is the one who introduced it:
https://github.com/gonum/plot/blame/07f44254b21cff40a59809f4c926aa023286107d/vg/vgsvg/vgsvg.go
PTAL |
This should make us use points for user units, but it causes the text size to be too large.
Please take a look.
/cc @chmike