-
Notifications
You must be signed in to change notification settings - Fork 942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable to load custom fonts #80
Comments
Excuse me, where is this supposed to be located? in the mj-head? |
@trolologuy correct yes, I've updated the description. |
@arnaudbreton thanks for the answer, so i did add the |
Any news on this? Is it already possible to use custom fonts within |
+1 |
+1 here - any news? |
I saw you released the font-feature in Version 1.3. When is it going to be out? |
👍 Would love the feature |
+1 |
Quite limited clients support custom fonts though https://www.campaignmonitor.com/dev-resources/will-it-work/webfonts/ |
Still it would be a usefull feature, I can understand if it's not put inside the core but it would be nice to be able to add custom element within the head too. I noticed there was an // Give us the ability to inject arbitrary html within the head
registerMJHeadElement('gfont', function (options) {
return `<link href="https://fonts.googleapis.com/css?family=${options.attribs.name}" rel="stylesheet" type="text/css"/>`
})
// Stick with the same process used for registering classic Element
import gfont from 'custom/component/gfont'
registerMJHeadElement(gfont) I looked into the core and saw something leading me to believe we can use fonts here https://github.com/mjmlio/mjml/blob/master/packages/mjml-core/src/configs/defaultContainer.js#L18 |
You can now easily import fonts in MJML 2.3 ! They're added on the fly if used, documentation is here https://github.com/mjmlio/mjml/blob/master/packages/mjml-head-font/README.md and will be available on the website tomorrow ! |
Hi! A question, Can I use a custom font but the font is not a google font? Whit a archive .ttf? |
Hi @joseGuisado You can check this article about using non-google font in email https://www.campaignmonitor.com/blog/email-marketing/2012/12/using-web-fonts-in-email/ |
Most of MJML is working great for me (which is saying something), but I'm running into an issue with mj-font and mailchimp. This issue was raised in #22 but doesn't seem to have been resolved. Any solution that I'm missing? Thanks! |
Well this is an issue from Mailchimp side and not from MJML code. We're importing font the safest way to prevent any trouble with Outlook & other clients. Some people got it to works when disabling the mailchimp CSS Inliner but I don't know if the option is still available |
Mailchimp response to this was: web-fonts are poorly supported so we don't
support @import.
Kind Regards,
:----------------------------:
Dale McConnell
…On 27 January 2017 at 17:15, Maxime Brazeilles ***@***.***> wrote:
Well this is an issue from Mailchimp side and not from MJML code. We're
importing font the safest way to prevent any trouble with Outlook & other
clients. Some people got it to works when disabling the mailchimp CSS
Inliner but I don't know if the option is still available
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKxLOMEZXCYfGEp2KCsc6YJYodwHL76nks5rWhgigaJpZM4Hfbx8>
.
|
Following up on issues #49 and #19, we want to provide MJML users with a way to define and use custom fonts in their MJML markup. The idea here is to discuss openly here and to settle on a final implementation by the end of the week.
A new
mj-font
tag is introduced, allowing to render a cross-clients valid HTML code to load custom fonts. The new tag markup could be the following:In order to separate such meta definition from the content itself, a new
mjml
root tag, along withmj-head
are introduced and described in details in issue #78.The text was updated successfully, but these errors were encountered: