zsh2270365028的个人博客分享 http://blog.sciencenet.cn/u/zsh2270365028

博文

[转载]STIX Fonts

已有 1023 次阅读 2022-1-20 16:09 |个人分类:Python|系统分类:科研笔记|文章来源:转载

refer to:  https://matplotlib.org/stable/gallery/text_labels_and_annotations/stix_fonts_demo.html#sphx-glr-gallery-text-labels-and-annotations-stix-fonts-demo-py


STIX Fonts

Demonstration of STIX Fonts used in LaTeX rendering.

stix fonts demo

import matplotlib.pyplot as pltcircle123 = "\N{CIRCLED DIGIT ONE}\N{CIRCLED DIGIT TWO}\N{CIRCLED DIGIT THREE}"tests = [
    r'$%s\;\mathrm{%s}\;\mathbf{%s}$' % ((circle123,) * 3),
    r'$\mathsf{Sans \Omega}\;\mathrm{\mathsf{Sans \Omega}}\;'
    r'\mathbf{\mathsf{Sans \Omega}}$',
    r'$\mathtt{Monospace}$',
    r'$\mathcal{CALLIGRAPHIC}$',
    r'$\mathbb{Blackboard\;\pi}$',
    r'$\mathrm{\mathbb{Blackboard\;\pi}}$',
    r'$\mathbf{\mathbb{Blackboard\;\pi}}$',
    r'$\mathfrak{Fraktur}\;\mathbf{\mathfrak{Fraktur}}$',
    r'$\mathscr{Script}$',]fig = plt.figure(figsize=(8, len(tests) + 2))for i, s in enumerate(tests[::-1]):
    fig.text(0, (i + .5) / len(tests), s, fontsize=32)plt.show()




https://m.sciencenet.cn/blog-587102-1321880.html

上一篇:[转载]python Mathtext Examples
下一篇:[转载]python Text watermark

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-16 03:42

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部