New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E720 Exam - Topic 1 Question 31 Discussion

Actual exam question for Adobe's AD0-E720 exam
Question #: 31
Topic #: 1
[All AD0-E720 Questions]

An Adobe Commerce developer has been asked to implement a custom font specifically for emails. The Adobe Commerce developer has already added their font into the file system.

Keeping best practice in mind, which two files would need to be implemented to show the custom font in the email?

Show Suggested Answer Hide Answer
Suggested Answer: A, B

To implement a custom font specifically for emails, the developer needs to do the following steps:

Add the custom font file to the web/fonts directory of the custom theme.

Use the @import font function with the url of the custom font from the theme in the /Vendor/Theme/web/css/source/_extend.less file. This will import the custom font and make it available for use in other LESS files. For example:

@import font('custom-font', '@{baseDir}fonts/custom-font.ttf', 'truetype');

Add in the styles to target the elements that require being changed in the /Vendor/Theme/web/css/source/_email.less file. This file is used to define the styles for email templates. The developer can use the .lib-font-face() mixin to apply the custom font to specific selectors. For example:

.lib-font-face( @family-name: @custom-font, @font-path: '@{baseDir}fonts/custom-font', @font-weight: normal, @font-style: normal );

h1 { .lib-font-face( @family-name: @custom-font, @font-path: '@{baseDir}fonts/custom-font', @font-weight: normal, @font-style: normal ); }

The /vendor/Theme/web/css/source/_typography.less file is not suitable for implementing a custom font for emails, as it is used for defining global typography styles for web pages. The <head></head> tag is not used for adding fonts in email templates, as it is not supported by most email clients. Reference: [Custom fonts], [Email templates overview]


Contribute your Thoughts:

0/2000 characters
Mertie
3 months ago
Wait, can we really use custom fonts in emails? That sounds tricky!
upvoted 0 times
...
Cristal
3 months ago
I agree, _typography.less is also important for styling!
upvoted 0 times
...
Kayleigh
3 months ago
Not sure about that, wouldn’t the email template need the font-family in the head?
upvoted 0 times
...
Eliz
4 months ago
I think _extend.less is a must too!
upvoted 0 times
...
Launa
4 months ago
Definitely need to update _email.less for custom fonts.
upvoted 0 times
...
Shawnna
4 months ago
Adding the font-family directly in the email template sounds like a good idea, but I wonder if that's the best practice for emails.
upvoted 0 times
...
Kent
4 months ago
I feel like the lib-font-face mixin is important, but I can't recall if we need to create a new file for that.
upvoted 0 times
...
Haydee
4 months ago
I think we practiced a question where we had to add styles to specific elements, so maybe option B is relevant here?
upvoted 0 times
...
Sharee
5 months ago
I remember we discussed using the _extend.less file for custom fonts, but I'm not sure if we also need to modify the _email.less file.
upvoted 0 times
...
Olga
5 months ago
Okay, let me think this through. I believe the correct answer is to use the _extend.less and _email.less files to properly integrate the custom font. The _typography.less file might also be relevant, but I'm not as confident about that one.
upvoted 0 times
...
Audry
5 months ago
Hmm, I'm a bit unsure about this one. I know we need to add the font to the file system, but I'm not sure which specific files we need to edit to make it work in the emails.
upvoted 0 times
...
Kindra
5 months ago
This seems straightforward. I think the key is to implement the custom font in the right files, as the question asks.
upvoted 0 times
...
Dottie
5 months ago
This seems straightforward. I'd start by adding the font to the file system, then use the _extend.less and _email.less files to properly implement it in the emails. The key is to follow best practices, as the question mentions.
upvoted 0 times
...
Dalene
1 year ago
I'm picturing the developer frantically searching for the right font file, like a medieval scribe looking for the perfect quill.
upvoted 0 times
Toi
1 year ago
C
upvoted 0 times
...
Tiera
1 year ago
A
upvoted 0 times
...
...
Marjory
1 year ago
I'm not sure, I think it might be C) instead of D)
upvoted 0 times
...
Dolores
1 year ago
Option D? Really? Adding the font-family in the email template? That's just asking for trouble. Let's stick to the style sheets.
upvoted 0 times
...
Daniela
1 year ago
I agree with Karina, those files seem to be the right ones to implement the custom font
upvoted 0 times
...
Cora
1 year ago
Option C seems like the best practice, but I'm wondering if we need to create a new file or if we can just add it to an existing one.
upvoted 0 times
Katy
1 year ago
C) Add in a lib-font-face mixin with the custom font name into the newly created file.
upvoted 0 times
...
Elina
1 year ago
A) /Vendor/Theme/web/css/source/_extend.less Use the ^import font function with the url of the custom font from the theme. /Vendor/Theme/web/css/source/_email.less file
upvoted 0 times
...
...
Karina
1 year ago
I think the correct files are A) and D)
upvoted 0 times
...
Izetta
1 year ago
I think Option B is the way to go. We just need to target the elements that need the custom font, right?
upvoted 0 times
...
Alishia
1 year ago
Option A looks good, but I'm not sure if we need the _email.less file. Isn't that for the website design?
upvoted 0 times
Jesusa
1 year ago
D) Add the font-family into the of the email within the email template.
upvoted 0 times
...
Mammie
1 year ago
Option A is correct. The _email.less file is needed for custom fonts in emails.
upvoted 0 times
...
Rusty
1 year ago
B) Add in the styles to target the elements that require being changed. /vendor/Theme/web/css/source/_typography.less
upvoted 0 times
...
Rose
1 year ago
A) /Vendor/Theme/web/css/source/_extend.less Use the ^import font function with the url of the custom font from the theme. /Vendor/Theme/web/css/source/_email.less file
upvoted 0 times
...
...

Save Cancel