No TTF font file bundled or documented for image text overlay #50

Closed
opened 2026-06-21 14:54:46 +00:00 by jmiller · 2 comments
Owner

Problem

ImageGenerator.php requires a TTF font file for text overlay on generated OG images, but:

  • No font file is included in the package
  • No documentation describes where to place a font or how to configure the path
  • No fallback behavior when the font is missing

Fix

Either:

  1. Bundle a permissively-licensed font (e.g., Open Sans, Noto Sans — both Apache 2.0 / OFL compatible with GPL-3.0)
  2. Or document the required configuration and add a validation check with admin warning when font is missing

File

  • source/packages/plg_system_mokoog/src/Helper/ImageGenerator.php
## Problem `ImageGenerator.php` requires a TTF font file for text overlay on generated OG images, but: - No font file is included in the package - No documentation describes where to place a font or how to configure the path - No fallback behavior when the font is missing ## Fix Either: 1. Bundle a permissively-licensed font (e.g., Open Sans, Noto Sans — both Apache 2.0 / OFL compatible with GPL-3.0) 2. Or document the required configuration and add a validation check with admin warning when font is missing ## File - `source/packages/plg_system_mokoog/src/Helper/ImageGenerator.php`
jmiller added the documentationproduction-readiness labels 2026-06-21 14:54:46 +00:00
Author
Owner

Branch created: feature/50-no-ttf-font-file-bundled-or-documented-f

git fetch origin
git checkout feature/50-no-ttf-font-file-bundled-or-documented-f
Branch created: [`feature/50-no-ttf-font-file-bundled-or-documented-f`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteOpenGraph/src/branch/feature/50-no-ttf-font-file-bundled-or-documented-f) ```bash git fetch origin git checkout feature/50-no-ttf-font-file-bundled-or-documented-f ```
Author
Owner

Closing — ImageGenerator::generate() is never called anywhere in the codebase. The class exists but isn't wired into any workflow, so no TTF font is actually needed at runtime. The font path is a parameter to generate(), so when/if a caller is added, the caller will need to provide the font. The generator already logs a clear warning if the font is missing (#49).

Closing — `ImageGenerator::generate()` is never called anywhere in the codebase. The class exists but isn't wired into any workflow, so no TTF font is actually needed at runtime. The font path is a parameter to `generate()`, so when/if a caller is added, the caller will need to provide the font. The generator already logs a clear warning if the font is missing (#49).
Sign in to join this conversation.
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteOpenGraph#50