Try and have correctly formatted code blocks...
This commit is contained in:
12
README.md
12
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
|
## Simple Usage
|
||||||
|
|
||||||
'''python
|
```python
|
||||||
>>> from zttf.ttfile import TTFile
|
>>> from zttf.ttfile import TTFile
|
||||||
>>> font_file = TTFile('DroidSans.ttf')
|
>>> font_file = TTFile('DroidSans.ttf')
|
||||||
>>> font_file.is_valid
|
>>> font_file.is_valid
|
||||||
@@ -21,11 +21,11 @@ Droid Sans
|
|||||||
DroidSans
|
DroidSans
|
||||||
>>> face.italic_angle
|
>>> face.italic_angle
|
||||||
0
|
0
|
||||||
'''
|
```
|
||||||
|
|
||||||
When used with a font collection, there will be multiple faces available.
|
When used with a font collection, there will be multiple faces available.
|
||||||
|
|
||||||
'''python
|
```python
|
||||||
>>> from zttf.ttfile import TTFile
|
>>> from zttf.ttfile import TTFile
|
||||||
>>> font_file = TTFile('Futura.ttc')
|
>>> font_file = TTFile('Futura.ttc')
|
||||||
>>> font_file.is_valid
|
>>> font_file.is_valid
|
||||||
@@ -42,11 +42,11 @@ Futura-MediumItalic
|
|||||||
Futura-CondensedMedium
|
Futura-CondensedMedium
|
||||||
>>> font_file.faces[3].name
|
>>> font_file.faces[3].name
|
||||||
Futura-CondensedExtraBold
|
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.
|
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
|
>>> from zttf.ttfile import TTFile
|
||||||
>>> font_file = TTFile('Futura.ttc')
|
>>> font_file = TTFile('Futura.ttc')
|
||||||
>>> subset = [ord('H'), ord('e'), ord('l'), ord('o')]
|
>>> 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:
|
>>> with open('new_font.ttf', 'wb') as fh:
|
||||||
fh.write(sub_font.output())
|
fh.write(sub_font.output())
|
||||||
'''
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user