0

What is the font family name for Josefin sans? I know that the font can be set by adding

\usepackage{josefin}

in the preamble. However, I am trying to change the chapter heading style using the package secsty,

\usepackage{sectsty}

And there I need to provide the font family name

\chapterfont{\fontfamily{Font Family Name Goes Here}\selectfont}

Therefore, I need to know the font family name for the josefin font. What is the font family name for the josefin font? Moreover, how to know the font family names for different fonts in general, as in is there a list of some kind?

If there is any alternative method to change the fonts for chapter headings without using the font family name but using the package name directly, please suggest so. (Note that I intend to use different fonts for the chapter/section headings and the text in the body)

3
  • 1
    you can use \sffamily in the \chapterfont command (if the package is loaded). Oct 12, 2020 at 15:28
  • @UlrikeFischer This is not working. The reason I suppose is that I am using cmbright for the body of the text. Thus, when I am using \sffamily, cmbright is overwriting the josefin package. Any solution for that? Oct 12, 2020 at 16:11
  • well then use the family name, you get it with my answer. Oct 12, 2020 at 16:16

2 Answers 2

2
\documentclass{article}
\usepackage{josefin}

\begin{document}
\makeatletter
\sffamily the family name is \f@family 
\makeatother
\end{document}

enter image description here

1

The packages cmbright and josefin fight each other, because they both define \sfdefault and the former also defines \familydefault to be \sfdefault.

I'm not really sure you want two different sans serif fonts for your document. Anyway, this should do.

\documentclass{book}
\usepackage{cmbright}
\edef\familydefault{\familydefault}
\usepackage{josefin}
\usepackage{sectsty}

\chapterfont{\sffamily}

\begin{document}

\chapter{Title}

Some text in CM Bright. Also math $a+b=\sum_{i=1}^n x_i$.

\end{document}

enter image description here

Look at the picture to see why I'm dubious about the two fonts together.

1
  • Thanks! This code should have worked but I think overleaf does not have support for Josefin at all! Any suggestions? Oct 13, 2020 at 10:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .