Crop the hex logo to the artwork bounds - #1225
Open
sbfnk-bot wants to merge 1 commit into
Open
Conversation
Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1225 +/- ##
=======================================
Coverage 98.38% 98.38%
=======================================
Files 41 41
Lines 2235 2235
=======================================
Hits 2199 2199
Misses 36 36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sbfnk
approved these changes
Aug 25, 2026
sbfnk
marked this pull request as ready for review
August 25, 2026 10:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR closes #1224.
man/figures/logo.pngwas a 900×900 square canvas with the hexagon inscribed and a transparent border around it, so the hexagon filled only 82% of the image width.Cropped to the alpha bounding box (738×838) and padded symmetrically back to 738×852, a height/width ratio of 1.1545 against the ideal 1.1547 for a pointy-top hexagon.
No pixel of the sticker itself changes — this removes the empty border only.
One knock-on worth checking: the README sets a fixed
height="175", so the visible hexagon there gets correspondingly larger now the border is gone. That looked right to me, since the sticker previously rendered smaller than the space it reserved, but it is a visible change to the README header and easy to offset by lowering that height if preferred.On rebuilding instead
inst/make_hexsticker.Ris commented out in full and notes that the final sticker was hand-edited afterwards. Uncommenting it and settingwhite_around_sticker = FALSEdoes produce a correctly proportioned sticker — 2074×2400, hexagon filling 98% of the width — and makes the magick flood-fill block redundant, since there is then no white square to erase.The reason this PR crops instead is that the rebuilt sticker is visibly a different logo: thinner border, lighter wordmark, visible axis ticks and gridlines, brighter bars, paler background. Those are the hand edits. Rebuilding would replace the logo currently on CRAN, the pkgdown site and the README with a different one, which is a bigger change than a geometry fix should carry.
Worth recording separately that the logo cannot be regenerated from its own source script without changing the artwork.