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). – Ulrike Fischer Oct 12 '20 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? – fogof mylife Oct 12 '20 at 16:11
  • well then use the family name, you get it with my answer. – Ulrike Fischer Oct 12 '20 at 16:16
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? – fogof mylife Oct 13 '20 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.