Download the PHP package linkrobins/font-sizer without Composer

On this page you can find all versions of the php package linkrobins/font-sizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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

How it works

The reading text size 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 <html> 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, multiply each target's base size by the variable:

Base sizes

The pixel bases the scale multiplies are themselves configurable, because a theme's font may want different starting sizes than Flarum's stock 14px (many serif fonts render optically smaller at the same px size). Three base variables cover the reading-text targets:

Variable Default Applies to
--lr-text-base 14px Post bodies, mobile discussion-list titles
--lr-text-small 12px Excerpts
--lr-text-title 16px Heroes and desktop list titles (the desktop hero derives from it at the historical 16:22 ratio)

There are two ways to set them:

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 changes their size, and they are inert at the default size.

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

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:

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

Installation

Compatibility

License

MIT


All versions of font-sizer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package linkrobins/font-sizer contains the following files

Loading the files please wait ...