From 7c6fed78846a4225ea4a289746ea30a6e69d6ce8 Mon Sep 17 00:00:00 2001 From: david reid Date: Fri, 20 Mar 2015 18:12:25 +0000 Subject: [PATCH] Try and have correctly formatted code blocks... --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e6ff4fa..efbf955 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It was developed using Python 3.4 and will work to a degree with Python 2 it nee ## Simple Usage -'''python +```python >>> from zttf.ttfile import TTFile >>> font_file = TTFile('DroidSans.ttf') >>> font_file.is_valid @@ -21,11 +21,11 @@ Droid Sans DroidSans >>> face.italic_angle 0 -''' +``` When used with a font collection, there will be multiple faces available. -'''python +```python >>> from zttf.ttfile import TTFile >>> font_file = TTFile('Futura.ttc') >>> font_file.is_valid @@ -42,11 +42,11 @@ Futura-MediumItalic Futura-CondensedMedium >>> font_file.faces[3].name Futura-CondensedExtraBold -''' +``` Subsetting is done by passing in a subset of the characters desired. All required glyphs will be found and copied into the new file. -'''python +```python >>> from zttf.ttfile import TTFile >>> font_file = TTFile('Futura.ttc') >>> subset = [ord('H'), ord('e'), ord('l'), ord('o')] @@ -55,5 +55,5 @@ Subsetting is done by passing in a subset of the characters desired. All require ... >>> with open('new_font.ttf', 'wb') as fh: fh.write(sub_font.output()) -''' +```