Skip to content

[#15] Mock asset deps: ext-imagick + bundled DejaVu font (U2)#25

Draft
joshuapease wants to merge 1 commit into
jp/15-asset-mock-featurefrom
jp/15-asset-mock-deps
Draft

[#15] Mock asset deps: ext-imagick + bundled DejaVu font (U2)#25
joshuapease wants to merge 1 commit into
jp/15-asset-mock-featurefrom
jp/15-asset-mock-deps

Conversation

@joshuapease

Copy link
Copy Markdown
Contributor

Second PR in the Mock Asset feature series (#15), stacked on #24 (base
branch jp/15-asset-mock-feature). Review/merge #24 first.

U2 adds the feature dependencies the generation work (U7+) needs.

What's here

  • Require ext-imagick in composer.json. No CI change needed — imagick
    is already in PHP_EXTENSIONS in both ci.yml and codecept.yml.
  • Bundle DejaVuSans.ttf (src/resources/fonts/) as the first link in the
    generator's font fallback chain, so text rendering works on slim images that
    lack system fonts. Ships in the Composer package (src/ is not
    export-ignored).
  • Bundle the font LICENSE alongside the .ttf, as the Bitstream Vera
    license requires the notice to accompany redistribution.
  • Mark *.ttf binary in .gitattributes so the repo's * text=auto rule
    can't LF-normalize (corrupt) the binary font.
  • Plan update: the U2 section now records full font provenance, checksums,
    and a license-compliance analysis.

Font provenance & license

  • DejaVu Sans 2.37, downloaded byte-for-byte from the official
    dejavu-fonts GitHub release
    (dejavu-fonts-ttf-2.37.tar.bz2), shipped unmodified.
    • TTF SHA-256: 7da195a74c55bef988d0d48f9508bd5d849425c1770dba5d7bfc6ce9ed848954
  • License: Bitstream Vera + Arev (recognized free/libre; SPDX
    Bitstream-Vera). Free to redistribute inside a larger software package,
    which is our case. Conditions satisfied: notice bundled, never sold
    standalone, shipped unmodified (no rename obligation). The font keeps its own
    license; it does not become MIT.

Testing

  • composer validate --no-plugins — manifest valid (the lock-file "out of
    date" note is expected; composer.lock is git-ignored, CI installs fresh).
  • git check-attr confirms the font ships (export-ignore: unspecified) and is
    binary-safe.
  • No PHP source changed, so PHPStan + ECS remain clean from [#15] Mock asset foundation: TDD plan + Assets service scaffold #24.

- Require ext-imagick (already present in CI PHP_EXTENSIONS, no workflow change)
- Bundle DejaVuSans.ttf (DejaVu 2.37, Bitstream Vera + Arev license) + its LICENSE
- Mark *.ttf binary in .gitattributes so LF normalization can't corrupt it
- Font ships in the Composer package (src/ is not export-ignored)
- Log font provenance, checksums, and license-compliance analysis in the plan
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.

1 participant