Skip to content

Commit 6869d40

Browse files
author
Angular Builds
committed
c08c78c fix(@angular-devkit/build-angular): inlining of fonts results in jagged fonts for Windows users
1 parent 34579ed commit 6869d40

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@angular-devkit/build-angular",
3-
"version": "17.0.6+sha-3df3e58",
3+
"version": "17.0.6+sha-c08c78c",
44
"description": "Angular Webpack Build Facade",
55
"main": "src/index.js",
66
"typings": "src/index.d.ts",
77
"builders": "builders.json",
88
"dependencies": {
99
"@ampproject/remapping": "2.2.1",
10-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#3df3e58",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#3df3e58",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#3df3e58",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#c08c78c",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#c08c78c",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#c08c78c",
1313
"@babel/core": "7.23.2",
1414
"@babel/generator": "7.23.0",
1515
"@babel/helper-annotate-as-pure": "7.22.5",
@@ -20,7 +20,7 @@
2020
"@babel/preset-env": "7.23.2",
2121
"@babel/runtime": "7.23.2",
2222
"@discoveryjs/json-ext": "0.5.7",
23-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#3df3e58",
23+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#c08c78c",
2424
"@vitejs/plugin-basic-ssl": "1.0.1",
2525
"ansi-colors": "4.1.3",
2626
"autoprefixer": "10.4.16",

src/utils/index-file/inline-fonts.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,16 @@ class InlineFontsProcessor {
195195
.get(url, {
196196
agent,
197197
headers: {
198-
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36',
198+
/**
199+
* Always use a Windows UA. This is because Google fonts will including hinting in fonts for Windows.
200+
* Hinting is a technique used with Windows files to improve appearance however
201+
* results in 20-50% larger file sizes.
202+
*
203+
* @see http://google3/java/com/google/fonts/css/OpenSansWebFontsCssBuilder.java?l=22
204+
* @see https://fonts.google.com/knowledge/glossary/hinting (short)
205+
* @see https://glyphsapp.com/learn/hinting-manual-truetype-hinting (deep dive)
206+
*/
207+
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
199208
},
200209
}, (res) => {
201210
if (res.statusCode !== 200) {

uniqueId

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fri Dec 08 2023 15:29:45 GMT+0000 (Coordinated Universal Time)
1+
Sat Dec 09 2023 07:01:57 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)