From 337e87a765cc7d5f96db2a4e2ce437328f98efd4 Mon Sep 17 00:00:00 2001 From: Josh Borrow Date: Tue, 30 May 2023 04:46:55 -0400 Subject: [PATCH] Change font styles to work well without LaTeX (#94) * Change IEEE to use Times-style fonts * Updated to use computer modern (same as LaTeX) by default * Changed IEEE to use Times fonts. --- scienceplots/styles/journals/ieee.mplstyle | 5 ++++- scienceplots/styles/science.mplstyle | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scienceplots/styles/journals/ieee.mplstyle b/scienceplots/styles/journals/ieee.mplstyle index d93fe31..db929b8 100644 --- a/scienceplots/styles/journals/ieee.mplstyle +++ b/scienceplots/styles/journals/ieee.mplstyle @@ -11,5 +11,8 @@ figure.dpi : 600 # Font sizes font.size : 8 + +# Stix is designed to look similar to Times. font.family : serif -font.serif : Times +font.serif : STIXGeneral +mathtext.fontset : stix diff --git a/scienceplots/styles/science.mplstyle b/scienceplots/styles/science.mplstyle index cf30423..af271b3 100644 --- a/scienceplots/styles/science.mplstyle +++ b/scienceplots/styles/science.mplstyle @@ -39,9 +39,10 @@ savefig.bbox : tight savefig.pad_inches : 0.05 # Use serif fonts -# font.serif : Times +font.serif : cmr10, Computer Modern Serif, DejaVu Serif font.family : serif -mathtext.fontset : dejavuserif +axes.formatter.use_mathtext : True +mathtext.fontset : cm # Use LaTeX for math formatting text.usetex : True