> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/fi/fontit/02-font-typefaces.md).

# Fonttiperheet

## Johdanto

Oletusarvoisesti LaTeX taittaa asiakirjat käyttäen $$\text{Computer Modern}$$ fonttiperhettä, mutta voit käyttää LaTeX-paketteja eri fonttien käyttämiseen tarpeidesi tai mieltymystesi mukaan.

## Oletusasiakirjafonttien muuttaminen

Esimerkiksi lisäämällä `\usepackage{tgbonum}` asiakirjan esipuheeseen LaTeX käyttää TEX Gyre Bonum -fonttiperhettä asiakirjasi taittoon:

```latex
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tgbonum}

\begin{document}
Tämä asiakirja on esimerkkiasiakirja fontti-
perheiden ja fonttityyppien testaamiseen.

Tämä teksti käyttää eri fonttityyppiä
\end{document}
```

[Avaa tämä esimerkki Overleafissa](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Change+LaTeX+fonts\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5BT1%5D%7Bfontenc%7D%0A%5Cusepackage%7Btgbonum%7D%0A%0A%5Cbegin%7Bdocument%7D%0AThis+document+is+a+sample+document+to+test+font+%0Afamilies+and+font+typefaces.%0A%0AThis+text+uses+a+different+font+typeface%0A%5Cend%7Bdocument%7D)

Seuraava kuva näyttää yllä olevan esimerkin tuottaman tuloksen:

![FontTypefacesEx1OLV2.png](/files/ead886dd2eda469abaefe83c714529ea1f1fc496)

## Oletusfonttityypin muuttaminen

Fonttia voidaan muuttaa myös asiakirjan tietylle elementille.

```latex
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tgbonum}

\begin{document}
Tämä asiakirja on esimerkkiasiakirja
fonttiperheiden ja fonttityyppien testaamiseen.

{\fontfamily{qcr}\selectfont
Tämä teksti käyttää eri fonttityyppiä
}
\end{document}
```

[Avaa tämä esimerkki Overleafissa](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Change+LaTeX+fonts\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5BT1%5D%7Bfontenc%7D%0A%5Cusepackage%7Btgbonum%7D%0A%0A%5Cbegin%7Bdocument%7D%0AThis+document+is+a+sample+document+to+%0Atest+font+families+and+font+typefaces.%0A%0A%7B%5Cfontfamily%7Bqcr%7D%5Cselectfont%0AThis+text+uses+a+different+font+typeface%0A%7D%0A%5Cend%7Bdocument%7D)

Seuraava kuva näyttää yllä olevan esimerkin tuottaman tuloksen:

![FontTypefacesEx2.png](/files/a4a437adf4981f51a5c9923c5dfc2c0a497dfa34)

Komento `\fontfamily{qcr}\selectfont` asettaa *TeX Gyre Cursor* fonttityypin, jonka fonttikoodi on `qcr`, aaltosulkeiden sisällä olevalle tekstille. Saatavilla on paljon lisää LaTeX-fonttityyppejä, katso [viiteopas](#reference-guide).

Suositut LaTeX-fonttityypit ovat peräisin neljästä perheestä:

* *Computer Modern* (oletus standardeissa LaTeX-luokissa): CM Roman, CM Sans Serif, CM Typewriter
* *Latin Modern*: LM Roman, LM Sans Serif, LM Typewriter, LM Dunhill
* *PostScript-fontit*: Times, Utopia/Fourier, Palatino, Bookman, Helvetica, Courier
* *TeX Gyre*

## Viiteopas

**Roman-, Sans Serif- ja Typewriter-fonttityypit**

| Fontti                       | "fonttipaketin nimi" | "fonttikoodi" | Esimerkki                                                             |
| ---------------------------- | -------------------- | ------------- | --------------------------------------------------------------------- |
| Computer Modern Roman        |                      | `cmr`         | ![Typeface-cmr.png](/files/1f1363e0397edb01731b1e043bdec74f834be4d5)  |
| Latin Modern Roman           | `lmodern`            | `lmr`         | ![Typeface-lmr.png](/files/1bf41c0677a1339dcea7668e54cefa7fb24d87fd)  |
| Latin Modern Dunhill         | `lmodern`            | `lmdh`        | ![Typeface-lmdh.png](/files/505d214aee5040e2b5e004ff4592e86ea468b3d1) |
| TeX Gyre Termes              | `tgtermes`           | `qtm`         | ![Typeface-qtm.png](/files/ac343dcfc678c23151ba19288da02e297b62a2b2)  |
| TeX Gyre Pagella             | `tgpagella`          | `qpl`         | ![Typeface-qpl.png](/files/cf97c18518967b3e08ebb4557d8c8d56e6a4f3c5)  |
| TeX Gyre Bonum               | `tgbonum`            | `qbk`         | ![Typeface-qbk.png](/files/01fd9334e7f3d3060b867ef8b64ff91a91cd1948)  |
| TeX Gyre Schola              | `tgschola`           | `qcs`         | ![Typeface-qsc.png](/files/7c4b5a0dcfa92cab0ea9b566df99960a18e36cde)  |
| Times                        | `mathptmx`           | `ptm`         | ![Typeface-ptm.png](/files/a8a3c850cb3648815efc167bec5f2e91a98d19a1)  |
| Utopia / Fourier             | `utopia` / `fourier` | `put`         | ![Typeface-put.png](/files/31a32c17d18fc2dae052489c20f3a1ce175714fb)  |
| Palatino                     | `palatino`           | `ppl`         | ![Typeface-ppl.png](/files/d6813322dadb5de7cea4fd0402ce079de9ddfb3c)  |
| Bookman                      | `bookman`            | `pbk`         | ![Typeface-pbk.png](/files/2678ccb675c349ac7941ba8ccf363c658f7adcf0)  |
| Charter                      | `charter`            | `bch`         | ![Typeface-bch.png](/files/f2a56856f1e4266eb66f85117015ecae8d281c47)  |
| Computer Modern Sans Serif   |                      | `cmss`        | ![Typeface-cmss.png](/files/4d189edc54a4e0fc3083415d02350561da348ea2) |
| Latin Modern Sans Serif      | `lmodern`            | `lmss`        | ![Typeface-lmss.png](/files/f98010cf8e9f5ae83dc1486081095df0a1aa0817) |
| TeX Gyre Adventor            | `tgadventor`         | `qag`         | ![Typeface-qag.png](/files/b1f0c9e01c4eaff2534591bf1e38c7fec21248a9)  |
| TeX Gyre Heros               | `tgheros`            | `qhv`         | ![Typeface-qhv.png](/files/7c2c46a2ba95155224eac4df3c2cd0db3589c2f1)  |
| Helvetica                    | `helvet`             | `phv`         | ![Typeface-phv.png](/files/b3c2695a5c9c7f11887f20153ec0d8892b11e2a8)  |
| Computer Modern Typewriter   |                      | `cmtt`        | ![Typeface-cmtt.png](/files/058b0db1e22b5802c7e61bdd9592e55e1833b018) |
| Latin Modern Sans Typewriter | `lmodern`            | `lmtt`        | ![Typeface-lmtt.png](/files/cbd2bc3eaac964518d371889200a9ced9ee02568) |
| TeX Gyre Cursor              | `tgcursor`           | `qcr`         | ![Typeface-qcr.png](/files/9746936ad62a55909b4448bbba9f3973f367f882)  |
| Courier                      | `courier`            | `pcr`         | ![Typeface-pcr.png](/files/ad681977ee66662e5791a6dcdd2921f3a9df70cd)  |

Katso myös [LaTeX-fonttien luettelo](https://tug.org/FontCatalogue/), mutta huomaa, että kaikilla luettelossa mainituilla fonteilla ei ole lisenssiä, joka sallii niiden jakelun osana TeX Liveä, eikä siksi kaikkia näitä fontteja ole saatavilla Overleafissa.

## Lisälukemista

Lisätietoja löydät:

* [LaTeX-fonttien luettelo](https://tug.org/FontCatalogue/).
* [Lihavointi, kursivointi ja alleviivaus](/latex/fi/latexin-perusteet/03-bold-italics-and-underlining.md)
* [Kirjasinkoot, -perheet ja -tyylit](/latex/fi/fontit/01-font-sizes-families-and-styles.md)
* [Modernien fonttien tuki XeLaTeXillä](/latex/fi/fontit/03-xelatex.md)
* [Kappalemuotoilu](/latex/fi/muotoilu/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [Rivinvaihdot ja tyhjät välit](/latex/fi/muotoilu/05-line-breaks-and-blank-spaces.md)
* [Useita palstoja](/latex/fi/muotoilu/09-multiple-columns.md)
* [Yksipuoliset ja kaksipuoliset asiakirjat](/latex/fi/muotoilu/08-single-sided-and-double-sided-documents.md)
* [Hallinta suuressa projektissa](/latex/fi/asiakirjan-rakenne/07-management-in-a-large-project.md)
* [Useita tiedostoja sisältävät LaTeX-projektit](/latex/fi/asiakirjan-rakenne/08-multi-file-latex-projects.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/fi/fontit/02-font-typefaces.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
