PHPackages                             linkrobins/font-sizer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. linkrobins/font-sizer

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

linkrobins/font-sizer
=====================

Accessibility-focused font size controls for Flarum 2.0. Users can adjust reading text size and interface size via a header button, with preferences saved in cookies. Admins set sitewide defaults from the extension settings.

v1.4.0(1mo ago)2619↓30%MITPHP ^8.3

Since May 1Compare

[ Source](https://github.com/linkrobins/font-sizer)[ Packagist](https://packagist.org/packages/linkrobins/font-sizer)[ RSS](/packages/linkrobins-font-sizer/feed)WikiDiscussions Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (20)Used By (0)

Link Robins Font Sizer
======================

[](#link-robins-font-sizer)

A Flarum 2.0 extension that gives users accessibility-focused font size controls directly in the forum header — no CSS editing required. Admins set sitewide defaults; users override them with their own preferences, saved in cookies.

Features
--------

[](#features)

- **Header button** — a `fa-text-height` icon in the forum header opens a modal for all users, including guests
- **Reading text slider** — scales post body text and discussion titles from 100% to 150% in 5% increments
- **Interface size toggle** — Default or Large (115%) mode for navigation, buttons, and other UI elements
- **Cookie persistence** — preferences are saved for 1 year so returning visitors keep their settings
- **Admin defaults** — set a sitewide default for both reading text size and interface size from the extension settings page
- **Live preview** — the admin panel previews changes as you drag the slider
- **Debounced save** — settings save 500ms after you stop dragging to prevent API conflicts
- **Theme agnostic** — uses Flarum CSS variables throughout; works on all light and dark themes

How it works
------------

[](#how-it-works)

The reading text slider runs from **100%** (Flarum default) to **150%** in 5% increments. The interface size toggle offers **Default** or **Large** (115%). Both values are stored as cookies (`lr_text_scale` and `lr_ui_size`) on the user's browser. If no cookie exists, the user sees whatever the admin has configured as the sitewide default.

Admin defaults are saved to Flarum's settings table under `linkrobins-font-sizer.scale` and `linkrobins-font-sizer.ui`, and served to the forum frontend in the page payload.

When a user picks a non-default size, the extension sets two CSS custom properties (`--lr-text-scale` and `--lr-ui-scale`) on the `` element and toggles a gate class (`lr-text-scaling` / `lr-ui-scaling`). At the default size both are removed, so the theme renders untouched. The shipped rules, gated behind those classes, then multiply each target by the variable:

```
html.lr-text-scaling .Post-body { font-size: calc(14px * var(--lr-text-scale)); }
```

Extending it to your own content
--------------------------------

[](#extending-it-to-your-own-content)

Out of the box the extension scales core's reading text (post bodies, titles, excerpts) and interface chrome. Because text set in pixels can only be scaled by the element that owns it, content from other extensions opts in explicitly. There are two ways, and both are live: they update as the user drags the slider, and they are inert at the default size.

**1. Add a class** to your readable-content root or chrome element:

```
// readable content (article bodies, chat messages, custom posts)
m('div', { className: 'MyExtension-body FontSizer-text' }, ...)

// interface chrome (custom nav items, toolbars)
m('button', { className: 'Button FontSizer-ui' }, ...)
```

**2. Or reference the variables** directly in your own LESS/CSS, with a fallback of `1` so nothing changes when the extension is absent or at its default:

```
.MyExtension-body { font-size: calc(1em * var(--lr-text-scale, 1)); }
```

Use `--lr-text-scale` for reading content and `--lr-ui-scale` for interface elements.

Installation
------------

[](#installation)

```
composer require linkrobins/font-sizer

```

Compatibility
-------------

[](#compatibility)

- Flarum 2.0 RC1+
- No dependencies beyond `flarum/core`

License
-------

[](#license)

MIT

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

19

Last Release

30d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/213107296?v=4)[Link Robins](/maintainers/linkrobins)[@linkrobins](https://github.com/linkrobins)

### Embed Badge

![Health badge](/badges/linkrobins-font-sizer/health.svg)

```
[![Health](https://phpackages.com/badges/linkrobins-font-sizer/health.svg)](https://phpackages.com/packages/linkrobins-font-sizer)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59120.6k14](/packages/fof-byobu)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k7](/packages/fof-discussion-language)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/masquerade

User profile builder extension for your Flarum forum.

2025.4k6](/packages/fof-masquerade)[michaelbelgium/mybb-to-flarum

Migrate a MyBB Forum to a fresh Flarum instance

261.1k](/packages/michaelbelgium-mybb-to-flarum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
