• Stars
    star
    390
  • Rank 110,242 (Top 3 %)
  • Language
    Shell
  • Created almost 14 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A shell script that can use other command line tools to produce @font-face compatible fonts in all browsers. Works under Windows (using Cygwin), Mac OS X and Linux

QUICK START GUIDE

This CSS3 Font Converter is a shell script that allows developers, using a command line, to convert a set of TTF and OTF fonts into all the other currently used CSS3 @font-face formats (i.e. EOT, SVG, WOFF, WOFF2).
Syntax:

convertFonts.sh <filelist>

For example, if you wanted to convert all the .ttf files in the directory you are in, you could type in the command:

$ convertFonts.sh *.ttf

The fonts will then be converted to the .eot, .woff, and .svg formats. It will also generate a stylesheet, stylesheet.css, that will produce the @font-face rules using The New Bulletproof @Font-Face Syntax.

If you are converting .otf fonts, a .ttf font will be generated first before the other fonts.

FULL COMMAND LINE OPTIONS

Usage: /Users/zhawry/bin/convertFonts.sh [-options] [fontfilelist]

Where: - [fontfilelist] is a space separated list of True Type (.ttf) or Open Type (.otf) fonts.

   - [-options] are one of the following:
   
     --use-font-weight: This option will merge all font-weights and 
     styles under the same font name.  This option will likely crash
     Apple Mobile Safari running under iOS versions less than 4.0.
     Also note that only the first four weights and styles
     will be recognized under IE7 and 8.
     
     --use-font-stretch: This option will merge all condensed and 
     expanded fonts under the same font name as the normal font.
     It is recommended *not* to use this method currently, since at
     the time of this writing, font-stretch is only supported by 
     Firefox => 9 and IE => 9.
     
     --autohint: This option will hint/re-hint fonts (using ttfautohint
     by default, or Adobe Font Development Kit for OpenType if using
     the --autohint=adobe option ). Note that this option will create
     a bunch of files prefixed with 'hinted-'.  Attempting to use this 
     option on files already prefixed with 'hinted-' will result in an 
     error.

  	 --use-font-prefix=xxx: This option will prepend the name of all the
  	 fonts with the string xxx.  This is useful when you are generating
  	 different stylesheets using the converter with the same font 
  	 but with different options.
  
  	 --output=xxx: This option will produce the resultant @font-face
     stylesheet to the file xxx. By default, xxx is set to stylesheet.css
     
     --show-features: Presents the user with a list of OpenType feature 
     tags a font supports which can be used inside a style sheet using 
     the CSS3 font-feature-settings property. The font can be in either 
     be OpenType or TrueType.
     
     --help: This help menu.

SUPPORTED OSes

Windows (using Cygwin), OS X and Linux (tested on Ubuntu 10.10 Maverick Meerkat). Please let us know if you find it works on others.

This script should run on any version of UNIX running bash. Installation instructions and more information can be found at https://github.com/zoltan-dulac/css3FontConverter

REQUIREMENTS

This script uses the following programs to do the heavy lifting.

Full instructions on how to install these packages are at:

http://www.useragentman.com/blog/the-css3-font-converter/

LICENSE

This code is released under the LGPL. License can be found at http://www.gnu.org/licenses/lgpl.html

CHANGELOG

Feb 20, 2011 - Initial Release Sep 22, 2013 - Added support for font-weight and autohinting, as well as reporting what font-feature-support tags (i.e. OpenType feature tags) are implemented by a font. Sep 02, 2014 - Added support for WOFF2 fonts, if woff2_compress is in the user's path. This program can be retrieved from here: http://code.google.com/p/font-compression-reference/w/list

CONTACT

Any bug reports, fixes or feature requests: [email protected].
Code available at https://github.com/zoltan-dulac/css3FontConverter

More Repositories

1

html5Forms.js

Implements a subset of the HTML5 Forms module, including calendars, colour swatches, sliding widgets, client side validation and more.
JavaScript
226
star
2

cssSandpaper

a CSS3 Polyfill that implements CSS3 transforms, box-shadow, gradients, opacity and RGBA/HSL/HSLA colours in browser that don't support them.
JavaScript
208
star
3

polyClip

A JavaScript library that allows cropping of images using non-rectangular shapes.
JavaScript
179
star
4

imageCache

Allows the caching of images in JavaScript with callbacks when one image completely load, and when a whole array of images completely loads.
JavaScript
40
star
5

html5ImageConverter

A series of scripts that convert image files into new image formats (APNG, WEBP, JPEG-2000, JPEG-XR) with HTML code using <picture> that works in all browsers
JavaScript
14
star
6

DragDropHelpers

This library smooths out the differences between the different browser implementations of the HTML5 Drag and Drop module. It is not a polyfill
JavaScript
14
star
7

Matrix-Construction-Set

Do pixel perfect CSS3 Transforms by dragging and dropping objects on the screen
JavaScript
11
star
8

svg-vml-textpaths

SVG and VML Text Path Examples.
JavaScript
9
star
9

progressive-pushstate

Allow pushstate/popstate support using a progressive-enhancement design pattern.
JavaScript
6
star
10

text-zoom-resize

HTML
5
star
11

TypeHelpers

Helps developers determine if font-smoothing is enabled.
JavaScript
5
star
12

kc-munchkin

A remake of an Odyssey2 game in Javascript
JavaScript
4
star
13

accessible-html5-dialog-polyfill

JavaScript
3
star
14

enable-a11y

A list of demos to show how aria roles function with screen readers.
JavaScript
3
star
15

accessibility.js

JavaScript
3
star
16

a11y-examples

A suite of examples to show how to comply with WCAG 2.0.
HTML
3
star
17

config

Config.js allows developers to configure their applications in an XML block instead of hard-coding values inside their scripts. It can also be used to store HTML templates instead of hardcoding HTML into JavaScript. The XML can be embedded inside an HTML document or in a separate XML file. The configuration block may contain strings, numbers, arrays and HTML. Furthermore, variables can be inserted into these values, allowing developers to use the XML block as a simple templating system for their applications.
JavaScript
3
star
18

circular-css3-animation

Demonstrates how to animate using circular paths using only CSS
2
star
19

fondu

A clone of the official CVS repo at http://sourceforge.net/cvs/?group_id=39411 , since it seems like it may be inactive.
C
1
star
20

virtual-brent

JavaScript
1
star
21

atari2600-naughty-boy

A port of the arcade game Naughty Boy for the Atari 2600.
1
star