A Pen by Dave DeSandro on CodePen.
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
| (function($) | |
| { | |
| $.fn.detectFont = function() | |
| { | |
| var fonts = window.getComputedStyle(this[0], null).getPropertyValue('font-family').split(","); | |
| if (fonts.length) | |
| { | |
| return fonts[0]; | |
| } | |
| else |
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
| #! /bin/bash | |
| # build the environment | |
| mkdir tessenv; cd tessenv | |
| TROOT=`pwd` | |
| mkdir $TROOT/stockfonts; mkdir $TROOT/build; mkdir $TROOT/build/eng | |
| echo "Environment built" | |
| # Get the stock english fonts from Google (old, but they work) | |
| cd $TROOT/stockfonts | |
| GET http://tesseract-ocr.googlecode.com/files/boxtiff-2.01.eng.tar.gz > boxtiff-2.01.eng.tar.gz |