Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
331 views
in Q2A Core by
I will change the font of my website.

But I don't understand how to do it.

If anyone tells me how to add custom fonts to my website.
Q2A version: Latest version

1 Answer

+1 vote
by

The fonts are defined in the stylesheet of your theme (usually qa-styles.css). In its simplest form a font definition will look somewhat like this:

body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
}

The above tells the browser to render text in the Verdana, Arial or Helvetica font (whichever is found first on the user's computer), and fall back to the generic "sans-serif" that is configured in the user's browser if none of the former are present. Helvetica, Arial and Verdana are the most common sans-serif fonts in the usual operating systems (Windows, Mac OS, Linux), hence font-family attributes for sans-serif text usually consist of those. The equivalent list for serif fonts is something like "Georgia, Garamond, Times New Roman, Roman, serif."

If you want to use a custom font that may not be present on the user's computer you'll have to provide the font file(s) in the Web Open Font Format (WOFF) and define a custom font-face. I posted the details in this answer on my own Q&A site.

...