Last active
March 8, 2022 11:14
-
-
Save animaux/ae3e2a96f886f8dedb3ca736194e84a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="utf-8" /> | |
<style> | |
body { | |
font-family: Georgia; | |
font-size: 20px; | |
line-height: 1.35em; | |
padding: 2em; | |
box-sizing: border-box; | |
width: 100%; | |
height: auto; | |
overflow-y: scroll; | |
} | |
textarea { | |
font-family: monospace; | |
font-size: 16px; | |
line-height: 1.35em; | |
padding: .5em; | |
width: 100%; | |
height: 10.8em; | |
box-sizing: border-box; | |
} | |
span.caps { | |
font-variant: all-small-caps; | |
letter-spacing: .05em; | |
} | |
</style> | |
</head> | |
<body> | |
<?php | |
$html_snippet = '<p>Die Stiftung Preußische Schlösser und Gärten Berlin-Brandenburg (SPSG) betreut heute die schönsten und bedeutendsten Zeugnisse der Kunst-, Kultur- und Architekturgeschichte in Brandenburg-Preußen.</p> | |
<p>E-Mail.</p> | |
<p>Seit Januar 2018 sind diese Zeugnisse herzoglicher Repräsentation in einer landeseigenen Kulturinstitution – den Staatlichen Schlössern, Gärten und Kunstsammlungen Mecklenburg-Vorpommern (kurz: SSGK M-V) – zusammengefasst.</p> | |
<p>UNESCO-Welterbestätten UNESCO Welterbestätten.</p><p>DEUTSCHES MEERESMUSEUM</p>' | |
?> | |
<h2>RAW</h2> | |
<textarea><?php echo $html_snippet; ?></textarea> | |
<?php | |
require_once 'vendor/autoload.php'; | |
$settings = new \PHP_Typography\Settings(); | |
$settings->set_hyphenation( true ); | |
$settings->set_hyphenation_language( 'de-DE' ); | |
$typo = new \PHP_Typography\PHP_Typography(); | |
$processed_html = $typo->process( $html_snippet, $settings ); | |
?> | |
<h2>Processed</h2> | |
<?php echo $processed_html; ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment