5

This question already has an answer here:

I'm using the comicsans package and I noticed that it automatically changes a lot of default fonts to comics.

I was wondering if there is some command to restore everything to the default fonts?

I've already tried

\renewcommand{\rmdefault}{cmr}

The problem is the comicsans package change a lot of font families, so I would like to avoid setting everything manually to the right font (actually I don't which are the default fonts for book document) and use comic font only for few paragraph where it is needed.

marked as duplicate by Svend Tveskæg, Jesse, Guido, Heiko Oberdiek, OSjerick Jan 27 '14 at 4:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    The package changes maths as well as text fonts. (Why does it set comicsans as the default roman font?) If you only want to use comicsans for a small amount of text, this is a duplicate of the question Adam linked to. If not, you would need to be a lot more explicit about what you want to use the font for. You can override the settings but that will put you back to square one i.e. no point in loading the package in the first place. So presumably, you want to use it for something... what exactly? Just text? Maths? Both? – cfr Jan 26 '14 at 23:33
  • See also my remarks at the end of my answer: Installing the comicsans package to MiKTeX. – Speravir Jan 26 '14 at 23:39
  • 2
    Sorry, it is impossible to resist. Try to visit this webpage: comicsanscriminal.com –– I mean, depending on what you want to do, Comic Sans might be a good choice, but very easily it may be not. – yo' Jan 26 '14 at 23:42
  • 1
    I don't think this is a duplicate: comic sans is not a default font in all distributions and so it is not always just a matter of finding the family name and selectively using it. This question is worthy of an answer; and the easiest answers will be those that utilize XeTeX and/or LuaTeX. (Unrelated, but comicsans.sty does, by design, set the font as the default font.) – jon Jan 27 '14 at 0:27
  • @tohecz Giving Kill KRT the benefit of the doubt, he surely is writing an anti-Comic Sans pamphlet in LaTeX. But yeah, I also read no further than "I'm using the comicsans package" before I thought "WRONG!" ;) – Christian Jan 27 '14 at 1:37
8

The best would be, if you’d avoid loading the package. And also it is a bad idea to use this font for longer text parts. Comic Sans once was developed for Comics – hence the name – where the text is usually short. In my eyes it is depending on the context sometimes tolerable in headings, for instance in texts for children. On the other hand it is over used. See also Comic Sans Criminal - There's help available for people like you!.

Instead do one of the following things:

  • If you need the Type1 version define these two commands without loading the package

    \newcommand*{\cmcsans}{\fontfamily{comic}\selectfont}
    \DeclareTextFontCommand{\textcmcsans}{\cmcsans}
    

    and use this in the same way, as you would do with \sffamily (conforms to \cmcsans) and \textsf (conforms to \textcmcsans) and companions. To say this once again explicitly: This works without loading of the package comicsans, as long as it is correctly installed.

  • You could also install winfonts into a local root (cf. Create a local texmf tree in MiKTeX). This package makes several TrueType fonts installed in the Windows system available for pdfTeX. But see next point and note the warning in the documentation of this package:

    With these fonts, the T1 encoding is not not [sic!] complete: some glyph are missing, depending on the font. … You should test closely a font before using it for productive works.

    See perhaps ‘The usage of “sic” in writing’.

    I do not know, whether this is valid for the Comic Sans part, too, and if this also relates to the fact, that the TrueType version of Comic Sans lacks font files for italic (or slanted) and bold italic.

  • Instead of this second approach TrueType/OpenType fonts are better directly available with LuLaTeX and XeLaTeX using the package fontspec (this may be loaded in background by another package, most notably luatextra and xltxtra). Create a new font family and define again the corresponding text font command as above

    \newfontfamily\cmcsans{Comic Sans MS}
    % if there are problems with this variant use this one instead:
    % \newfontfamily\cmcsans[BoldFont=comicbd.ttf]{comic.ttf}
    \DeclareTextFontCommand{\textcmcsans}{\cmcsans}
    

    And again this could be used like \sffamily or \textsf.

Some links at the end, if you want to change the titles:

It is most easy with KOMA-Script classes, cf. KOMA-Script: change font of sectioning headings to serif.

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\newcommand*{\cmcsans}{\fontfamily{comic}\selectfont}
\DeclareTextFontCommand{\textcmcsans}{\cmcsans}
\addtokomafont{sectioning}{\cmcsans}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}

output of example code

For memoir see this for a start: Changing font size of chapter headings the same as that of section and Is there an easy way to change the font and size for Chapter Heading in Memoir?.

For standard classes see this one Change size of section, subsection, subsubsection, paragraph and subparagraph title.

  • Thank you, so basically my solution has been removing the \usepackage{comicsans} since I had already created a command as you suggested. I'm a little newbie, I didn't know that \usepackage is not necessary to use external fonts. – Kill KRT Jan 28 '14 at 20:58
  • @KillKRT: Yes, it is usually not necessary, but in most cases it is also for fonts better to load the respective package. Simply take a look into the package files (with .sty extension) for some fonts. You would have needed to put most of this code into your document preamble (though the package author must have different use cases in mind, while you probably need only a part of this). – Speravir Jan 28 '14 at 21:08

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