Change font face only for specific documents

Using a cssclass to change fonts per-note would look something like this:

If you want the same font for all viewing modes, it could be simplified to:

/* change <cssclasshere> for each snippet & note */
.markdown-source-view.cssclasshere .cm-scroller, .markdown-preview-view.cssclasshere {
    font-family: 'Comic Sans MS';
}

and I usually add this if I don’t want the inline-title and Properties font to change:

/* revert inline-title and properties font <cssclasshere> note(s) */
.cssclasshere :is(.inline-title, .metadata-container) {
    font-family: var(--font-text); 
} 

Using the plugin efemkay suggested is working on my end, no cssclasses: in the note needed. Set the path, the class, and reload/restart Obsidian.

Screenshot 2024-07-17 074245