Configuration
Fountain is designed to be flexible, much like Kirby CMS. Parts are even available to override via the panel. For example, a specific font might prefer another subset when generating trial font. Via panel you can change it, upload that specific font and change it back after.
All configuration options need to be prefixed with nymarktype.fountain for example:
return [
'nymarktype.fountain' => [
'trial' => true,
],
]
Cascading order for configuration options looks like this (high to low):
| Order | Config |
|---|---|
| 1. | Website settings, via Panel. |
| 2. | Site config, via config.php |
| 3. | Plugin defaults |
Website settings
Some settings are available in the dashboard.
Trial
| Setting | Info |
|---|---|
| Generate trials | Turn on/off, e.g. before you upload a font without trial |
| Trial subset | Custom subset, e.g. before you upload a font without trial |
| Trial EULA | Link to a custom EULA for trials |
| Trial readme | Write a custom README for the trial, added as a README.txt on |
Order email
| Setting | Info |
|---|---|
| Subject | Subject of the order email |
Message in email after purchase. Available strings in template: {{ name }}, {{ orderId }}, {{ downloadUrl }}, {{ invoiceUrl }}, and {{ licensee }} |
Other
| Setting | Info |
|---|---|
| Font categories | Set up categories for fonts. |
Options in config.php
Thumbnail
return [
'nymarktype.fountain' => [
'thumb' => [
'text' => 'Ra',
'color' => '#fff',
'background' => '#000',
],
]
];
Paddle
return [
'paddle' => [
'vendorId' => null,
'apiKey' => null,
'apiUrl' => null,
'notificationKey' => [
'transaction' => null,
'adjustment' => null,
],
],
];
Checkout
return [
'checkout' => [
'customFields' => [
'campaign_id' => '',
],
],
];
Currency
return [
'nymarktype.fountain' => [
'currency' => [
'code' => 'EUR',
'before' => true,
'decimal' => true,
'symbol' => '€',
],
]
];
Other
return [
'nymarktype.fountain' => [
'trials' => true, // auto generate trials
'webfonts' => true, // auto generate woff2
'subset' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,-', // subset trial fonts
'download-prefix' => 'fountain', // prefix when zip is downloaded, e.g. "fountain-[ordernumber].zip
// technical, only change if you know what you’re doing
'separator' => '|',
]
];
Slugs and mutliple languages
In Fountain, slugs are part of the translations and therefore reside in language files. Fountain supports multiple languages out of the box, with English set as the default. Do not embed language codes in slugs; Kirby’s routing system automatically handles the language prefixes, and you can disable this feature on a per‑language basis if desired.
If you want /en/cart instead of /cart for English, change the language file:
'url' => '/en',
return [
'nymarktype.fountain.slug.cart' => 'cart',
'nymarktype.fountain.slug.cart-add' => 'cart/add',
'nymarktype.fountain.slug.cart-remove' => 'cart/remove',
'nymarktype.fountain.slug.cart-success' => 'cart/thank-you',
'nymarktype.fountain.slug.checkout' => 'cart/checkout',
'nymarktype.fountain.slug.account' => 'account',
'nymarktype.fountain.slug.account-login' => 'account/login',
'nymarktype.fountain.slug.account-logout' => 'account/logout',
'nymarktype.fountain.slug.account-delete' => 'account/delete',
'nymarktype.fountain.slug.download-order' => 'download/order/(:any)',
'nymarktype.fountain.slug.download-trial' => 'download/trial/(:any)',
'nymarktype.fountain.slug.invoice' => 'invoice/(:any)',
];
The best way is to copy the language file to e.g. site/languages/en.php to make sure you’re not missing any strings. For extra protection, I suggest merging with the plugin language file:
'translations' => array_merge(
require __DIR__ . '/../plugins/fountain/languages/en.php',
[
'nymarktype.fountain.account.login.title' => 'Login',
'nymarktype.fountain.cart.title' => 'Your cart',
]
),