marp-team / marp-vscode

Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode
MIT License
1.58k stars 75 forks source link

How to change the font of the preview? #108

Closed kokikntm closed 4 years ago

kokikntm commented 4 years ago
---
marp: true
---

<style>
.slide{
font-family: 'Noto Sans JP', serif !important;
}
</style>

If I changed the font like this, the exported pdf was the font but the preview was not. I also added "markdown.preview.fontFamily": "Meiryo UI", in the settings.json of VScode, but the preview was not.

yhatt commented 4 years ago

Same trouble as marp-team/marp-cli#161. Probably you are seeing a styling reference for the outdated Marp app.

Use section selector instead of .slide.

<style>
section {
  font-family: 'Noto Sans JP', serif !important;
}
</style>

NOTE: GitHub issue tracker is not suitable place to question. Refer to our support guideline.

kokikntm commented 4 years ago

Solved. Thank you very much!