All Projects → mundschenk-at → php-typography

mundschenk-at / php-typography

Licence: GPL-2.0 license
A PHP library for improving your web typography.

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to php-typography

hyphen-la
Latin ecclesiastic hyphenation patterns and resources
Stars: ✭ 18 (-71.43%)
Mutual labels:  hyphenation
Urbanist
Urbanist is a low-contrast, geometric sans-serif inspired by Modernist design and typography.
Stars: ✭ 374 (+493.65%)
Mutual labels:  typography
drawingwithcode
Drawing with code 😘
Stars: ✭ 28 (-55.56%)
Mutual labels:  typography
leiphp
轻量级的 PHP MVC 框架 Lightweight MVC framework for simplistic PHP apps
Stars: ✭ 30 (-52.38%)
Mutual labels:  composer-package
ArtisanUI
CLI UI for Laravel Artisan. https://medium.com/@vlreshet/cli-interface-for-laravel-artisan-4efbcc7d3e5d [en] https://habr.com/ru/post/485952/ [ru]
Stars: ✭ 31 (-50.79%)
Mutual labels:  composer-package
typography-karaoke
Demonstrating Typography via Karaoke-style cues using HTML5 Audio/Video and WebVTT
Stars: ✭ 15 (-76.19%)
Mutual labels:  typography
Plumber Sass
Easy baseline grid with SASS
Stars: ✭ 253 (+301.59%)
Mutual labels:  typography
laravel-sentiment-analysis
A Laravel wrapper to perform sentiment analysis over an English sentence
Stars: ✭ 41 (-34.92%)
Mutual labels:  composer-package
birman-typography-layouts-for-ubuntu
Типографские раскладки Ильи Бирмана для Ubuntu
Stars: ✭ 73 (+15.87%)
Mutual labels:  typography
encryptable
Laravel package for persisting encrypted Model properties, providing decryption when accessed.
Stars: ✭ 26 (-58.73%)
Mutual labels:  composer-package
underpin
A WordPress Framework that makes building scale-able plugins and themes easier.
Stars: ✭ 84 (+33.33%)
Mutual labels:  composer-package
Tehreer-Android
Standalone text engine for Android aimed to be free from platform limitations
Stars: ✭ 61 (-3.17%)
Mutual labels:  typography
php-domainrobot-sdk
A composer package for easy integration of the Domainrobot API powered by InterNetX GmbH.
Stars: ✭ 17 (-73.02%)
Mutual labels:  composer-package
openimmo
OpenImmo library
Stars: ✭ 36 (-42.86%)
Mutual labels:  composer-package
easydock
Dockerize your PHP apps ;)
Stars: ✭ 52 (-17.46%)
Mutual labels:  composer-package
hyphenation
Text hyphenation for Rust
Stars: ✭ 43 (-31.75%)
Mutual labels:  hyphenation
responsive type
A one size fits all responsive type solution. Demo: https://codepen.io/kylevilleneuve/pen/XqeVdZ
Stars: ✭ 53 (-15.87%)
Mutual labels:  typography
fdiff
An OpenType table diff tool for fonts. Based on the fontTools TTX format.
Stars: ✭ 33 (-47.62%)
Mutual labels:  typography
theme-ui-native
Build consistent, themeable React Native apps based on constraint-based design principles
Stars: ✭ 67 (+6.35%)
Mutual labels:  typography
standard-components
A specification for functional UI components
Stars: ✭ 52 (-17.46%)
Mutual labels:  typography

PHP-Typography

Build Status Latest Stable Version Quality Gate Status Coverage License

A PHP library for improving your web typography:

  • Hyphenation — over 50 languages supported
  • Space control, including:
    • widow protection
    • gluing values to units
    • forced internal wrapping of long URLs & email addresses
  • Intelligent character replacement, including smart handling of:
    • quote marks (‘single’, “double”)
    • dashes ( – )
    • ellipses (…)
    • trademarks, copyright & service marks (™ ©)
    • math symbols (5×5×5=53)
    • fractions (116)
    • ordinal suffixes (1st, 2nd)
  • CSS hooks for styling:
    • ampersands,
    • uppercase words,
    • numbers,
    • initial quotes & guillemets.

Requirements

  • PHP 7.4.0 or above
  • The mbstring extension

Installation

The best way to use this package is through Composer:

$ composer require mundschenk-at/php-typography
$ vendor/bin/update-iana.php

Basic Usage

  1. Create a Settings object and enable the fixes you want.
  2. Create a PHP_Typography instance and use it to process HTML fragments (or whole documents) using your defined settings.
$settings = new \PHP_Typography\Settings();
$settings->set_hyphenation( true );
$settings->set_hyphenation_language( 'en-US' );

$typo = new \PHP_Typography\PHP_Typography();

$hyphenated_html = $typo->process( $html_snippet, $settings );

Roadmap

Please have a look at ROADMAP file for upcoming releases.

License

PHP-Typography is licensed under the GNU General Public License 2 or later - see the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].