PHPackages                             wcactus/typographru - 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. wcactus/typographru

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wcactus/typographru
===================

Laravel 5 screen typography module for russian language

1.0.0(7y ago)016MITPHPPHP &gt;=5.3

Since Sep 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/wcactus/typographru)[ Packagist](https://packagist.org/packages/wcactus/typographru)[ RSS](/packages/wcactus-typographru/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel 5 screen typography module for russian language
=======================================================

[](#laravel-5-screen-typography-module-for-russian-language)

### Usage / Demonstration

[](#usage--demonstration)

For unicode text:

```
$input = 'Falcon Heavy (букв. с англ. "Тяжёлый "Сокол"") - американская ракета-носитель (РН) сверхтяжёлого  класса с возможностью повторного использования 1-й ступени , спроектированная и произведённая-таки компанией SpaceX...';
echo TypographRu::typograph($input);
/*
output (with nonbreaking spaces, nonbreaking dashes and other special unicode symbols):
Falcon Heavy (букв. с англ. «Тяжёлый „Сокол“») – американская ракета-носитель (РН) сверхтяжёлого класса с возможностью повторного использования 1‑й ступени, спроектированная и произведённая‑таки компанией SpaceX…
*/
```

The screen typography is best viewed here for win-1251-encoded text:

```
$input = 'Falcon Heavy (букв. с англ. "Тяжёлый "Сокол"") - американская ракета-носитель (РН) сверхтяжёлого  класса с возможностью повторного использования 1-й ступени , спроектированная и произведённая-таки компанией SpaceX...';
echo TypographRu::typograph($input);
/*
output:
Falcon Heavy (букв. с&nbsp;англ. &laquo;Тяжёлый &bdquo;Сокол&ldquo;&raquo;)&nbsp;&ndash; американская ракета-носитель (РН) сверхтяжёлого класса с&nbsp;возможностью повторного использования 1-й ступени, спроектированная и&nbsp;произведённая-таки компанией SpaceX&hellip;
*/
```

### Installation

[](#installation)

Add TypographRu to your Laravel project: `composer require wcactus/typographru`

Facade and service provider will be autoloaded.

The middle-length dash (the same as *&amp;ndash;* HTML entity) is used by default. If you prefer the longest dash (the same as *&amp;mdash;* HTML entity), you need to publish configuration file info config/typographru.php using `php artisan vendor:publish --tag=typographru` command and then set *use\_mdash* configuration property to *true*.

### Methods

[](#methods)

**TypographRu::typograph(string $text, \[string $language = null, \[boolean $forceQuotes = true\]\])**

Applies screen typography to unicode string. It is assumed that all special characters in the source string are represented by unicode characters, rather than HTML entities. If some HTML entities are used as special characters, they will be converted to unicode characters (except of non-typography-specific entities). All changes in the returned string are performed using unicode characters.

**string $text**: text to typograph.

**string $language**: Optional. Can be *TypographRu::LANGUAGE\_RU*, *TypographRu::LANGUAGE\_EN* or null (i.e. auto-detect russian language). Affects only the kind of quotation marks, the screen typography does not fully applied to the english language. May be useful in multilanguage websites.

**boolean $forceQuotes**: Optional. If true, the previously placed «correct» quotes will be re-placed again.

**TypographRu::typographWin1251(string $text, \[string $language = null, \[boolean $forceQuotes = true\]\])**

Applies screen typography to win-1251-encoded string. It is assumed that all special characters in the source string are represented by HTML entities due to the limitations of Win-1251 encoding. All changes in the returned string are performed using HTML entities.

**string $text**: text to typograph.

**string $language**: Optional. Can be *TypographRu::LANGUAGE\_RU*, *TypographRu::LANGUAGE\_EN* or null (i.e. auto-detect russian language). Affects only the kind of quotation marks, the screen typography does not fully applied to the english language. May be useful in multilanguage websites.

**boolean $forceQuotes**: Optional. If true, the previously placed «correct» quotes will be re-placed again.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

2838d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14895107?v=4)[wcactus](/maintainers/wcactus)[@wcactus](https://github.com/wcactus)

---

Top Contributors

[![wcactus](https://avatars.githubusercontent.com/u/14895107?v=4)](https://github.com/wcactus "wcactus (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wcactus-typographru/health.svg)

```
[![Health](https://phpackages.com/badges/wcactus-typographru/health.svg)](https://phpackages.com/packages/wcactus-typographru)
```

PHPackages © 2026

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