Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2444d6d

Browse files
committed
DOC: add font example
1 parent 4e2741e commit 2444d6d

1 file changed

Lines changed: 35 additions & 13 deletions

File tree

doc/users/dflt_style_changes.rst

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,39 @@ The behavior of the PS and Agg backends was DPI dependent, thus::
446446

447447
There is no API level control of the hath linewidth.
448448

449+
Fonts
450+
=====
451+
452+
The default font has changed from "Bitstream Vera Sans" to "DejaVu
453+
Sans". "DejaVu Sans" is an improvement on "Bistream Vera Sans" that
454+
adds more international, and math characters, but otherwise has the
455+
same appearance. Latin, Greek, Cyrillic, Armenian, Georgian, Hebrew,
456+
and Arabic are `all supported
457+
<http://dejavu-fonts.org/wiki/Main_Page>`__ (but right-to-left render
458+
is still not handled by matplotlib). In addition to the practical,
459+
DejaVu contains a sub-set of emoji support
460+
461+
.. plot::
462+
463+
import matplotlib.pyplot as plt
464+
465+
fig, ax = plt.subplots()
466+
tick_labels = ['😃', '😎', '😴', '😲', '😻']
467+
ax.bar(range(5), [1, 4, 9, 16, 25],
468+
tick_label=tick_labels, align='center')
469+
ax.xaxis.set_tick_params(labelsize=20)
470+
ax.set_title('Участок под застройку с смайликам')
471+
472+
See the `DejaVu Sans PDF sample for full coverage
473+
<http://dejavu.sourceforge.net/samples/DejaVuSans.pdf>`__.
474+
475+
The default math font when using the built-in math rendering engine
476+
(mathtext) has changed from "Computer Modern" (i.e. LaTeX-like) to
477+
"DejaVu Sans". To revert to the old behavior, set the ``rcParam``
478+
``mathtext.fontset`` to ``cm``. This change has no effect if the
479+
TeX backend is used (i.e. ``text.usetex`` is ``True``).
480+
481+
449482
Other
450483
=====
451484

@@ -495,19 +528,6 @@ Images
495528
``True``. This will apply interpolation for both upsampling and
496529
downsampling of an image.
497530

498-
Fonts
499-
=====
500-
501-
- The default font has changed from "Bitstream Vera Sans" to "DejaVu
502-
Sans". "DejaVu Sans" is an improvement on "Bistream Vera Sans" that
503-
adds more international and math characters, but otherwise has the
504-
same appearance.
505-
506-
- The default math font when using the built-in math rendering engine
507-
(mathtext) has changed from "Computer Modern" (i.e. LaTeX-like) to
508-
"DejaVu Sans". To revert to the old behavior, set the ``rcParam``
509-
``mathtext.fontset`` to ``cm``. This change has no effect if the
510-
TeX backend is used (i.e. ``text.usetex`` is ``True``).
511531

512532
Dates
513533
=====
@@ -529,6 +549,8 @@ Legends
529549

530550
- The legend now has rounded corners by default.
531551

552+
- And a lighter border, I think? cf. #6770. (@QuLogic)
553+
532554
mplot3d
533555
=======
534556

0 commit comments

Comments
 (0)