Twig Typography

This module provides a Twig filter which integrates the PHP Typography library and applies it to strings. An example use case is for protecting against widowed words in titles. This could be applied in the page-title.html.twig template like this:

<h1{{ title_attributes.addClass('page-title') }}>{{ title|typography }}</h1>

The PHP Typography library can do the following transformations:


Source: https://drupal.org/project/project_module/feed/all