forked from andre487/php_rutils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypoRules.php
More file actions
38 lines (29 loc) · 1.17 KB
/
TypoRules.php
File metadata and controls
38 lines (29 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace php_rutils;
/**
* Rules for Typo::typography
* Class TypoRules
* @package php_rutils
*/
class TypoRules
{
//Clean double spaces, trailing spaces, heading spaces,
const CLEAN_SPACES = 'CleanSpaces';
//Replace three dots to ellipsis
const ELLIPSIS = 'Ellipsis';
//Replace space between initials and surname by thin space
const INITIALS = 'Initials';
//Replace dash to long/medium dashes
const DASHES = 'Dashes';
//Glue (set nonbreakable space) short words with word before/after
const WORD_GLUE = 'WordGlue';
//Replace +-, (c), (tm), (r), (p), etc by its typographic equivalents
const MARKS = 'Marks';
//Replace quotes by typographic quotes
const QUOTES = 'Quotes';
//Standard rules: quotes, marks, dashes, clean spaces
public static $STANDARD_RULES = array(self::QUOTES, self::MARKS, self::DASHES, self::CLEAN_SPACES);
//Standard rules: quotes, marks, word glue, dashes, initials, ellipsis, clean spaces
public static $EXTENDED_RULES = array(self::DASHES, self::QUOTES, self::MARKS, self::ELLIPSIS,
self::CLEAN_SPACES, self::INITIALS, self::WORD_GLUE,);
}