-
Notifications
You must be signed in to change notification settings - Fork 38.7k
build: proper fix for the kerning issue in macOS build fixes #16836 #17273
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
Conversation
promag
left a comment
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.
Should just replace width and height attributes with viewBox?
contrib/macdeploy/background.svg
Outdated
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.
Why this change?
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.
@promag - according to documentation the scaling/aspect ratio is taken care of in the
preserveAspectRatio flag in
LINE:4
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1000pt" height="640pt" viewBox="0 0 1000 640" preserveAspectRatio="xMidYMid meet">https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
Meet or slice reference
The meet or slice reference is optional and, if provided, must be one of the following keywords:
meet (the default) - Scale the graphic such that:
aspect ratio is preserved
the entire viewBox is visible within the viewport
the viewBox is scaled up as much as possible, while still meeting the other criteria
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.
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.
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.
@promag - now that I have a better understanding of how to configure this - it is now more of an aesthetic choice than dealing with a kerning issue. In fact I plan to rework the whole presentation in a later PR - I just want to fix the glaring issue now - then focus on a better presentation later.
promag
left a comment
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.
Can you avoid the indentation change?
Yes, let's do the minimal change to fix the issue. This shouldn't need to go through multiple iterations and bikeshedding PRs. 😄 |
|
Part of the issue with this is - the previous version of this file isn't valid svg. Anyway here is the result of the PR rebuilt and minimized diffs. @laanwj @promag - I pushed a diff minimized commit. NOTE: https://travis-ci.org/RandyMcMillan/bitcoin/jobs/604022209 My original PR was passing. That is part of the problem I am trying to fix. |
|
Hmm, I think the whitespace lint is over-eager here, it should probably ignore image files. |


After reading the librsvg documentation I realized that the svg settings were confusing the library.
In this case it is best to set view box dimensions.
The documentation states:
If there are no width or height attributes in the toplevel - librsvg looks for the viewBox attribute. If present, this defines the aspect ratio and a "natural" size in pixels.
https://developer.gnome.org/rsvg/stable/ch02.html#id-1.2.4.2.6
LINE:4 Buy omitting the width and height attribs - we allow the librsvg to do its own interpretation in context.
LINE:26-32 By nesting the vector elements - we wrap the arrow into the text box. This keeps the arrow's coordinates relative to the text element.
LINE:29 Make the arrow grey to match the text.
Thanks for your patience while I researched this and found a proper fix!
RM