CINXE.COM
Monoid
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Monoid</title> <link rel="icon" type="image/png" href="favicon-64x64.png" sizes="64x64" /> <link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" /> <link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" /> <!-- Schema.org markup for Google+ --> <meta itemprop="name" content="Monoid"> <meta itemprop="description" content="Monoid Open Source Coding Font"> <meta itemprop="image" content=""> <!-- Twitter Card data --> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:creator" content="@larsenwork"> <meta name="twitter:title" content="Monoid Open Source Coding Font"> <meta name="twitter:description" content="Monoid is a customizable, minimal + legible font optimized for coding. It's customisable with ligatures, alternates and class based positioning."> <meta name="twitter:image:src" content="http://larsenwork.com/monoid/MonoidCodingFont.png"> <meta name="twitter:url" content="http://larsenwork.com/monoid/"> <meta name="twitter:image:width" content="3000"> <meta name="twitter:image:height" content="1575"> <!-- Open Graph data --> <meta property="og:title" content="Monoid"> <meta property="og:type" content="website"> <meta property="og:url" content="http://larsenwork.com/monoid/"> <meta property="og:image" content="http://larsenwork.com/monoid/MonoidCodingFont.png"> <meta property="og:image:width" content="3000"> <meta property="og:image:height" content="1575"> <meta property="og:image:type" content="image/png"> <meta property="og:description" content="Monoid is a customizable, minimal + legible font optimized for coding. It's customisable with ligatures, alternates and class based positioning."> <link rel="stylesheet" href="css/styles.css" type="text/css" /> </head> <body class="dark"> <noscript class="alert">Not much to see without javascript. See Monoid on <a href="http://github.com/larsenwork/monoid">GitHub</a>.</noscript> <header> <div> <h1>Monoid <div id="h1load"></div> </h1> <h3>Open Source Coding Font <div id="h3load"></div> </h3> </div> </header> <div class="blabla"> <section> <h2>Concept</h2> <p>Monoid is customizable and optimized for coding with bitmap-like sharpness at 12px/9pt even on low res displays.</p> </section> <section> <h2>Features</h2> <p>Semi-condensed and distinguishable glyphs with short ascenders + descenders, big apertures and supersized operators + punctuation.</p> </section> <section> <h2>Support</h2> <p>Monoid comes in regular, bold, oblique and retina versions with >750 latin, greek, cyrillic, ligature, alternate and Powerline glyphs.</p> </section> <section> <h2>Monoisome</h2> <p class="monoisome"> Monoid + <a href="http://fontawesome.io" target="_blank">Font Awesome</a> = Monoisome. See the icons directly in your code. <span class="regular"><i class="fa fa-thumbs-o-up"></i></span> becomes <i class="fa fa-thumbs-o-up"></i><br> Test it in the "test" example. </p> </section> <section> <h2>Ligatures</h2> <p>Can be turned off <!-- --> <-- ->> <<- -> <- => <=> <==> ==> <== >>= =<< -- := =:= == !== != <= >= // /** /* */ && .& || !! :: >> << ¯\_(ツ)_/¯ __ ___ .. ...</p> </section> <section> <h2>Media</h2> <p><a target="_blank" href="https://github.com/larsenwork/monoid/tree/master/Utilities/Images">Images</a>. I'm writing about it on <a href="https://medium.com/@larsenwork/" target="_blank">Medium</a> and <a href="https://github.com/larsenwork/monoid#links" target="_blank">others</a> have found it interesting too.</p> </section> <section> <h2>Open Source</h2> <p>Contribute on <a target="_blank" href="https://github.com/larsenwork/monoid/issues">GitHub</a>. Please report any bugs/issues. Libre <a target="_blank" href="https://github.com/larsenwork/monoid/#license">licenses</a>.</p> </section> <section> <h2>Readme</h2> <p>Instructions, supported editors, fontlog (versions, dates, authors + roadmap) and more in the <a href="https://github.com/larsenwork/monoid#readme" target="_blank">readme</a>.</p> </section> <section> <h2>Preview</h2> <p><!-- FontSize <span class="clickme2" id="122">12</span> <span class="clickme2" id="132">13</span> <span class="clickme2" id="142">14</span> <span class="clickme2 active" id="152">15</span> <span class="clickme2" id="162">16</span> <span class="clickme2" id="172">17</span> <span class="clickme2" id="182">18</span> <span class="clickme2" id="192">19</span> <span class="clickme2" id="202">20</span> <span class="clickme2" id="212">21</span> <br>-->Theme <span id="themechooser"> <span id="white">White</span> <span id="light">Light</span> <span id="dark" class="active">Dark</span> <span id="black">Black</span> </span> <br>Example <span class="tabs"> <span data-tab="test">test</span> <span class="active" data-tab="ccode">c</span> <span data-tab="python">py</span> <span data-tab="swift">swift</span> <span data-tab="javascript">js</span> <span data-tab="less">less</span> <span data-tab="html">html</span> </span> </p> </section> <section id="settings"> <h2>v0.61</h2> <form data-persist="garlic"> <p> <span id="dloptions">Alternates <input id="ss01" type="checkbox"> <label for="ss01" name="dollar">$</label> <!-- <input id="ss02" type="checkbox"> <label for="ss02" name="asterisk">*</label> --> <input id="ss03" type="checkbox"> <label for="ss03" name="0">0</label> <input id="ss05" type="checkbox"> <label for="ss05" name="1">1</label> <!-- <input id="ss06" type="checkbox"> <label for="ss06" name="3">3</label> --> <input id="ss08" type="checkbox"> <label for="ss08" name="l">l</label> </span> <br>LineHeight <input id="xsmall" type="radio" name="lh"> <label for="xsmall">XS</label> <input id="small" type="radio" name="lh"> <label for="small">S</label> <input id="medium" type="radio" name="lh" checked> <label for="medium">M</label> <input id="large" type="radio" name="lh"> <label for="large">L</label> <input id="xlarge" type="radio" name="lh"> <label for="xlarge">XL</label> <br>Tracking <input id="tight" type="radio" name="fw"> <label for="tight">Tight</label> <input id="halftight" type="radio" name="fw"> <label for="halftight">½Tight</label> <input id="normal" type="radio" name="fw" checked> <label for="normal">Normal</label> <input id="halfloose" type="radio" name="fw"> <label for="halfloose">½Loose</label> <input id="loose" type="radio" name="fw"> <label for="loose">Loose</label> <br>Ligatures <input id="calt" type="radio" name="liga" checked> <label for="calt">On</label> <input id="nocalt" type="radio" name="liga"> <label for="nocalt">Off</label> <br> <span class="noselect default"> <a class="button" href="#" id="download">Download</a> <a class="button" href="https://github.com/larsenwork/monoid/blob/master/Monoisome/Monoisome-Regular.ttf?raw=true">Monoisome</a> <a class="button" href="https://github.com/larsenwork/monoid" target="_blank">GitHub</a> </span> </p> </form> </section> <section> <!-- flexbox tricking... --> </section> </div> <div id="codewrapper"> <div id="test" class="code"> <pre><code><div id="txt" class="hljs" contenteditable="true" spellcheck="false" placeholder="Type or paste your own code here. You can use the tab key as you'd normally would in an editor. These are the characters with alternates: $ * 0 1 3 l"></div></code></pre> </div> <div id="swift" class="code"> <pre><code class="language-swift hljs"><span class="hljs-comment">// Async.swift</span> <span class="hljs-comment">// Created by Tobias DM on 15/07/14.</span> <span class="hljs-comment">// OS X 10.10+ and iOS 8.0+</span> <span class="hljs-comment">// Only use with ARC</span> <span class="hljs-comment">// The MIT License (MIT)</span> <span class="hljs-comment">// Copyright (c) 2014 Tobias Due Munk</span> <span class="hljs-keyword">import</span> <span class="hljs-type">Foundation</span> <span class="hljs-comment">// MARK: - DSL for GCD queues</span> private <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">GCD</span> </span>{ <span class="hljs-comment">/* dispatch_get_queue() */</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">func</span> <span class="hljs-title">mainQueue</span>() -> <span class="hljs-title">dispatch_queue_t</span> </span>{ <span class="hljs-keyword">return</span> dispatch_get_main_queue() <span class="hljs-comment">// Don't ever use dispatch_get_global_queue(qos_class_main(), 0) re https://gist.github.com/duemunk/34babc7ca8150ff81844</span> } <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">func</span> <span class="hljs-title">userInteractiveQueue</span>() -> <span class="hljs-title">dispatch_queue_t</span> </span>{ <span class="hljs-keyword">return</span> dispatch_get_global_queue(<span class="hljs-type">QOS_CLASS_USER_INTERACTIVE</span>, <span class="hljs-number">0</span>) } <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">func</span> <span class="hljs-title">userInitiatedQueue</span>() -> <span class="hljs-title">dispatch_queue_t</span> </span>{ <span class="hljs-keyword">return</span> dispatch_get_global_queue(<span class="hljs-type">QOS_CLASS_USER_INITIATED</span>, <span class="hljs-number">0</span>) } <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">func</span> <span class="hljs-title">utilityQueue</span>() -> <span class="hljs-title">dispatch_queue_t</span> </span>{ <span class="hljs-keyword">return</span> dispatch_get_global_queue(<span class="hljs-type">QOS_CLASS_UTILITY</span>, <span class="hljs-number">0</span>) } <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">func</span> <span class="hljs-title">backgroundQueue</span>() -> <span class="hljs-title">dispatch_queue_t</span> </span>{ <span class="hljs-keyword">return</span> dispatch_get_global_queue(<span class="hljs-type">QOS_CLASS_BACKGROUND</span>, <span class="hljs-number">0</span>) } } <span class="hljs-comment">// MARK: - Async – Struct</span> public <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">Async</span> </span>{ private <span class="hljs-keyword">let</span> block: dispatch_block_t private <span class="hljs-keyword">init</span>(<span class="hljs-number">_</span> block: dispatch_block_t) { <span class="hljs-keyword">self</span>.block = block } } <span class="hljs-comment">// MARK: - Async – Static methods</span> public <span class="hljs-class"><span class="hljs-keyword">extension</span> <span class="hljs-title">Async</span> </span>{ <span class="hljs-comment">// Static methods</span> <span class="hljs-comment">/* dispatch_async() */</span> private <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">async</span><span class="hljs-params">(block: dispatch_block_t, inQueue queue: dispatch_queue_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-comment">// Create a new block (Qos Class) from block to allow adding a notification to it later (see matching regular Async methods)</span> <span class="hljs-comment">// Create block with the "inherit" type</span> <span class="hljs-keyword">let</span> _block = dispatch_block_create(<span class="hljs-type">DISPATCH_BLOCK_INHERIT_QOS_CLASS</span>, block) <span class="hljs-comment">// Add block to queue</span> dispatch_async(queue, _block) <span class="hljs-comment">// Wrap block in a struct since dispatch_block_t can't be extended</span> <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>(_block) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">(block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.async(block, inQueue: <span class="hljs-type">GCD</span>.mainQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">userInteractive</span><span class="hljs-params">(block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.async(block, inQueue: <span class="hljs-type">GCD</span>.userInteractiveQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">userInitiated</span><span class="hljs-params">(block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.async(block, inQueue: <span class="hljs-type">GCD</span>.userInitiatedQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">utility</span><span class="hljs-params">(block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.async(block, inQueue: <span class="hljs-type">GCD</span>.utilityQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">background</span><span class="hljs-params">(block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.async(block, inQueue: <span class="hljs-type">GCD</span>.backgroundQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">customQueue</span><span class="hljs-params">(queue: dispatch_queue_t, block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.async(block, inQueue: queue) } <span class="hljs-comment">/* dispatch_after() */</span> private <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">after</span><span class="hljs-params">(seconds: Double, block: dispatch_block_t, inQueue queue: dispatch_queue_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">let</span> nanoSeconds = <span class="hljs-type">Int64</span>(seconds * <span class="hljs-type">Double</span>(<span class="hljs-type">NSEC_PER_SEC</span>)) <span class="hljs-keyword">let</span> time = dispatch_time(<span class="hljs-type">DISPATCH_TIME_NOW</span>, nanoSeconds) <span class="hljs-keyword">return</span> at(time, block: block, inQueue: queue) } private <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">at</span><span class="hljs-params">(time: dispatch_time_t, block: dispatch_block_t, inQueue queue: dispatch_queue_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-comment">// See Async.async() for comments</span> <span class="hljs-keyword">let</span> _block = dispatch_block_create(<span class="hljs-type">DISPATCH_BLOCK_INHERIT_QOS_CLASS</span>, block) dispatch_after(time, queue, _block) <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>(_block) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">(#after: Double, block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.after(after, block: block, inQueue: <span class="hljs-type">GCD</span>.mainQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">userInteractive</span><span class="hljs-params">(#after: Double, block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.after(after, block: block, inQueue: <span class="hljs-type">GCD</span>.userInteractiveQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">userInitiated</span><span class="hljs-params">(#after: Double, block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.after(after, block: block, inQueue: <span class="hljs-type">GCD</span>.userInitiatedQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">utility</span><span class="hljs-params">(#after: Double, block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.after(after, block: block, inQueue: <span class="hljs-type">GCD</span>.utilityQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">background</span><span class="hljs-params">(#after: Double, block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.after(after, block: block, inQueue: <span class="hljs-type">GCD</span>.backgroundQueue()) } <span class="hljs-keyword">static</span> <span class="hljs-func"><span class="hljs-keyword">func</span> <span class="hljs-title">customQueue</span><span class="hljs-params">(#after: Double, queue: dispatch_queue_t, block: dispatch_block_t)</span></span> -> <span class="hljs-type">Async</span> { <span class="hljs-keyword">return</span> <span class="hljs-type">Async</span>.after(after, block: block, inQueue: queue) } }</code></pre> </div> <div id="ccode" class="current code"> <pre><code class="hljs cpp"><span class="hljs-comment">/* Pango Language Sample Table * * The sample text may be a pangram, but is not necessarily. It is chosen to * be demonstrative of normal text in the language, as well as exposing font * feature requirements unique to the language. It should be suitable for use * as sample text in a font selection dialog. * * Needless to say, the list MUST be sorted on the language code. */</span> lang( af, <span class="hljs-string">"Voix ambiguë d'un cœur qui, au zéphyr, préfère les jattes de kiwis."</span> ) lang( bg, <span class="hljs-string">"Щурчо Цоньо хапваше ловджийско кюфте с бяла гъмза."</span> ) lang( cz, <span class="hljs-string">"Příliš žluťoučký kůň úpěl ďábelské ódy."</span> ) lang( de, <span class="hljs-string">"Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich."</span> ) lang( dk, <span class="hljs-string">"Høj bly gom vandt fræk sexquiz på wc."</span> ) lang( ee, <span class="hljs-string">"Põdur Zagrebi tšellomängija-följetonist Ciqo külmetas kehvas garaažis."</span> ) lang( fi, <span class="hljs-string">"Charles Darwin jammaili Åken hevixylofonilla Qatarin yöpub Zeligissä."</span> ) lang( fro, <span class="hljs-string">"Je puis mangier del voirre. Ne me nuit."</span> ) lang( ga, <span class="hljs-string">"Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin bhig."</span> ) lang( gd, <span class="hljs-string">"S urrainn dhomh gloinne ithe; cha ghoirtich i mi."</span> ) lang( gl, <span class="hljs-string">"Eu podo xantar cristais e non cortarme."</span> ) lang( gr, <span class="hljs-string">"Ταχίστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός."</span> ) lang( gv, <span class="hljs-string">"Foddym gee glonney agh cha jean eh gortaghey mee."</span> ) lang( haw, <span class="hljs-string">"Hiki iaʻu ke ʻai i ke aniani; ʻaʻole nō lā au e ʻeha."</span> ) lang( hr, <span class="hljs-string">"Gojazni đačić s biciklom drži hmelj i finu vatu u džepu nošnje."</span> ) lang( hu, <span class="hljs-string">"Jó foxim és don Quijote húszwattos lámpánál ülve egy pár bűvös cipőt készít."</span> ) lang( is, <span class="hljs-string">"Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa"</span> ) lang( it, <span class="hljs-string">"Ma la volpe, col suo balzo, ha raggiunto il quieto Fido."</span> ) lang( jam, <span class="hljs-string">"Chruu, a kwik di kwik brong fox a jomp huova di liezi daag de, yu no siit?"</span> ) lang( jbo, <span class="hljs-string">".o'i mu xagji sofybakni cu zvati le purdi"</span> ) lang( jv, <span class="hljs-string">"Aku isa mangan beling tanpa lara."</span> ) lang( kw, <span class="hljs-string">"Mý a yl dybry gwéder hag éf ny wra ow ankenya."</span> ) lang( la, <span class="hljs-string">"Sic surgens, dux, zelotypos quam karus haberis"</span> ) lang( lt, <span class="hljs-string">"Įlinkdama fechtuotojo špaga sublykčiojusi pragręžė apvalų arbūzą."</span> ) lang( lv, <span class="hljs-string">"Sarkanās jūrascūciņas peld pa jūru."</span> ) lang( <span class="hljs-built_in">map</span>, <span class="hljs-string">"E koʻana e kai i te karahi, mea ʻā, ʻaʻe hauhau."</span> ) lang( mk, <span class="hljs-string">"Можам да јадам стакло, а не ме штета."</span> ) lang( ms, <span class="hljs-string">"Saya boleh makan kaca dan ia tidak mencederakan saya."</span> ) lang( nap, <span class="hljs-string">"M' pozz magna' o'vetr, e nun m' fa mal."</span> ) lang( nb, <span class="hljs-string">"Vår sære Zulu fra badeøya spilte jo whist og quickstep i min taxi."</span> ) lang( nl, <span class="hljs-string">"Pa's wijze lynx bezag vroom het fikse aquaduct."</span> ) lang( nn, <span class="hljs-string">"Eg kan eta glas utan å skada meg."</span> ) lang( no, <span class="hljs-string">"Vår sære Zulu fra badeøya spilte jo whist og quickstep i min taxi."</span> ) lang( nv, <span class="hljs-string">"Tsésǫʼ yishą́ągo bííníshghah dóó doo shił neezgai da."</span> ) lang( oc, <span class="hljs-string">"Pòdi manjar de veire, me nafrariá pas."</span> ) lang( pcd, <span class="hljs-string">"Ch'peux mingi du verre, cha m'foé mie n'ma."</span> ) lang( pl, <span class="hljs-string">"Pchnąć w tę łódź jeża lub ośm skrzyń fig."</span> ) lang( pt, <span class="hljs-string">"Luís argüia à Júlia que «brações, fé, chá, óxido, pôr, zângão» eram palavras do português."</span> ) lang( pt - br, <span class="hljs-string">"À noite, vovô Kowalsky vê o ímã cair no pé do pingüim queixoso e vovó põe açúcar no chá de tâmaras do jabuti feliz."</span> ) lang( ro, <span class="hljs-string">"Fumegând hipnotic sașiul azvârle mreje în bălți."</span> ) lang( ru, <span class="hljs-string">"В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!"</span> ) lang( scn, <span class="hljs-string">"Puotsu mangiari u vitru, nun mi fa mali."</span> ) lang( sk, <span class="hljs-string">"Starý kôň na hŕbe kníh žuje tíško povädnuté ruže, na stĺpe sa ďateľ učí kvákať novú ódu o živote."</span> ) lang( sl, <span class="hljs-string">"Šerif bo za vajo spet kuhal domače žgance."</span> ) lang( sq, <span class="hljs-string">"Unë mund të ha qelq dhe nuk më gjen gjë."</span> ) lang( sr, <span class="hljs-string">"Чешће цeђење мрeжастим џаком побољшава фертилизацију генских хибрида."</span> ) <span class="hljs-preprocessor">#<span class="hljs-keyword">if</span> 0</span> lang( sr - sr@ latin, <span class="hljs-string">"Češće ceđenje mrežastim džakom poboljšava fertilizaciju genskih hibrida."</span> ) <span class="hljs-preprocessor">#<span class="hljs-keyword">endif</span></span> lang( sv, <span class="hljs-string">"Flygande bäckasiner söka strax hwila på mjuka tuvor."</span> ) lang( swg, <span class="hljs-string">"I kå Glas frässa, ond des macht mr nix!"</span> ) lang( tl, <span class="hljs-string">"Kaya kong kumain nang bubog at hindi ako masaktan."</span> ) lang( tr, <span class="hljs-string">"Pijamalı hasta yağız şoföre çabucak güvendi."</span> ) lang( tw, <span class="hljs-string">"Metumi awe tumpan, ɜnyɜ me hwee."</span> ) lang( ua, <span class="hljs-string">"Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів!"</span> ) lang( vec, <span class="hljs-string">"Mi posso magnare el vetro, no'l me fa mae."</span> ) lang( wa, <span class="hljs-string">"Dji pou magnî do vêre, çoula m' freut nén må."</span> ) lang( yo, <span class="hljs-string">"Mo lè je̩ dígí, kò ní pa mí lára."</span> ) lang( zlm, <span class="hljs-string">"Saya boleh makan kaca dan ia tidak mencederakan saya."</span> )</code></pre> </div> <div id="javascript" class="code"> <pre><code class="language-javascript hljs"><span class="hljs-comment">/* ======================================================================== * Bootstrap: alert.js v3.3.4 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */</span> +<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">($)</span> </span>{ <span class="hljs-pi"> 'use strict'</span>; <span class="hljs-comment">// ALERT CLASS DEFINITION</span> <span class="hljs-comment">// ======================</span> <span class="hljs-keyword">var</span> dismiss = <span class="hljs-string">'[data-dismiss="alert"]'</span> <span class="hljs-keyword">var</span> Alert = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(el)</span> </span>{ $(el).on(<span class="hljs-string">'click'</span>, dismiss, <span class="hljs-keyword">this</span>.close) } Alert.VERSION = <span class="hljs-string">'3.3.4'</span> Alert.TRANSITION_DURATION = <span class="hljs-number">150</span> Alert.prototype.close = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(e)</span> </span>{ <span class="hljs-keyword">var</span> $<span class="hljs-keyword">this</span> = $(<span class="hljs-keyword">this</span>) <span class="hljs-keyword">var</span> selector = $<span class="hljs-keyword">this</span>.attr(<span class="hljs-string">'data-target'</span>) <span class="hljs-keyword">if</span> (!selector) { selector = $<span class="hljs-keyword">this</span>.attr(<span class="hljs-string">'href'</span>) selector = selector && selector.replace(<span class="hljs-regexp">/.*(?=#[^\s]*$)/</span>, <span class="hljs-string">''</span>) <span class="hljs-comment">// strip for ie7</span> } <span class="hljs-keyword">var</span> $parent = $(selector) <span class="hljs-keyword">if</span> (e) e.preventDefault() <span class="hljs-keyword">if</span> (!$parent.length) { $parent = $<span class="hljs-keyword">this</span>.closest(<span class="hljs-string">'.alert'</span>) } $parent.trigger(e = $.Event(<span class="hljs-string">'close.bs.alert'</span>)) <span class="hljs-keyword">if</span> (e.isDefaultPrevented()) <span class="hljs-keyword">return</span> $parent.removeClass(<span class="hljs-string">'in'</span>) <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">removeElement</span><span class="hljs-params">()</span> </span>{ <span class="hljs-comment">// detach from parent, fire event then clean up data</span> $parent.detach().trigger(<span class="hljs-string">'closed.bs.alert'</span>).remove() } $.support.transition && $parent.hasClass(<span class="hljs-string">'fade'</span>) ? $parent .one(<span class="hljs-string">'bsTransitionEnd'</span>, removeElement) .emulateTransitionEnd(Alert.TRANSITION_DURATION) : removeElement() } <span class="hljs-comment">// ALERT PLUGIN DEFINITION</span> <span class="hljs-comment">// =======================</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Plugin</span><span class="hljs-params">(option)</span> </span>{ <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.each(<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">()</span> </span>{ <span class="hljs-keyword">var</span> $<span class="hljs-keyword">this</span> = $(<span class="hljs-keyword">this</span>) <span class="hljs-keyword">var</span> data = $<span class="hljs-keyword">this</span>.data(<span class="hljs-string">'bs.alert'</span>) <span class="hljs-keyword">if</span> (!data) $<span class="hljs-keyword">this</span>.data(<span class="hljs-string">'bs.alert'</span>, (data = <span class="hljs-keyword">new</span> Alert(<span class="hljs-keyword">this</span>))) <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> option == <span class="hljs-string">'string'</span>) data[option].call($<span class="hljs-keyword">this</span>) }) } <span class="hljs-keyword">var</span> old = $.fn.alert $.fn.alert = Plugin $.fn.alert.Constructor = Alert <span class="hljs-comment">// ALERT NO CONFLICT</span> <span class="hljs-comment">// =================</span> $.fn.alert.noConflict = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">()</span> </span>{ $.fn.alert = old <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span> } <span class="hljs-comment">// ALERT DATA-API</span> <span class="hljs-comment">// ==============</span> $(<span class="hljs-built_in">document</span>).on(<span class="hljs-string">'click.bs.alert.data-api'</span>, dismiss, Alert.prototype.close) }(jQuery);</code></pre> </div> <div id="less" class="code"> <pre><code class="language-less hljs"><span class="hljs-comment">// Bootstrap</span> <span class="hljs-comment">// Buttons</span> <span class="hljs-comment">// --------------------------------------------------</span> <span class="hljs-comment">// Base styles</span> <span class="hljs-comment">// --------------------------------------------------</span> <span class="hljs-class">.btn</span> { <span class="hljs-attribute">display</span>: inline-block; <span class="hljs-attribute">margin-bottom</span>: <span class="hljs-number">0</span>; <span class="hljs-comment">// For input.btn</span> <span class="hljs-attribute">font-weight</span>: <span class="hljs-variable">@btn-font-weight</span>; <span class="hljs-attribute">text-align</span>: center; <span class="hljs-attribute">vertical-align</span>: middle; <span class="hljs-attribute">touch-action</span>: manipulation; <span class="hljs-attribute">cursor</span>: pointer; <span class="hljs-attribute">background-image</span>: none; <span class="hljs-comment">// Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214</span> <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid transparent; <span class="hljs-attribute">white-space</span>: nowrap; <span class="hljs-class">.button-size</span>(<span class="hljs-variable">@padding-base-vertical</span>; <span class="hljs-variable">@padding-base-horizontal</span>; <span class="hljs-variable">@font-size-base</span>; <span class="hljs-variable">@line-height-base</span>; <span class="hljs-variable">@border-radius-base</span>); <span class="hljs-class">.user-select</span>(none); <span class="hljs-keyword">&</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:active</span>, <span class="hljs-keyword">&</span><span class="hljs-class">.active</span> { <span class="hljs-keyword">&</span><span class="hljs-pseudo">:focus</span>, <span class="hljs-keyword">&</span><span class="hljs-class">.focus</span> { <span class="hljs-class">.tab-focus</span>(); } } <span class="hljs-keyword">&</span><span class="hljs-pseudo">:hover</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:focus</span>, <span class="hljs-keyword">&</span><span class="hljs-class">.focus</span> { <span class="hljs-attribute">color</span>: <span class="hljs-variable">@btn-default-color</span>; <span class="hljs-attribute">text-decoration</span>: none; } <span class="hljs-keyword">&</span><span class="hljs-pseudo">:active</span>, <span class="hljs-keyword">&</span><span class="hljs-class">.active</span> { <span class="hljs-attribute">outline</span>: <span class="hljs-number">0</span>; <span class="hljs-attribute">background-image</span>: none; <span class="hljs-class">.box-shadow</span>(inset <span class="hljs-number">0</span> <span class="hljs-number">3px</span> <span class="hljs-number">5px</span> <span class="hljs-function">rgba</span>(<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,.<span class="hljs-number">125</span>)); } <span class="hljs-keyword">&</span><span class="hljs-class">.disabled</span>, <span class="hljs-keyword">&</span><span class="hljs-attr_selector">[disabled]</span>, <span class="hljs-tag">fieldset</span><span class="hljs-attr_selector">[disabled]</span> <span class="hljs-keyword">&</span> { <span class="hljs-attribute">cursor</span>: <span class="hljs-variable">@cursor-disabled</span>; <span class="hljs-class">.opacity</span>(.<span class="hljs-number">65</span>); <span class="hljs-class">.box-shadow</span>(none); } <span class="hljs-tag">a</span><span class="hljs-keyword">&</span> { <span class="hljs-keyword">&</span><span class="hljs-class">.disabled</span>, <span class="hljs-tag">fieldset</span><span class="hljs-attr_selector">[disabled]</span> <span class="hljs-keyword">&</span> { <span class="hljs-attribute">pointer-events</span>: none; <span class="hljs-comment">// Future-proof disabling of clicks on `<a>` elements</span> } } } <span class="hljs-comment">// Alternate buttons</span> <span class="hljs-comment">// --------------------------------------------------</span> <span class="hljs-class">.btn-default</span> { <span class="hljs-class">.button-variant</span>(<span class="hljs-variable">@btn-default-color</span>; <span class="hljs-variable">@btn-default-bg</span>; <span class="hljs-variable">@btn-default-border</span>); } <span class="hljs-class">.btn-primary</span> { <span class="hljs-class">.button-variant</span>(<span class="hljs-variable">@btn-primary-color</span>; <span class="hljs-variable">@btn-primary-bg</span>; <span class="hljs-variable">@btn-primary-border</span>); } <span class="hljs-comment">// Success appears as green</span> <span class="hljs-class">.btn-success</span> { <span class="hljs-class">.button-variant</span>(<span class="hljs-variable">@btn-success-color</span>; <span class="hljs-variable">@btn-success-bg</span>; <span class="hljs-variable">@btn-success-border</span>); } <span class="hljs-comment">// Info appears as blue-green</span> <span class="hljs-class">.btn-info</span> { <span class="hljs-class">.button-variant</span>(<span class="hljs-variable">@btn-info-color</span>; <span class="hljs-variable">@btn-info-bg</span>; <span class="hljs-variable">@btn-info-border</span>); } <span class="hljs-comment">// Warning appears as orange</span> <span class="hljs-class">.btn-warning</span> { <span class="hljs-class">.button-variant</span>(<span class="hljs-variable">@btn-warning-color</span>; <span class="hljs-variable">@btn-warning-bg</span>; <span class="hljs-variable">@btn-warning-border</span>); } <span class="hljs-comment">// Danger and error appear as red</span> <span class="hljs-class">.btn-danger</span> { <span class="hljs-class">.button-variant</span>(<span class="hljs-variable">@btn-danger-color</span>; <span class="hljs-variable">@btn-danger-bg</span>; <span class="hljs-variable">@btn-danger-border</span>); } <span class="hljs-comment">// Link buttons</span> <span class="hljs-comment">// -------------------------</span> <span class="hljs-comment">// Make a button look and behave like a link</span> <span class="hljs-class">.btn-link</span> { <span class="hljs-attribute">color</span>: <span class="hljs-variable">@link-color</span>; <span class="hljs-attribute">font-weight</span>: normal; <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">0</span>; <span class="hljs-keyword">&</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:active</span>, <span class="hljs-keyword">&</span><span class="hljs-class">.active</span>, <span class="hljs-keyword">&</span><span class="hljs-attr_selector">[disabled]</span>, <span class="hljs-tag">fieldset</span><span class="hljs-attr_selector">[disabled]</span> <span class="hljs-keyword">&</span> { <span class="hljs-attribute">background-color</span>: transparent; <span class="hljs-class">.box-shadow</span>(none); } <span class="hljs-keyword">&</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:hover</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:focus</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:active</span> { <span class="hljs-attribute">border-color</span>: transparent; } <span class="hljs-keyword">&</span><span class="hljs-pseudo">:hover</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:focus</span> { <span class="hljs-attribute">color</span>: <span class="hljs-variable">@link-hover-color</span>; <span class="hljs-attribute">text-decoration</span>: <span class="hljs-variable">@link-hover-decoration</span>; <span class="hljs-attribute">background-color</span>: transparent; } <span class="hljs-keyword">&</span><span class="hljs-attr_selector">[disabled]</span>, <span class="hljs-tag">fieldset</span><span class="hljs-attr_selector">[disabled]</span> <span class="hljs-keyword">&</span> { <span class="hljs-keyword">&</span><span class="hljs-pseudo">:hover</span>, <span class="hljs-keyword">&</span><span class="hljs-pseudo">:focus</span> { <span class="hljs-attribute">color</span>: <span class="hljs-variable">@btn-link-disabled-color</span>; <span class="hljs-attribute">text-decoration</span>: none; } } } <span class="hljs-comment">// Button Sizes</span> <span class="hljs-comment">// --------------------------------------------------</span> <span class="hljs-class">.btn-lg</span> { <span class="hljs-comment">// line-height: ensure even-numbered height of button next to large input</span> <span class="hljs-class">.button-size</span>(<span class="hljs-variable">@padding-large-vertical</span>; <span class="hljs-variable">@padding-large-horizontal</span>; <span class="hljs-variable">@font-size-large</span>; <span class="hljs-variable">@line-height-large</span>; <span class="hljs-variable">@border-radius-large</span>); } <span class="hljs-class">.btn-sm</span> { <span class="hljs-comment">// line-height: ensure proper height of button next to small input</span> <span class="hljs-class">.button-size</span>(<span class="hljs-variable">@padding-small-vertical</span>; <span class="hljs-variable">@padding-small-horizontal</span>; <span class="hljs-variable">@font-size-small</span>; <span class="hljs-variable">@line-height-small</span>; <span class="hljs-variable">@border-radius-small</span>); } <span class="hljs-class">.btn-xs</span> { <span class="hljs-class">.button-size</span>(<span class="hljs-variable">@padding-xs-vertical</span>; <span class="hljs-variable">@padding-xs-horizontal</span>; <span class="hljs-variable">@font-size-small</span>; <span class="hljs-variable">@line-height-small</span>; <span class="hljs-variable">@border-radius-small</span>); } <span class="hljs-comment">// Block button</span> <span class="hljs-comment">// --------------------------------------------------</span> <span class="hljs-class">.btn-block</span> { <span class="hljs-attribute">display</span>: block; <span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>; } <span class="hljs-comment">// Vertically space out multiple block buttons</span> <span class="hljs-class">.btn-block</span> + <span class="hljs-class">.btn-block</span> { <span class="hljs-attribute">margin-top</span>: <span class="hljs-number">5px</span>; } <span class="hljs-comment">// Specificity overrides</span> <span class="hljs-tag">input</span><span class="hljs-attr_selector">[type="submit"]</span>, <span class="hljs-tag">input</span><span class="hljs-attr_selector">[type="reset"]</span>, <span class="hljs-tag">input</span><span class="hljs-attr_selector">[type="button"]</span> { <span class="hljs-keyword">&</span><span class="hljs-class">.btn-block</span> { <span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>; } }</code></pre> </div> <div id="python" class="code"> <pre><code class="language-python hljs"><span class="hljs-comment"># vim: sts=4 sw=4 ts=4 et</span> <span class="hljs-keyword">import</span> fontforge <span class="hljs-keyword">from</span> itertools <span class="hljs-keyword">import</span> compress <span class="hljs-keyword">from</span> os.path <span class="hljs-keyword">import</span> basename, splitext, join <span class="hljs-comment"># Builder</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">style</span><span class="hljs-params">(name, does)</span>:</span> <span class="hljs-keyword">try</span>: does = list(does) <span class="hljs-keyword">except</span> TypeError: does = [does] <span class="hljs-keyword">if</span> type(does) <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> list: does = list(does) option(name, name, [Variation(name)] + does) <span class="hljs-keyword">return</span> name <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">option</span><span class="hljs-params">(abrv, name, does)</span>:</span> option.operations[abrv] = does option.count += <span class="hljs-number">1</span> <span class="hljs-keyword">for</span> permutation <span class="hljs-keyword">in</span> option.permutations: permutation.append(abrv) <span class="hljs-keyword">return</span> abrv <span class="hljs-comment"># Initialize the operations map, option count, and permutations</span> option.operations = {} option.count = <span class="hljs-number">0</span> option.permutations = [[]] <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">conflicting</span><span class="hljs-params">(*args)</span>:</span> permutations = option.permutations <span class="hljs-comment"># Deconflict</span> <span class="hljs-comment"># Assumes last #args options in each permutation are conflicting options</span> <span class="hljs-keyword">for</span> arg <span class="hljs-keyword">in</span> args: <span class="hljs-keyword">for</span> p <span class="hljs-keyword">in</span> permutations: p.pop() <span class="hljs-comment"># Only one of the options should be counted</span> option.count -= len(args) - <span class="hljs-number">1</span> <span class="hljs-comment"># Get all permutations for conflicting options</span> option.permutations = [ p + [arg] <span class="hljs-keyword">for</span> p <span class="hljs-keyword">in</span> permutations <span class="hljs-keyword">for</span> arg <span class="hljs-keyword">in</span> args ] <span class="hljs-comment"># Walk through all the options</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">walk</span><span class="hljs-params">(walker)</span>:</span> <span class="hljs-comment"># Each option is a binary choice, so we use an int as a quick bitmap.</span> <span class="hljs-comment"># To iterate over every possible permutation, all we have to do is increment</span> <span class="hljs-comment"># up to the maximum value 2^(#options)</span> bitmap_max = <span class="hljs-number">1</span> << option.count <span class="hljs-comment"># Iterate over all possible permutations</span> <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> xrange(bitmap_max): <span class="hljs-comment"># Map the iteration's permutations using a bitmap</span> bitmap = map(<span class="hljs-keyword">lambda</span> n: i >> n & <span class="hljs-number">1</span>, xrange(option.count)) <span class="hljs-comment"># NOTE: This does not effectively handle de-duplication.</span> <span class="hljs-comment"># TODO: Tuples? Revert to expand_options and modify?</span> last = <span class="hljs-keyword">None</span> <span class="hljs-keyword">for</span> p <span class="hljs-keyword">in</span> option.permutations: current = list(compress(p, bitmap)) <span class="hljs-keyword">if</span> current == last: <span class="hljs-keyword">break</span> last = current walker(current) <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">build</span><span class="hljs-params">(outdir, font)</span>:</span> <span class="hljs-comment"># Fork the original font</span> fnt = fontforge.open(join(source, font)) <span class="hljs-comment"># Get the base name for the font</span> name = join(outdir, splitext(basename(font))[<span class="hljs-number">0</span>]) <span class="hljs-keyword">for</span> opt <span class="hljs-keyword">in</span> opts: <span class="hljs-comment"># Append this option to the font name</span> name += <span class="hljs-string">'-'</span> + str(opt) <span class="hljs-comment"># Run all the operations for this option</span> <span class="hljs-comment">#for oper in options[opt]:</span> <span class="hljs-comment">#opers[oper](fnt, *oper[opt])</span> <span class="hljs-comment"># Output the file and cleanup</span> fnt.generate(name + <span class="hljs-string">".ttf"</span>) fnt.close() <span class="hljs-comment"># Operations</span> <span class="hljs-comment">## NOTE:</span> <span class="hljs-comment">## All operations return a closure with the 1st argument being a fontforge.font</span> <span class="hljs-comment">## Adjusts the left and/or right bearings of all glyphs</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">Bearing</span><span class="hljs-params">(left=<span class="hljs-number">0</span>, right=<span class="hljs-number">0</span>)</span>:</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">op</span><span class="hljs-params">(fnt)</span>:</span> fnt.genericGlyphChange( hCounterType=<span class="hljs-string">"nonUniform"</span>, hCounterScale=<span class="hljs-number">1.0</span>, lsbScale=<span class="hljs-number">1.0</span>, rsbScale=<span class="hljs-number">1.0</span>, lsbAdd=left, rsbAdd=right) <span class="hljs-keyword">return</span> op <span class="hljs-comment">## Swaps the places of two glyphs using the DEL char as swap space</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">Swap</span><span class="hljs-params">(glyph1, glyph2)</span>:</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">op</span><span class="hljs-params">(fnt)</span>:</span> <span class="hljs-comment"># G1 -> SWP</span> fnt.selection.select(glyph1) fnt.copy() fnt.selection.select(<span class="hljs-number">127</span>) <span class="hljs-comment"># DEL</span> fnt.paste() <span class="hljs-comment"># G2 -> G1</span> fnt.selection.select(glyph2) fnt.copy() fnt.selection.select(glyph1) fnt.paste() <span class="hljs-comment"># SWP -> G1</span> fnt.selection.select(<span class="hljs-number">127</span>) <span class="hljs-comment"># DEL</span> fnt.copy() fnt.selection.select(glyph2) fnt.paste() <span class="hljs-comment"># Clear SWP</span> fnt.selection.select(<span class="hljs-number">127</span>) <span class="hljs-comment"># DEL</span> fnt.clear() <span class="hljs-keyword">return</span> op <span class="hljs-comment">## Changes the subfamily/variation of the font</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">Variation</span><span class="hljs-params">(name)</span>:</span> <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">op</span><span class="hljs-params">(fnt)</span>:</span> basename = f.fontname.split(<span class="hljs-string">'-'</span>)[<span class="hljs-number">0</span>] fontname = [basename] + name.split() f.fontname = <span class="hljs-string">'-'</span>.join(fontname) f.fullname = <span class="hljs-string">' '</span>.join(fontname) <span class="hljs-keyword">return</span> op</code></pre> </div> <div id="html" class="code"> <pre><code class="language-html hljs xml"><span class="hljs-doctype"><!DOCTYPE html></span> <span class="hljs-tag"><<span class="hljs-title">html</span> <span class="hljs-attribute">lang</span>=<span class="hljs-value">"en"</span>></span> <span class="hljs-tag"><<span class="hljs-title">head</span>></span> <span class="hljs-tag"><<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">"utf-8"</span>></span> <span class="hljs-tag"><<span class="hljs-title">meta</span> <span class="hljs-attribute">http-equiv</span>=<span class="hljs-value">"X-UA-Compatible"</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">"IE=edge"</span>></span> <span class="hljs-tag"><<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">"viewport"</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">"width=device-width, initial-scale=1"</span>></span> <span class="hljs-comment"><!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --></span> <span class="hljs-tag"><<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">"description"</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">""</span>></span> <span class="hljs-tag"><<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">"author"</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">""</span>></span> <span class="hljs-tag"><<span class="hljs-title">link</span> <span class="hljs-attribute">rel</span>=<span class="hljs-value">"icon"</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"../../favicon.ico"</span>></span> <span class="hljs-tag"><<span class="hljs-title">title</span>></span>Justified Nav Template for Bootstrap<span class="hljs-tag"></<span class="hljs-title">title</span>></span> <span class="hljs-comment"><!-- Bootstrap core CSS --></span> <span class="hljs-tag"><<span class="hljs-title">link</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"../../dist/css/bootstrap.min.css"</span> <span class="hljs-attribute">rel</span>=<span class="hljs-value">"stylesheet"</span>></span> <span class="hljs-comment"><!-- Custom styles for this template --></span> <span class="hljs-tag"><<span class="hljs-title">link</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"justified-nav.css"</span> <span class="hljs-attribute">rel</span>=<span class="hljs-value">"stylesheet"</span>></span> <span class="hljs-comment"><!-- Just for debugging purposes. Don't actually copy these 2 lines! --></span> <span class="hljs-comment"><!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]--></span> <span class="hljs-tag"><<span class="hljs-title">script</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">"../../assets/js/ie-emulation-modes-warning.js"</span>></span><span class="undefined"></span><span class="hljs-tag"></<span class="hljs-title">script</span>></span> <span class="hljs-comment"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --></span> <span class="hljs-comment"><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--></span> <span class="hljs-tag"></<span class="hljs-title">head</span>></span> <span class="hljs-tag"><<span class="hljs-title">body</span>></span> <span class="hljs-tag"><<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"container"</span>></span> <span class="hljs-comment"><!-- The justified navigation menu is meant for single line per list item. Multiple lines will require custom code not provided by Bootstrap. --></span> <span class="hljs-tag"><<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"masthead"</span>></span> <span class="hljs-tag"><<span class="hljs-title">h3</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"text-muted"</span>></span>Project name<span class="hljs-tag"></<span class="hljs-title">h3</span>></span> <span class="hljs-tag"><<span class="hljs-title">nav</span>></span> <span class="hljs-tag"><<span class="hljs-title">ul</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"nav nav-justified"</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"active"</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span>></span>Home<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span>></span>Projects<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span>></span>Services<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span>></span>Downloads<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span>></span>About<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span>></span>Contact<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"></<span class="hljs-title">ul</span>></span> <span class="hljs-tag"></<span class="hljs-title">nav</span>></span> <span class="hljs-tag"></<span class="hljs-title">div</span>></span> <span class="hljs-comment"><!-- Jumbotron --></span> <span class="hljs-tag"><<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"jumbotron"</span>></span> <span class="hljs-tag"><<span class="hljs-title">h1</span>></span>Marketing stuff!<span class="hljs-tag"></<span class="hljs-title">h1</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"lead"</span>></span>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet.<span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"btn btn-lg btn-success"</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span> <span class="hljs-attribute">role</span>=<span class="hljs-value">"button"</span>></span>Get started today<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"></<span class="hljs-title">div</span>></span> <span class="hljs-comment"><!-- Example row of columns --></span> <span class="hljs-tag"><<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"row"</span>></span> <span class="hljs-tag"><<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"col-lg-4"</span>></span> <span class="hljs-tag"><<span class="hljs-title">h2</span>></span>Safari bug warning!<span class="hljs-tag"></<span class="hljs-title">h2</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"text-danger"</span>></span>As of v8.0, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.<span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. <span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"btn btn-primary"</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span> <span class="hljs-attribute">role</span>=<span class="hljs-value">"button"</span>></span>View details &raquo;<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"></<span class="hljs-title">div</span>></span> <span class="hljs-tag"><<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"col-lg-4"</span>></span> <span class="hljs-tag"><<span class="hljs-title">h2</span>></span>Heading<span class="hljs-tag"></<span class="hljs-title">h2</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. <span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"btn btn-primary"</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span> <span class="hljs-attribute">role</span>=<span class="hljs-value">"button"</span>></span>View details &raquo;<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"></<span class="hljs-title">div</span>></span> <span class="hljs-tag"><<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"col-lg-4"</span>></span> <span class="hljs-tag"><<span class="hljs-title">h2</span>></span>Heading<span class="hljs-tag"></<span class="hljs-title">h2</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.<span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span><span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"btn btn-primary"</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"#"</span> <span class="hljs-attribute">role</span>=<span class="hljs-value">"button"</span>></span>View details &raquo;<span class="hljs-tag"></<span class="hljs-title">a</span>></span><span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"></<span class="hljs-title">div</span>></span> <span class="hljs-tag"></<span class="hljs-title">div</span>></span> <span class="hljs-comment"><!-- Site footer --></span> <span class="hljs-tag"><<span class="hljs-title">footer</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"footer"</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span>&copy; Company 2014<span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"></<span class="hljs-title">footer</span>></span> <span class="hljs-tag"></<span class="hljs-title">div</span>></span> <span class="hljs-comment"><!-- /container --></span> <span class="hljs-comment"><!-- IE10 viewport hack for Surface/desktop Windows 8 bug --></span> <span class="hljs-tag"><<span class="hljs-title">script</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">"../../assets/js/ie10-viewport-bug-workaround.js"</span>></span><span class="undefined"></span><span class="hljs-tag"></<span class="hljs-title">script</span>></span> <span class="hljs-tag"></<span class="hljs-title">body</span>></span> <span class="hljs-tag"></<span class="hljs-title">html</span>></span></code></pre> </div> </div> <div id="jump"> <h2><a href="#settings">Jump back up</a> </h2> </div> <div id="postdownload"> <div id="close">×</div> <p>if (<a target="_blank" href="https://twitter.com/intent/tweet?text=Monoid+Open+Source+Coding+Font+http%3A%2F%2Flarsen.work%2Fmonoid%2F">tweeted</a> || <a target="_blank" href="https://www.facebook.com/sharer/sharer.php?s=100&p[url]=https://larsenwork.github.io/monoid/">facebooked</a>) { <br> gratitude += 1; <br>} <br>if (<a target="_blank" href="https://github.com/larsenwork/monoid">githubStarred</a>) { <br> karmaBalance = true; <br>} else { <br> $('<a target="_blank" href="https://github.com/larsenwork/monoid#font_log">we</a>').say('ok'); <br>} </p> </div> <div id="loadoverlay"></div> <div id="safari" class="alert"> <p>Preview of the alternates and turning ligatures off doesn't work with Safari and/or iOS devices. <span id="ok">OK</span> </p> </div> <div id="grid"></div> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script> window.jQuery || document.write('<script src="js/2.1.4.jquery.min.js"><\/script>') </script> <script src="js/release.js"></script> <!-- <script src="js/garlic.min.js"></script> --> <!-- <script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script>--> <!-- <script src="js/highlight.pack.js"></script>--> <script> $(function() { //hljs.initHighlightingOnLoad(); if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) { $("body").addClass("safari") } $("#ok").on("click touch", function() { $("body").removeClass("safari") }); function insertTextAtCursor(text) { var sel, range, html; sel = window.getSelection(); range = sel.getRangeAt(0); range.deleteContents(); var textNode = document.createTextNode(text); range.insertNode(textNode); range.setStartAfter(textNode); sel.removeAllRanges(); sel.addRange(range); } $("#txt").focusout(function() { var element = $(this); if (!element.text().replace(" ", "").length) { element.empty(); } }); $("#txt").keydown(function(objEvent) { if (objEvent.keyCode == 9) { //tab pressed objEvent.preventDefault(); // stops its action insertTextAtCursor('\t'); // insert tab } }); var FontName = window.MONOID_URL + "Monoid.zip"; function refreshFeatures() { FontName = window.MONOID_URL + "Monoid"; var FontFeature = ""; if ($("#tight").is(":checked")) { $('.code').css("letter-spacing", "-0.06666666667em"); FontName += '-Tight' } if ($("#halftight").is(":checked")) { $('.code').css("letter-spacing", "-0.03333333333em"); FontName += '-HalfTight' } if ($("#normal").is(":checked")) { $('.code').css("letter-spacing", "0"); } if ($("#halfloose").is(":checked")) { $('.code').css("letter-spacing", "0.03333333333em"); FontName += '-HalfLoose' } if ($("#loose").is(":checked")) { $('.code').css("letter-spacing", "0.06666666667em"); FontName += '-Loose' } if ($("#xsmall").is(":checked")) { $('.code').css("line-height", "14px"); FontName += '-XtraSmall' } if ($("#small").is(":checked")) { $('.code').css("line-height", "15px"); FontName += '-Small' } if ($("#medium").is(":checked")) { $('.code').css("line-height", "16px"); } if ($("#large").is(":checked")) { $('.code').css("line-height", "17px"); FontName += '-Large' } if ($("#xlarge").is(":checked")) { $('.code').css("line-height", "18px"); FontName += '-XtraLarge' } if ($("#ss01").is(":checked")) { FontFeature += '"ss01" ,'; FontName += '-Dollar' } if ($("#ss02").is(":checked")) { FontFeature += '"ss02" ,'; FontName += '-Asterisk' } if ($("#ss03").is(":checked")) { FontFeature += '"ss03" ,'; FontName += '-0' } if ($("#ss05").is(":checked")) { FontFeature += '"ss05" ,'; FontName += '-1' } if ($("#ss06").is(":checked")) { FontFeature += '"ss06" ,'; FontName += '-3' } if ($("#ss08").is(":checked")) { FontFeature += '"ss08" ,'; FontName += '-l' } if ($("#nocalt").is(":checked")) { FontFeature += '"liga" 0, "calt" 0, '; FontName += '-NoCalt' } FontName += '.zip' FontFeature = FontFeature.substring(0, FontFeature.length - 2); $('body').css("font-feature-settings", FontFeature); }; $('form').on("click touch", function() { refreshFeatures(); }); // refreshFeatures(); $('#download').on("click touch", function(e) { e.preventDefault(); refreshFeatures(); $('body').addClass('downloaded').delay(10).queue(function(next) { window.location.href = FontName; next(); return false; }); }); // THIS IS UGLY AND SHOULD BE FIXED...but it works... $("#122").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "12px"); }); $("#132").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "13px"); }); $("#142").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "14px"); }); $("#152").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "15px"); }); $("#162").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "16px"); }); $("#172").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "17px"); }); $("#182").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "18px"); }); $("#192").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "19px"); }); $("#202").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "20px"); }); $("#212").on("click touch", function() { $(".clickme2").removeClass('active'); $(this).addClass('active'); $('.code').css("font-size", "21px"); }); $("#light").on("click touch", function() { $("body").removeClass('dark white black'); $("#themechooser span").removeClass('active'); $(this).addClass('active'); }); $("#dark").on("click touch", function() { $("body").removeClass('dark white black').addClass('dark'); $("#themechooser span").removeClass('active'); $(this).addClass('active'); }); $("#white").on("click touch", function() { $("body").removeClass('dark white black').addClass('white'); $("#themechooser span").removeClass('active'); $(this).addClass('active'); }); $("#black").on("click touch", function() { $("body").removeClass('dark white black').addClass('black'); $("#themechooser span").removeClass('active'); $(this).addClass('active'); }); $('.tabs span').click(function() { var tab_id = $(this).attr('data-tab'); $('.tabs span').removeClass('active'); $('.code').removeClass('current'); $(this).addClass('active'); $("#" + tab_id).addClass('current'); }); $('a[href$="#settings"]').on('click', function(e) { e.preventDefault(); var target = this.hash; var $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top }, 600, 'swing', function() { window.location.hash = target; }); }); $('#close').on("click touch", function() { $('body').removeClass('downloaded'); }); }); $(window).bind("load", function() { $('body').addClass('loaded'); }); </script> </body> </html>