|
1 |
| -#!/usr/bin/env python |
2 |
| - |
3 |
| -from __future__ import unicode_literals |
4 |
| - |
5 | 1 | import os
|
6 | 2 | import sys
|
7 | 3 | import re
|
8 |
| - |
9 | 4 | import gc
|
| 5 | +import matplotlib.pyplot as plt |
| 6 | + |
| 7 | +from __future__ import unicode_literals |
10 | 8 |
|
11 | 9 | stests = [
|
12 |
| - r'$\mathcircled{123} \mathrm{\mathcircled{123}} \mathbf{\mathcircled{123}}$', |
13 |
| - r'$\mathsf{Sans \Omega} \mathrm{\mathsf{Sans \Omega}} \mathbf{\mathsf{Sans \Omega}}$', |
| 10 | + r'$\mathcircled{123} \mathrm{\mathcircled{123}} \ |
| 11 | + \mathbf{\mathcircled{123}}$', |
| 12 | + r'$\mathsf{Sans \Omega} \mathrm{\mathsf{Sans \Omega}} \ |
| 13 | + \mathbf{\mathsf{Sans \Omega}}$', |
14 | 14 | r'$\mathtt{Monospace}$',
|
15 | 15 | r'$\mathcal{CALLIGRAPHIC}$',
|
16 | 16 | r'$\mathbb{Blackboard \pi}$',
|
|
22 | 22 | if sys.maxunicode > 0xffff:
|
23 | 23 | s = r'Direct Unicode: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
|
24 | 24 |
|
25 |
| -from pylab import * |
26 |
| - |
27 |
| - |
28 | 25 | def doall():
|
29 | 26 | tests = stests
|
30 | 27 |
|
31 |
| - figure(figsize=(8, (len(tests) * 1) + 2)) |
32 |
| - plot([0, 0], 'r') |
33 |
| - grid(False) |
34 |
| - axis([0, 3, -len(tests), 0]) |
35 |
| - yticks(arange(len(tests)) * -1) |
| 28 | + plt.figure(figsize=(8, (len(tests) * 1) + 2)) |
| 29 | + plt.plot([0, 0], 'r') |
| 30 | + plt.grid(False) |
| 31 | + plt.axis([0, 3, -len(tests), 0]) |
| 32 | + plt.yticks(arange(len(tests)) * -1) |
36 | 33 | for i, s in enumerate(tests):
|
37 |
| - #print(i, s.encode("ascii", "backslashreplace")) |
38 |
| - text(0.1, -i, s, fontsize=32) |
| 34 | + plt.text(0.1, -i, s, fontsize=32) |
39 | 35 |
|
40 |
| - savefig('stix_fonts_example') |
41 |
| - #close('all') |
42 |
| - show() |
| 36 | + plt.savefig('stix_fonts_example') |
| 37 | + plt.show() |
43 | 38 |
|
44 | 39 | if '--latex' in sys.argv:
|
45 | 40 | fd = open("stix_fonts_examples.ltx", "w")
|
|
0 commit comments