Skip to content

Commit

Permalink
Changed Font Faces
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpetersen committed May 26, 2015
1 parent efa0fef commit 5b412e9
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CodePrinter
Codeprinter
============
CodePrinter's goal is pretty self-explanatory: to make it easier to print out code on paper. Many IDE's either don't allow you to print or have some weird quirks like adding unneccessary headers and footers, not allowing you to change your font size, or not providing syntax highlighting on your printout.
Codeprinter's goal is pretty self-explanatory: to make it easier to print out code on paper. Many IDE's either don't allow you to print or have some weird quirks like adding unneccessary headers and footers, not allowing you to change your font size, or not providing syntax highlighting on your printout.

CodePrinter makes it easy. Simply copy your code into the text box, select your desired font, font size, and syntax highlighting theme and then hit print.
Codeprinter makes it easy. Simply copy your code into the text box, select your desired font, font size, and syntax highlighting theme and then hit print.

Screenshots
============
Expand Down
12 changes: 12 additions & 0 deletions assets/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/bootstrap.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/js/codeprinter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Global variables
var textSpace = document.getElementById('typeSpace');
var printSpace = document.getElementById('printSpace');
var fonts = ["Andale Mono", "Courier", "Droid Sans Mono", "Ubuntu Mono"];
var fonts = ["AnonymousPro", "Courier", "CutiveMono", "DroidSansMono"];
var fontSizes = ["8px", "9px", "10px", "11px", "12px", "13px", "14px","15px",
"16px"];
var themes = ["None", "GitHub", "VS", "XCode"];
Expand Down Expand Up @@ -58,7 +58,7 @@ function changeFont(font)
document.getElementById(fonts[i]).className="";
}
// Highlight the desired item
document.getElementById(font).className="selected";
document.getElementById(font.replace(/ /g, "")).className="selected";
}

/**
Expand Down
2 changes: 1 addition & 1 deletion assets/js/codeprinter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

<title>codeprinter</title>

<!-- Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Cutive+Mono|Droid+Sans+Mono|Anonymous+Pro' rel='stylesheet' type='text/css'>

<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">

<!-- Google Fonts -->
<link href='https://fonts.googleapis.com/css?family=Ubuntu+Mono|Droid+Sans+Mono' rel='stylesheet' type='text/css'>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Expand Down Expand Up @@ -57,11 +57,11 @@
<li class="dropdown">
<a href="font" title="Choose a font!" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-font" style="color: #777777;"></span>&nbsp;<span class="caret" style="color: #777777;"></span></a>
<ul class="dropdown-menu" role="menu">
<li id="Andale Mono"><a href="javascript:undefined;" onClick="changeFont('Andale Mono');">Andale Mono</a></li>
<li id="AnonymousPro"><a href="javascript:undefined;" onClick="changeFont('Anonymous Pro');">Anonymous Pro</a></li>
<!-- Default Font -->
<li id="Courier" class="selected"><a href="javascript:undefined;" onClick="changeFont('Courier');">Courier</a></li>
<li id="Droid Sans Mono"><a href="javascript:undefined;" onClick="changeFont('Droid Sans Mono');">Droid Sans Mono</a></li>
<li id="Ubuntu Mono"><a href="javascript:undefined;" onClick="changeFont('Ubuntu Mono');">Ubuntu Mono</a></li>
<li id="CutiveMono"><a href="javascript:undefined;" onClick="changeFont('Cutive Mono');">Cutive Mono</a></li>
<li id="DroidSansMono"><a href="javascript:undefined;" onClick="changeFont('Droid Sans Mono');">Droid Sans Mono</a></li>
</ul>
</li>
<!-- Font sizes -->
Expand Down

0 comments on commit 5b412e9

Please sign in to comment.