# coding=utf-8
from vanilla import *
from defconAppKit.windows.baseWindow import BaseWindowController
from mojo.events import addObserver, removeObserver
import math
 
class ShowMouseCoordinatesTextBox(TextBox):
    def __init__( *args, **kwargs):
        super(ShowMouseCoordinatesTextBox, self).__init__(*args, **kwargs)
        addObserver("mouseMoved", "mouseMoved")
        addObserver("mouseDragged", "mouseDragged")
        addObserver("mouseUp", "mouseUp")
 
    # What happens when the mouse is moved (do basic cursor coordinates)
    def mouseMoved(self, info):
        point = info["point"]
        text = u"%.0f %.0f" % (point.x, point.y)
        self.set(text)
 
    # What happens when the mouse is dragged (do special delta/angle/distance view)
    def mouseDragged(self, info):
        point = info["point"]
        positionSymbol = unichr(8982)
        deltaPoint = info["delta"]
        angle = math.degrees(math.atan2(deltaPoint.y, deltaPoint.x))
        distance = math.hypot(deltaPoint.x, deltaPoint.y)
        text = u"The point is (%s, %s)." % (point.x, point.y)
        self.set(text)       
 
    # What happens when the mouse button is pressed (return to basic cursor coordinates)
    def mouseUp(self, info):
        point = info["point"]
        text = u"%.0f %.0f" % (point.x, point.y)
        self.set(text)
 
    # Who knows what this is...
    def _breakCycles(self):
        super(ShowMouseCoordinatesTextBox, self)._breakCycles()
        removeObserver(self, "mouseMoved")
        removeObserver(self, "mouseDragged")
        removeObserver(self, "mouseUp")
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <link rel="shortcut icon" href="/images/favicon.ico" />
    <link rel="stylesheet" href="/css/site.css" type="text/css" charset="UTF-8" />
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
    <h1>Input: Fonts for Code</h1>    
    <p>Like many programmers, David Jonathan Ross had used monospaced fonts for his code. That was before he questioned the convention and answered with a fresh approach for data and programming aesthetics. Input finds inspiration in early computer consoles but looks towards a typographically rich future, where coding environments overcome technical limitations and allow for full control over one’s display; FB 2014</p>
    <h2>Story</h2>
    <p>Input is inspired by fonts for early consoles and screens, but casts off the technical limitations that constrained them. Inspired by Matthew Carter’s process for drawing Verdana, I began by constructing a bitmap font, and then drew the outlines of Input’s letterforms on top of the 11-pixel grid. 
    <p>Then drew outlines of Input’s letterforms on top of the 11-pixel grid.
SMALL CRAFT ADVISORY IN EFFECT UNTIL 9 AM PDT SATURDAY...
SHORT-PERIOD AND STEEP HAZARDOUS SEAS BETWEEN 10 AND 12 FEET WILL DEVELOP SATURDAY AFTERNOON
GALE WARNING IN EFFECT FROM 3 PM SATURDAY TO 3 AM PDT MONDAY...
WINDS WILL INCREASE TO 10 TO 20 KNOTS WITH
FREQUENT GUSTS TO 25 KNOTS TONIGHT AND CONTINUE THROUGH SATURDAY
MORNING, THEN SHIFT TO NORTHWEST AND INCREASE
THORUGH SATURDAY AFTERNOON. NORTHWEST WINDS 15 TO 25 KNOTS WITH
  FREQUENT GUSTS BETWEEN 35 AND 40 KNOTS WILL DEVELOP LATE
  SATURDAY AFTERNOON AND CONTINUE INTO SUNDAY EVENING. THE WINDS
  WILL BEGIN TO DIMINISH LATE SUNDAY NIGHT.

* SEAS...SHORT-PERIOD AND STEEP HAZARDOUS SEAS BETWEEN 10 AND 12
  FEET WILL DEVELOP SATURDAY AFTERNOON...THEN BUILD TO BETWEEN 15
  AND 20 FEET SATURDAY NIGHT INTO SUNDAY.

PRECAUTIONARY/PREPAREDNESS ACTIONS...

A GALE WARNING MEANS WINDS OF 34 TO 47 KNOTS ARE IMMINENT OR
OCCURING. OPERATING A VESSEL IN GALE CONDITIONS REQUIRES
EXPERIENCE AND PROPERLY EQUIPPED VESSELS. IT IS HIGHLY
RECOMMENDED THAT MARINERS WITHOUT THE PROPER EXPERIENCE SEEK SAFE
HARBOR PRIOR TO THE ONSET OF GALE CONDITIONS.

A SMALL CRAFT ADVISORY MEANS THAT WIND SPEEDS OF 21 TO 33 KNOTS
ARE EXPECTED TO PRODUCE HAZARDOUS WAVE CONDITIONS TO SMALL CRAFT.
INEXPERIENCED MARINERS...ESPECIALLY THOSE OPERATING SMALLER
VESSELS SHOULD AVOID NAVIGATING IN THESE CONDITIONS.
function findSequence(goal) {
  function find(start, history) {
    if (start == goal)
      return history;
    else if (start > goal)
      return null;
    else
      return find(start + 5, "(" + history + " + 5)") ||
             find(start * 3, "(" + history + " * 3)");
  }
  return find(1, "1");
}
PID    COMMAND      %CPU TIME     #TH   #WQ  #PORT #MREGS MEM    RPRVT  PURG
18195  top          22.4 00:02.08 1/1   0    22    48     3776K  3544K  0B
18192  bash         0.0  00:00.03 1     0    19    35     1072K  932K   0B
18191  login        0.0  00:00.04 4     2    35    58     1192K  868K   0B
18188  mdworker     0.0  00:00.50 4     2    57    80     6224K  5540K  0B
18187  mdworker     0.0  00:00.44 2     0    50    69     6224K  4920K  0B
18171  syncdefaults 0.0  00:00.76 5     1    93    74     4744K  4320K  0B
18167  mdworker     0.0  00:00.17 5     1    65    86     3796K  3048K  0B
18165  com.apple.We 0.4  00:06.43 15    3    246-  1040-  55M-   54M+   0B
18117  com.apple.We 0.0  00:06.81 14    1    198   1296   10M+   5604K+ 0B
18093  mdwrite      0.0  00:00.04 3     2    53    59     240K   136K   0B
17998  com.apple.iC 0.0  00:00.65 7     2    97    98     3556K  2948K  0B
17996  periodic-wra 0.0  00:00.00 2     1    29    39     8192B  0B     0B
17995  netbiosd     0.0  00:00.03 2     1    42    47     8192B  0B     0B
Int. NASA control center communications room.

There are several long desks with the newest, high-tech
computers placed on them. Focus on one technician...

The TECHNICIAN types at the computer, a tired 
look on his face. Suddenly, a flashing white light 
illuminates his face, accompanied by a beeping sound. 

                      TECHNICIAN:
    Mr. Brown, I need you to take a look at this.

After a moment, NASA Director MARCUS BROWN (mid-
40’s) walks up to the Technician. Brown looks like the 
kind of guy who worked extremely hard to get to where 
he  is today and he doesn’t plan to quit anytime soon.
(define (handle-start directory [port #f])
  (if (not (directory-exists? directory))
      (error (format "~a is not a directory" directory))
      `(begin 
         (require pollen/server pollen/world)
         (parameterize ([world:current-project-root ,directory]
                        ,@(if port (list `(world:current-server-port ,port)) null))
           (start-server)))))
(define (handle-clone directory rest-args)
  (define target-path (or 
                       (and rest-args (not (null? rest-args)) (path->complete-path (string->path (car rest-args))))
                       (build-path (find-system-path 'desk-dir) (string->path world:clone-directory-name))))
/* basic screen stylesheet */
@media screen {
    body {
        margin: 0px;
        padding: 0px;
        font-family: "Input Serif", "Courier New", "Times New Roman", serif;
        font-size: 1em;
        background-color: #F0ECD6;
    }
    /* Link colors */
    a:link {
        color: #993300;
        text-decoration: none;
    }
    /* Paragraph */
    p {
        font-size: 1em;
        font-style: italic;
        margin-left: 2em;
        margin-right: 2em;
    }
    p:first-child {
        padding-top: 2em;
    }  
}
module ActionView #:nodoc:
  # Use FixtureResolver in your tests to simulate the presence of files on the
  # file system. This is used internally by Rails' own test suite.
  class FixtureResolver < PathResolver
    attr_reader :hash
    def initialize(hash = {}, pattern=nil)
      super(pattern)
      @hash = hash
    end
  private

    def query(path, exts, formats)
      query = ""
      EXTENSIONS.each_key do |ext|
        query << '(' << exts[ext].map {|e| e && Regexp.escape(".#{e}") }.join('|') << '|)'
      end
      query = /^(#{Regexp.escape(path)})#{query}$/

      templates = []
      @hash.each do |_path, array|
        source, updated_at = array
        next unless _path =~ query
        handler, format, variant = extract_handler_and_format_and_variant(_path, formats)
        templates << Template.new(source, _path, handler,
          :virtual_path => path.virtual,
          :format => format,
          :variant => variant,
          :updated_at => updated_at
        )
      end

      templates.sort_by {|t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size }
    end
  end
Trapezoid Diagonally Semicircular Trapezoid Pentagon
\usepackage{listings}
\usepackage{color}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}

\lstset{ %
  backgroundcolor=\color{white},  % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
  basicstyle=\footnotesize,       % the size of the fonts that are used for the code
  breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
  breaklines=true,                % sets automatic line breaking
  captionpos=b,                   % sets the caption-position to bottom
  commentstyle=\color{mygreen},    % comment style
  deletekeywords={...},            % if you want to delete keywords from the given language
  escapeinside={\%*}{*)},          % if you want to add LaTeX within your code
  extendedchars=true,              % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
  frame=single,                    % adds a frame around the code
  keepspaces=true,                 % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
  keywordstyle=\color{blue},       % keyword style
  language=Octave,                 % the language of the code
  morekeywords={*,...},            % if you want to add more keywords to the set
  numbers=left,                    % where to put the line-numbers; possible values are (none, left, right)
  numbersep=5pt,                   % how far the line-numbers are from the code
  numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
  rulecolor=\color{black},         % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
  showspaces=false,                % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
  showstringspaces=false,          % underline spaces within strings only
  showtabs=false,                  % show tabs within strings adding particular underscores
  stepnumber=2,                    % the step between two line-numbers. If it's 1, each line will be numbered
  stringstyle=\color{mymauve},     % string literal style
  tabsize=2,                       % sets default tabsize to 2 spaces
  title=\lstname                   % show the filename of files included with \lstinputlisting; also try caption instead of title
class noordzij_cube : public std::basic_ostream<char>
{
public:
    textify() : std::basic_ostream<char>(new scribe_buf()) { }
    void open(std::string host, unsigned short port, std::string category, int timeout)
    {
        scribe_buf * buf = (scribe_buf*)rdbuf();
        buf->open(host, port, category, timeout);
    }
};
╔══╤═══╤══╤══╤════╤═══╤════╤═════╗ ╔══╤═══╤══╤══╤════╤═══╤════╤═════╗
║RkTmWLGBRSRS%WL  ║ ║RkTmWLGBRSRS%WL  ║
╠══╪═══╪══╪══╪════╪═══╪════╪═════╣ ╠══╪═══╪══╪══╪════╪═══╪════╪═════╣
║ 1│OAK│58│34│----│5  │-1.7│62-30║ ║ 6│BOS│38│34│10.2│3.2│-1.7│62-30║
║ 2│LAA│54│37│----│5.1│ 1  │53-38║ ║ 7│HOU│36│37│11.8│3  │ 1  │53-38║
║ 3│DET│51│37│----│4.9│ 0.6│49-39║ ║ 8│TOR│31│37│26.8│2.8│ 0.6│49-39║
║ 4│BAL│50│41│----│4.4│ 0.2│48-43║ ║ 9│DJR│30│41│44.2│2.6│ 0.2│48-43║
║ 5│SEA│49│43│----│4  │ 0.6│53-39║ ║10│SEA│29│43│----│2  │ 0.6│53-39║

Code Beaches

  • California
  • New York
  • Washington
  • Massachusetts

Input is a flexible system of fonts designed specifically for code by David Jonathan Ross. It offers both monospaced and proportional fonts, all with a large range of widths, weights, and styles for richer code formatting.

See what makes Input a different coding typeface.