build: fix kerning issue with macOS .dmg background image #17143

pull RandyMcMillan wants to merge 1 commits into bitcoin:master from RandyMcMillan:16836 changing 5 files +23 −8
  1. RandyMcMillan commented at 11:07 pm on October 14, 2019: contributor

    Fixes: #16836

    The kerning issue for the .dmg background image originates in the css styling that is embedded in the background.svg file itself.

    This commit also updates the font family to Arial Black which is a common font on Macs. This commit was tested on macOS Mojave 10.14.6 (18G103). The change uses standard CSS styling. The change enables normal font kerning but the fix is actually accomplish with the letter-spacing attribute.

    Screen Shot 2019-10-14 at 7 01 27 PM

  2. fanquake added the label macOS on Oct 14, 2019
  3. fanquake added the label Build system on Oct 14, 2019
  4. fanquake renamed this:
    fix kerning issue #16836 for macOS .dmg background image
    build: fix kerning issue with macOS .dmg background image
    on Oct 15, 2019
  5. fanquake commented at 0:22 am on October 15, 2019: member

    I haven’t seen the kerning issue locally, so @dongcarl can chime in. However I’d suggest restricting the changes here to just what fixes the issue; I assume just the font change?

    Could you also use a commit message like the PR title, and remove the other text i.e On branch 16836 Changes to be committed:. Below is what the changes look like on my machine.

    master (dcc640811c8c1a0678a3c3726cb7df14f0a60250): master

    PR (ce4a7b40058497867f53ba71134780abd4484734): pr

  6. fanquake requested review from dongcarl on Oct 15, 2019
  7. laanwj commented at 5:28 am on October 15, 2019: member
    The distance between the letters in the “after” image looks strange to me.
  8. jonasschnelli commented at 12:41 pm on October 15, 2019: contributor

    Thanks for working on this.

    IMO “Arial Black” is the wrong font. The original font that was used in most other places (like bitcoincore.org) is “Helvetica Neue” (which is not available everywhere). Using “Arial” is probably the best substitute (not “Arial Black”).

    I guess this also not fixes #16836. See: #16836 (comment)

    I think one option would be to always convert the @2x image and then downscale the bitmap image (instead of converting the SVG with to different DPI values).

  9. fanquake added the label Waiting for author on Oct 15, 2019
  10. dongcarl commented at 8:49 pm on October 15, 2019: member

    Let’s investigate the kerning issue with upstream here: https://gitlab.gnome.org/GNOME/librsvg/issues/520, it seems to be more complicated than we think.

    Not a huge fan of down-scaling the bitmap image if we can avoid it.

    I believe we should restrict this PR to just changing “Tuffy” to “Arial”. One thing you might want to do is remove Tuffy from our gitian descriptor for osx.

  11. RandyMcMillan commented at 10:13 pm on October 15, 2019: contributor
    Thanks for the feed back @dongcarl.
  12. RandyMcMillan commented at 5:20 am on October 16, 2019: contributor

    Here is the result of a couple changes.

    Screen Shot 2019-10-16 at 1 12 33 AM

  13. jonasschnelli commented at 6:22 am on October 16, 2019: contributor
    @RandyMcMillan: you have change the font to “monospace”,… which is probably not what we want. I suggest you change it to “Arial” and remove “Tuffy” from the OSX gitian descriptor.
  14. dongcarl commented at 2:27 pm on October 16, 2019: member

    @RandyMcMillan Let’s do the following:

    1. Change “Tuffy” to “Arial”
    2. Remove this line

    Let’s not touch the font size or letter spacing

  15. RandyMcMillan commented at 4:02 pm on October 16, 2019: contributor

    @dongcarl & @jonasschnelli - Thanks for the feedback and I appreciate your guidance while I get little more familiar with the macOS build processes for local and gitian builds. I think it may be useful to summarize the issue better…

    Firstly, after some research I have realized that it is was a mistake to use Arial (or Helvetica) font families in my original PR. The issue is, due to their licensing, they aren’t available as Debian/Ubuntu packages and cannot be dynamically added to a Gitian build process (as far as I know).

    Arial License Helvetica License

    I don’t expect this to change and I suspect Debian/Ubuntu and other Linux distros will avoid using any “font software” the doesn’t have a compatible license in their packages.

    I have a good candidate for future macOS builds - fonts-liberation

    As you can see in the screen shot - fonts-liberation provides monospace, sans, and serif type faces. IMO this is a great choice moving forward & “Liberation Sans” looks very similar to fonts-tuffy anyway. :)

    I am currently configuring a VM so that I can test the whole macOS build process for local and Gitian. What I thought was going to be pretty simple edit has turned into much more. @dongcarl - I did see your post about librsvg - and I am in agreement that this is a macOS issue and not a library issue. I will also research this (Fix macOS Mojave Font Rendering Issue) more as well. @jonasschnelli - I will definitely add the correct font to the gitian build once some of these things get ironed out. Thanks again for your feedback, fonts-liberation was created to fill this exact niche with Linux users that wanted a Times, Arial or Courier font face.

    RM

    https://github.com/bitcoin/bitcoin/commit/63bcdc5227578015870c1eedc8c59861e9734971#diff-8552c751b30ae0c0bbb7a7994e13a986

  16. dongcarl commented at 7:35 pm on October 18, 2019: member
    @RandyMcMillan After looking at it more carefully, I believe fonts-liberation might be a good choice. It seems to be available in most major distros and even homebrew has homebrew/cask-fonts/font-liberation-sans Could you update the PR?
  17. RandyMcMillan commented at 7:37 am on October 20, 2019: contributor

    @dongcarl This presentation looks good IMO. I hope you agree.

    Screen Shot 2019-10-20 at 3 14 39 AM

  18. build: fix kerning issue for macOS .dmg background image
    fonts-liberation is good choice for cross platform dev
    and it is available in packages for Linux and macOS.
    
    font-family within the .svg is set to "Liberation Mono"
    and monospace. If fonts-libertation isn't present on the
    build machine it will default too another monospaced font.
    Also in the background.svg file I changed the color of
    the arrow to match the text color of gray.
    
    custom_dsstore.py and macdeployqtplus contained redundant
    setttings for the bundler. These changes allow for the
    fancy.plist to be the only source of the icon positions,
    sizes as well as windowbounds settings. This is much
    easier to maintain and configure. I added settings for
    .fseventds and the .background folders as well - if
    the hidden files are shown by the system, they look orderly.
    253b34be9d
  19. DrahtBot commented at 7:59 am on October 20, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17099 (depends: Eliminate hard dependency on Ubuntu-ABI specific clang by dongcarl)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  20. fanquake removed the label Waiting for author on Oct 24, 2019
  21. RandyMcMillan commented at 1:25 am on October 27, 2019: contributor
    @fanquake - I am researching a more prudent fix. There has to be a better way.
  22. RandyMcMillan commented at 11:04 am on October 27, 2019: contributor
    I found a proper fix. I will submit in a new PR.
  23. RandyMcMillan closed this on Oct 27, 2019

  24. RandyMcMillan commented at 11:38 am on October 27, 2019: contributor
  25. RandyMcMillan deleted the branch on Nov 2, 2019
  26. fanquake locked this on Aug 14, 2020

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me