index.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> <span class="pull-T">T</span>ypeset.js – an <span class="small-caps">HTML</span> pre-processor for<span class="push-w"></span> <span class="pull-w">w</span>eb typography<span class="push-T"></span> </title>
<link rel="icon" type="image/png" href="./demo/favicon.png">
<link rel="stylesheet" href="./demo/style.css">
<link rel="stylesheet" href="./demo/typeset.css">
</head>
<body>
<div class="container">
<h1>rTypeset</h1>
<p>A typographic pre-processor for <span class='small-caps'>HTML</span> inspired by <a href="https://blot.im/typeset/">Typeset.js</a> that gives you:</p>
<ul>
<li>Real hanging punctuation</li>
<li>Soft hyphen insertion</li>
<li><span class="pull-O">O</span>ptical margin<span class="push-o"></span> <span class="pull-o">o</span>utdents</li>
<li>Small-caps<span class="push-c"></span> <span class="pull-c">c</span>onversion</li>
<li>Punctuation substitution</li>
<li>Space substitution</li>
</ul>
<div class='prefooter'> </div>
<h3>Raw</h3>
<div class="demo">
<p>Yjarni Sigurðardóttir spoke to NATO from Iceland yesterday: "Light of my life, fire of my florins -- my sin, my soul. The tip of the tongue taking a trip to 118° 19' 43.5"."</p>
<p>"She's faster than a 120' 4" whale." <em>Piña coladas</em> were widely consumed in Götterdämmerung from 1880–1912. For the low price of $20 / year from Exhibits A–E... Then the <em>duplex</em> came forward. "Thrice the tower, he mounted the round gunrest, 'awaking' HTML. He can print a fixed number of dots in a square inch (for instance, 600 × 600)."</p>
</div>
<h3>Typeset</h3>
<div class="demo">
<p><span class="pull-Y">Y</span>jarni Sigurðardóttir spoke to <span class="small-caps">NATO</span> from Iceland yesterday:<span class="push-double"></span> <span class="pull-double">“</span>Light<span class="push-o"></span> <span class="pull-o">o</span>f my life, fire<span class="push-o"></span> <span class="pull-o">o</span>f my florins – my sin, my soul.<span class="push-T"></span> <span class="pull-T">T</span>he tip<span class="push-o"></span> <span class="pull-o">o</span>f the tongue taking a trip to 118° 19′ 43.5″.”<span class="push-Y"></span><span class="push-Y"></span></p>
<p><span class="pull-double">“</span>She’s faster than a 120′ 4″<span class="push-w"></span> <span class="pull-w">w</span>hale.”<span class="push-double"></span> <em>Piña<span class="push-c"></span> <span class="pull-c">c</span>oladas</em> <span class="pull-w">w</span>ere<span class="push-w"></span> <span class="pull-w">w</span>idely<span class="push-c"></span> <span class="pull-c">c</span>onsumed in Götterdämmerung from 1880–1912. For the low price<span class="push-o"></span> <span class="pull-o">o</span>f $20 / year from Exhibits<span class="push-A"></span> <span class="pull-A">A</span>–E…<span class="push-T"></span> <span class="pull-T">T</span>hen the<span class="push-w"></span> <em>duplex</em> <span class="pull-c">c</span>ame forward.<span class="push-double"></span> <span class="pull-double">“</span>Thrice the tower, he mounted the round gunrest,<span class="push-single"></span> <span class="pull-single">‘</span>awaking’ <span class="small-caps">HTML</span>. He<span class="push-c"></span> <span class="pull-c">c</span>an print a fixed number<span class="push-o"></span> <span class="pull-o">o</span>f dots in a square inch (for instance, 600 × 600).”<span class="push-c"></span></p>
</div>
<h2>Installation</h2>
<code class='code'>
gem install rtypeset
</code>
<h2>Usage</h2>
<pre class='code'>
require 'typeset'
raw_html = <<HTM
<p>Yjarni Sigurðardóttir spoke to NATO from Iceland yesterday:
"Light of my life, fire of my florins -- my sin, my soul.
The tip of the tongue taking a trip to 118° 19' 43.5".":</p>
HTM
# Output beautifully-formatted HTML
puts Typeset.typeset(raw_html)
</pre>
</div>
</body>
</html>