|
3 | 3 | STIX Fonts Demo
|
4 | 4 | ===============
|
5 | 5 |
|
| 6 | +Demonstration of `STIX Fonts <https://www.stixfonts.org/>`_ used in LaTeX |
| 7 | +rendering. |
6 | 8 | """
|
7 | 9 |
|
8 | 10 | import matplotlib.pyplot as plt
|
9 |
| -import numpy as np |
10 | 11 |
|
11 | 12 |
|
12 | 13 | circle123 = "\N{CIRCLED DIGIT ONE}\N{CIRCLED DIGIT TWO}\N{CIRCLED DIGIT THREE}"
|
13 | 14 |
|
14 | 15 | tests = [
|
15 |
| - r'$%s \mathrm{%s} \mathbf{%s}$' % ((circle123,) * 3), |
16 |
| - r'$\mathsf{Sans \Omega} \mathrm{\mathsf{Sans \Omega}}' |
17 |
| - r' \mathbf{\mathsf{Sans \Omega}}$', |
| 16 | + r'$%s\;\mathrm{%s}\;\mathbf{%s}$' % ((circle123,) * 3), |
| 17 | + r'$\mathsf{Sans \Omega}\;\mathrm{\mathsf{Sans \Omega}}\;' |
| 18 | + r'\mathbf{\mathsf{Sans \Omega}}$', |
18 | 19 | r'$\mathtt{Monospace}$',
|
19 | 20 | r'$\mathcal{CALLIGRAPHIC}$',
|
20 |
| - r'$\mathbb{Blackboard \pi}$', |
21 |
| - r'$\mathrm{\mathbb{Blackboard \pi}}$', |
22 |
| - r'$\mathbf{\mathbb{Blackboard \pi}}$', |
23 |
| - r'$\mathfrak{Fraktur} \mathbf{\mathfrak{Fraktur}}$', |
| 21 | + r'$\mathbb{Blackboard\;\pi}$', |
| 22 | + r'$\mathrm{\mathbb{Blackboard\;\pi}}$', |
| 23 | + r'$\mathbf{\mathbb{Blackboard\;\pi}}$', |
| 24 | + r'$\mathfrak{Fraktur}\;\mathbf{\mathfrak{Fraktur}}$', |
24 | 25 | r'$\mathscr{Script}$',
|
25 | 26 | ]
|
26 | 27 |
|
27 |
| - |
28 |
| -fig = plt.figure(figsize=(8, (len(tests) * 1) + 2)) |
| 28 | +fig = plt.figure(figsize=(8, len(tests) + 2)) |
29 | 29 | for i, s in enumerate(tests[::-1]):
|
30 | 30 | fig.text(0, (i + .5) / len(tests), s, fontsize=32)
|
31 | 31 |
|
|
0 commit comments