Override Gmail font with thymeleaf

Viewed 45

I want to override Gmail default font using Thymeleaf with my custom font (a google font) and I tried these but none works:

1, using internal CSS

<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,700;1,900&display=swap');
p,pre {
        font-family: 'Nunito', sans-serif;
      }
</style>

2, using inline CSS

<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,700;1,900&display=swap');
</style>

<p class="mail-body-greeting" th:text="#{email.activation.greeting(${user.firstName})}" style="font-family: 'Nunito', sans-serif;">Dear John</p>

Am I missing something?

0 Answers
Related