# Custom Font on Source View Doesn't Apply (Windows PC)

**URL:** <https://forum.obsidian.md/t/custom-font-on-source-view-doesnt-apply-windows-pc/78698>\
**Category:** Devs: Theme Design & Custom CSS\
**Tags:** windows, custom-css\
**Created:** [March 16, 2024, 9:12am UTC](https://forum.obsidian.md/t/custom-font-on-source-view-doesnt-apply-windows-pc/78698 "2024-03-16T09:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TwilightPossum](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/t/ac91a4/32.png) [@TwilightPossum](https://forum.obsidian.md/u/TwilightPossum)\
**Post date:** [March 16, 2024, 9:12am UTC](https://forum.obsidian.md/t/custom-font-on-source-view-doesnt-apply-windows-pc/78698/1 "2024-03-16T09:12:31Z")

</div>

### What I’m trying to do

Import a global, custom font that can be overwritten with inside note pages. I would like a certain global font, but have the ability to change font in certain lines, for certain words, or specific paragraphs.

### Things I have tried

Downloaded Custom Font Loader and loaded all of my fonts into the fonts folder. They show up and I have selected the “Multiple Fonts” option. If I select “Force Style” it sets it to the last font in alphabetical order and will not let me use so I really need to be able to do this without “Force Style”. I do not have a theme on when trying to do this.

My CSS snippet is as follows:

```auto
body {
  font-family: 'Macondo', serif;
}

.markdown-source-view {
  font-family: 'Macondo', serif !important; color: cyan; }

```

The body block works as intended. But the source-view block will not apply the font no matter what I do. It will, however, apply the color. I am not sure how this is possible.

---

<div class="post-metadata">

**Author:** ![ariehen](https://forum.obsidian.md/user_avatar/forum.obsidian.md/ariehen/32/46932_2.png) [@ariehen](https://forum.obsidian.md/u/ariehen)\
**Post date:** [March 16, 2024, 10:01am UTC](https://forum.obsidian.md/t/custom-font-on-source-view-doesnt-apply-windows-pc/78698/2 "2024-03-16T10:01:56Z")

</div>

You need to be a bit more specific with the CSS. Give this a try, for example:

```css
/* source mode and live preview font */
.markdown-source-view.mod-cm6 .cm-scroller {
    font-family: 'Macondo', serif; 
    color: cyan; 
}

/* rendered & reading view font */
.markdown-preview-view, .markdown-rendered {
    font-family: 'Iosevka-Comfy-Duo'; 
}

```

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [June 14, 2024, 10:02am UTC](https://forum.obsidian.md/t/custom-font-on-source-view-doesnt-apply-windows-pc/78698/3 "2024-06-14T10:02:34Z")

</div>

Closed on June 14, 2024, 10:02am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
