Skip to content

Crop the hex logo to the artwork bounds - #1225

Open
sbfnk-bot wants to merge 1 commit into
mainfrom
crop-hex-logo
Open

Crop the hex logo to the artwork bounds#1225
sbfnk-bot wants to merge 1 commit into
mainfrom
crop-hex-logo

Conversation

@sbfnk-bot

@sbfnk-bot sbfnk-bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This PR closes #1224.

man/figures/logo.png was 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.R is commented out in full and notes that the final sticker was hand-edited afterwards. Uncommenting it and setting white_around_sticker = FALSE does 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.

Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
@sbfnk-bot
sbfnk-bot requested a review from sbfnk August 25, 2026 10:14
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.38%. Comparing base (ee3934b) to head (d86c848).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbfnk
sbfnk marked this pull request as ready for review August 25, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hex logo has a transparent border around it

2 participants