Skip to content

Font format incorrect import in theme #29719

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

Closed
1 of 5 tasks
mrtuvn opened this issue Aug 22, 2020 · 4 comments · Fixed by #29726
Closed
1 of 5 tasks

Font format incorrect import in theme #29719

mrtuvn opened this issue Aug 22, 2020 · 4 comments · Fixed by #29726
Assignees
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@mrtuvn
Copy link
Contributor

mrtuvn commented Aug 22, 2020

Preconditions:

Magento 2.4-develop

Default magento font import lib-font-face use type woff or woff2. In real case when user use another font type such as true type. Font import will work incorrect if add format truetype

Example in less define custom font

.lib-font-face( @family-name: 'Inter-Light', @font-path: '@{baseDir}fonts/Inter-Light', @font-format: 'ttf', @font-weight: normal, @font-style: normal, @font-display: auto );

will generate css font-face

@font-face { font-family: 'Inter-Light'; src: url('../fonts/Inter-Light.ttf') format('ttf'); font-weight: normal; font-style: normal; font-display: auto; }
format font src seem incorrect in the case truetype. Reference in this doc

https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face

src: url('../fonts/Inter-Light.ttf') format('ttf') should be

src: url('../fonts/Inter-Light.ttf') format('truetype');

Steps to Reproduce:

  1. Tested with font added with /web/css/source/_typography.less inside luma/blank theme or custom theme
  2. Use custom font non-default from magento (ttf, eot)
  3. use format specific while import font
  4. Also use type font specific too
  5. Make sure output css render and page load without problem. Font render correctly

Actual Result: ✖️

Font not render properly
font_before_change

styles-m.css render with font
Screenshot from 2020-10-05 21-26-58

Expected Result: ✔️

import
font_after_import
render styles-m.css
font_render_after
web font request
font_after_change

Proposed solution

--- Update mixin font with new type font argument in order import correct type
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users with no workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@mrtuvn mrtuvn added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Aug 22, 2020
@m2-assistant
Copy link

m2-assistant bot commented Aug 22, 2020

Hi @mrtuvn. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Aug 22, 2020
@harold-tech
Copy link

I.still don't know what I'm doing but I will work until I know but me an Ci have a date and its no rush

@ghost ghost assigned mrtuvn Aug 24, 2020
@ghost ghost added Progress: PR in progress Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Priority: P3 May be fixed according to the position in the backlog. and removed Progress: ready for QA labels Aug 24, 2020
@m2-community-project m2-community-project bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: PR in progress Progress: PR Created Indicates that Pull Request has been created to fix issue labels Sep 24, 2020
@engcom-Alfa engcom-Alfa added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Oct 6, 2020
@m2-community-project m2-community-project bot added Progress: ready for dev and removed Progress: PR Created Indicates that Pull Request has been created to fix issue labels Oct 6, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-38231 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 6, 2020
@magento-engcom-team
Copy link
Contributor

Hi @mrtuvn. Thank you for your report.
The issue has been fixed in #29726 by @mrtuvn in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Oct 7, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants