[MlMt] Setting a custom monospace font for code

Denis Ricard d.ricard at me.com
Sun May 10 11:50:16 EDT 2020


It depends on what you want to use the font with. If it’s all text 
messages, and not only the code part, then it’s like setting any font 
in MailMate. You first choose `Show Fonts` from the `Format` menu, then 
you click in a plain text message, and change the font (sometimes you 
need to change the font size back and forth to make the change 
register).

That’s the way to change fonts in all the interface of MailMate by the 
way (list of emails, etc.).


If you want a specific font just for the code snippets (which would 
apply in both plain text and html messages), there is a way with a 
[hidden prefs](https://manual.mailmate-app.com/hidden_preferences) which 
I use. In terminal insert this (then return):

```bash
defaults write com.freron.MailMate MmDefaultCSS -string 'code { 
font-family: “Fira Code”, Monaco, monospace; }'
```

And restart Mailmate.

As the hidden prefs document mentions, it’s “strongly discouraged” 
(I’m not sure why) but I use it and it works fine for me.

Best regards,
Denis

On 10 May 2020, at 4:36, Patrick Schratz wrote:

> Hi,
>
> I’ve successfully set custom fonts for HTML and text messages (in 
> ~/Library/Application 
> Support/MailMate/Resources/MmMessagesWebView/stylesheet.css) and 
> enabled pygments syntax highlighting via the bundle.
>
> https://freron.lighthouseapp.com/projects/58672/tickets/2029-different-font-support-for-plain-text-and-html-mails
>
> Is there a way to also set the monospace font separately? I’d like 
> to use a font with ligatures like Fira Code.
>
> Best, Patrick
> _______________________________________________
> mailmate mailing list
> mailmate at lists.freron.com
> https://lists.freron.com/listinfo/mailmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20200510/5931d318/attachment.htm>


More information about the mailmate mailing list