Skip to content

feat(@angular-devkit/build-angular): inline Google and Adobe fonts located in stylesheets #26621

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

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

alan-agius4
Copy link
Collaborator

@import url() to Google and Adobe fonts that are located in global and component CSS will now be inlined when using the esbuild based builders.

Input

@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,500);

Output

/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

Closes #23054

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Dec 8, 2023
@alan-agius4 alan-agius4 changed the title feat(@angular-devkit/build-angular): inline Google and Adobe fonts located in stylesheets. feat(@angular-devkit/build-angular): inline Google and Adobe fonts located in stylesheets Dec 8, 2023
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Dec 8, 2023
@alan-agius4 alan-agius4 force-pushed the inline-fonts-in-all-css branch 3 times, most recently from d3d1241 to ce4bb81 Compare December 8, 2023 13:27
@alan-agius4 alan-agius4 requested a review from clydin December 8, 2023 17:39
@alan-agius4 alan-agius4 force-pushed the inline-fonts-in-all-css branch from ce4bb81 to 46f8334 Compare December 9, 2023 06:56
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 9, 2023
@alan-agius4 alan-agius4 force-pushed the inline-fonts-in-all-css branch from 46f8334 to 3c96806 Compare December 9, 2023 07:01
…cated in stylesheets

`@import url()` to Google and Adobe fonts that are located in global and component CSS will now be inlined when using the esbuild based builders.

Input
```css
@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,500);
```

Output
```css
/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
```

Closes angular#23054
@alan-agius4 alan-agius4 force-pushed the inline-fonts-in-all-css branch from 3c96806 to f1f331e Compare December 9, 2023 07:02
@alan-agius4 alan-agius4 merged commit f6e67df into angular:main Dec 9, 2023
@alan-agius4 alan-agius4 deleted the inline-fonts-in-all-css branch December 9, 2023 07:17
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support font-inlining for global styles
2 participants