Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E720 Topic 8 Question 12 Discussion

Actual exam question for Adobe's AD0-E720 exam
Question #: 12
Topic #: 8
[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:

Corazon
6 months ago
I agree with Vanda, adding the custom font using the lib-font-face mixin seems like the best practice for this scenario.
upvoted 0 times
...
Vanda
6 months ago
I'm not sure, but I think option C might be the right choice, as we need to use the lib-font-face mixin for custom fonts.
upvoted 0 times
...
Golda
7 months ago
I disagree, I believe the correct answer is D, as we need to add the font-family directly into the email template.
upvoted 0 times
...
Mammie
7 months ago
I think the correct answer is A, because we need to import the font into the email.less file.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77