my fork of the bluesky client

Use Inter variable font (#5540)

authored by

Eric Bailey and committed by
GitHub
b4941d85 adaa79a4

+18 -167
+2 -18
app.config.js
··· 234 234 'expo-font', 235 235 { 236 236 fonts: [ 237 - // './assets/fonts/inter/Inter-Thin.otf', 238 - // './assets/fonts/inter/Inter-ThinItalic.otf', 239 - // './assets/fonts/inter/Inter-ExtraLight.otf', 240 - // './assets/fonts/inter/Inter-ExtraLightItalic.otf', 241 - // './assets/fonts/inter/Inter-Light.otf', 242 - // './assets/fonts/inter/Inter-LightItalic.otf', 243 - './assets/fonts/inter/Inter-Regular.otf', 244 - './assets/fonts/inter/Inter-Italic.otf', 245 - './assets/fonts/inter/Inter-Medium.otf', 246 - './assets/fonts/inter/Inter-MediumItalic.otf', 247 - './assets/fonts/inter/Inter-SemiBold.otf', 248 - './assets/fonts/inter/Inter-SemiBoldItalic.otf', 249 - './assets/fonts/inter/Inter-Bold.otf', 250 - './assets/fonts/inter/Inter-BoldItalic.otf', 251 - './assets/fonts/inter/Inter-ExtraBold.otf', 252 - './assets/fonts/inter/Inter-ExtraBoldItalic.otf', 253 - './assets/fonts/inter/Inter-Black.otf', 254 - './assets/fonts/inter/Inter-BlackItalic.otf', 237 + './assets/fonts/inter/InterVariable.ttf', 238 + './assets/fonts/inter/InterVariable-Italic.ttf', 255 239 ], 256 240 }, 257 241 ],
assets/fonts/inter/InterVariable-Italic.ttf

This is a binary file and will not be displayed.

assets/fonts/inter/InterVariable.ttf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-Black.66e9a87f1c921e844ed4.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-Bold.8d330503e1d034ad68de.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-BoldItalic.bb17e63f9baa0d861a20.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-ExtraBold.ff2581a193bf6b7e0b06.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-ExtraBoldItalic.0e50b40728d24d40fdf4.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-Italic.95778eb0c75dc956257e.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-Medium.296aa2d65964269836b3.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-MediumItalic.0e57e17a6311368e2114.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-Regular.1f5ed03b6dd9fd1f9982.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-SemiBold.2277990330981b8409bb.otf

This is a binary file and will not be displayed.

bskyweb/static/media/Inter-SemiBoldItalic.f62fea3df3a521d6c8a7.otf

This is a binary file and will not be displayed.

bskyweb/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf

This is a binary file and will not be displayed.

bskyweb/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf

This is a binary file and will not be displayed.

+3 -19
bskyweb/templates/base.html
··· 13 13 14 14 <!-- Hello Humans! API docs at https://atproto.com --> 15 15 16 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Regular.1f5ed03b6dd9fd1f9982.otf"> 17 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Italic.95778eb0c75dc956257e.otf"> 18 - <!-- 19 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Medium.296aa2d65964269836b3.otf"> 20 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-MediumItalic.0e57e17a6311368e2114.otf"> 21 - --> 22 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-SemiBold.2277990330981b8409bb.otf"> 23 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-SemiBoldItalic.f62fea3df3a521d6c8a7.otf"> 24 - <!-- 25 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Bold.8d330503e1d034ad68de.otf"> 26 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BoldItalic.bb17e63f9baa0d861a20.otf"> 27 - --> 28 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-ExtraBold.ff2581a193bf6b7e0b06.otf"> 29 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-ExtraBoldItalic.0e50b40728d24d40fdf4.otf"> 30 - <!-- 31 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Black.66e9a87f1c921e844ed4.otf"> 32 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf"> 33 - --> 16 + <link rel="preload" as="font" type="font/ttf" href="/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf"> 17 + <link rel="preload" as="font" type="font/ttf" href="/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf"> 34 18 35 19 <style> 36 20 /** ··· 53 37 body { 54 38 margin: 0px; 55 39 padding: 0px; 56 - font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif; 40 + font-family: InterVariable, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif; 57 41 text-rendering: optimizeLegibility; 58 42 /* Platform-specific reset */ 59 43 -webkit-overflow-scrolling: touch;
+2 -23
src/alf/fonts.ts
··· 40 40 fontFamily: 'system' | 'theme', 41 41 ) { 42 42 if (fontFamily === 'theme') { 43 - style.fontFamily = 44 - { 45 - // '100': 'Inter-Thin', 46 - // '200': 'Inter-ExtraLight', 47 - // '300': 'Inter-Light', 48 - // '500': 'Inter-Medium', 49 - // '700': 'Inter-Bold', 50 - // '900': 'Inter-Black', 51 - '100': 'Inter-Regular', 52 - '200': 'Inter-Regular', 53 - '300': 'Inter-Regular', 54 - '400': 'Inter-Regular', 55 - '500': 'Inter-SemiBold', 56 - '600': 'Inter-SemiBold', 57 - '700': 'Inter-SemiBold', 58 - '800': 'Inter-ExtraBold', 59 - '900': 'Inter-ExtraBold', 60 - }[style.fontWeight as string] || 'Inter-Regular' 43 + style.fontFamily = 'InterVariable' 61 44 62 45 if (style.fontStyle === 'italic') { 63 - if (style.fontFamily === 'Inter-Regular') { 64 - style.fontFamily = 'Inter-Italic' 65 - } else { 66 - style.fontFamily += 'Italic' 67 - } 46 + style.fontFamily += 'Italic' 68 47 } 69 48 70 49 // fallback families only supported on web
+8 -88
src/style.css
··· 7 7 */ 8 8 9 9 @font-face { 10 - font-family: 'Inter-Regular'; 11 - src: local('Inter-Regular'), 12 - url(/assets/fonts/inter/Inter-Regular.otf) format('opentype'); 13 - font-weight: 400; 14 - font-style: normal; 15 - font-display: swap; 16 - } 17 - @font-face { 18 - font-family: 'Inter-Italic'; 19 - src: local('Inter-Italic'), 20 - url(/assets/fonts/inter/Inter-Italic.otf) format('opentype'); 21 - font-weight: 400; 22 - font-style: italic; 23 - font-display: swap; 24 - } 25 - /* 26 - @font-face { 27 - font-family: "Inter-Medium"; 28 - src: local("Inter-Medium"), url(/assets/fonts/inter/Inter-Medium.otf) format("opentype"); 29 - font-weight: 500; 30 - font-style: normal; 31 - font-display: swap; 32 - } 33 - @font-face { 34 - font-family: "Inter-MediumItalic"; 35 - src: local("Inter-MediumItalic"), url(/assets/fonts/inter/Inter-MediumItalic.otf) format("opentype"); 36 - font-weight: 500; 37 - font-style: italic; 38 - font-display: swap; 39 - } 40 - */ 41 - @font-face { 42 - font-family: 'Inter-SemiBold'; 43 - src: local('Inter-SemiBold'), 44 - url(/assets/fonts/inter/Inter-SemiBold.otf) format('opentype'); 45 - font-weight: 600; 46 - font-style: normal; 47 - font-display: swap; 48 - } 49 - @font-face { 50 - font-family: 'Inter-SemiBoldItalic'; 51 - src: local('Inter-SemiBoldItalic'), 52 - url(/assets/fonts/inter/Inter-SemiBoldItalic.otf) format('opentype'); 53 - font-weight: 600; 54 - font-style: italic; 55 - font-display: swap; 56 - } 57 - /* 58 - @font-face { 59 - font-family: "Inter-Bold"; 60 - src: local("Inter-Bold"), url(/assets/fonts/inter/Inter-Bold.otf) format("opentype"); 61 - font-weight: 700; 62 - font-style: normal; 63 - font-display: swap; 64 - } 65 - @font-face { 66 - font-family: "Inter-BoldItalic"; 67 - src: local("Inter-BoldItalic"), url(/assets/fonts/inter/Inter-BoldItalic.otf) format("opentype"); 68 - font-weight: 700; 69 - font-style: italic; 70 - font-display: swap; 71 - } 72 - */ 73 - @font-face { 74 - font-family: 'Inter-ExtraBold'; 75 - src: local('Inter-ExtraBold'), 76 - url(/assets/fonts/inter/Inter-ExtraBold.otf) format('opentype'); 77 - font-weight: 800; 78 - font-style: normal; 79 - font-display: swap; 80 - } 81 - @font-face { 82 - font-family: 'Inter-ExtraBoldItalic'; 83 - src: local('Inter-ExtraBoldItalic'), 84 - url(/assets/fonts/inter/Inter-ExtraBoldItalic.otf) format('opentype'); 85 - font-weight: 800; 86 - font-style: italic; 87 - font-display: swap; 88 - } 89 - /* 90 - @font-face { 91 - font-family: "Inter-Black"; 92 - src: local("Inter-Black"), url(/assets/fonts/inter/Inter-Black.otf) format("opentype"); 93 - font-weight: 900; 10 + font-family: 'InterVariable'; 11 + src: local('InterVariable'), 12 + url(/assets/fonts/inter/InterVariable.ttf) format('truetype'); 13 + font-weight: 300 1000; 94 14 font-style: normal; 95 15 font-display: swap; 96 16 } 97 17 @font-face { 98 - font-family: "Inter-BlackItalic"; 99 - src: local("Inter-BlackItalic"), url(/assets/fonts/inter/Inter-BlackItalic.otf) format("opentype"); 100 - font-weight: 900; 18 + font-family: 'InterVariableItalic'; 19 + src: local('InterVariableItalic'), 20 + url(/assets/fonts/inter/InterVariable-Italic.ttf) format('truetype'); 21 + font-weight: 300 1000; 101 22 font-style: italic; 102 23 font-display: swap; 103 24 } 104 - */ 105 25 106 26 /** 107 27 * BEGIN STYLES
+3 -19
web/index.html
··· 18 18 <link rel="preconnect" href="https://bsky.network"> 19 19 <title>%WEB_TITLE%</title> 20 20 21 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Regular.1f5ed03b6dd9fd1f9982.otf"> 22 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Italic.95778eb0c75dc956257e.otf"> 23 - <!-- 24 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Medium.296aa2d65964269836b3.otf"> 25 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-MediumItalic.0e57e17a6311368e2114.otf"> 26 - --> 27 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-SemiBold.2277990330981b8409bb.otf"> 28 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-SemiBoldItalic.f62fea3df3a521d6c8a7.otf"> 29 - <!-- 30 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Bold.8d330503e1d034ad68de.otf"> 31 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BoldItalic.bb17e63f9baa0d861a20.otf"> 32 - --> 33 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-ExtraBold.ff2581a193bf6b7e0b06.otf"> 34 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-ExtraBoldItalic.0e50b40728d24d40fdf4.otf"> 35 - <!-- 36 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Black.66e9a87f1c921e844ed4.otf"> 37 - <link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf"> 38 - --> 21 + <link rel="preload" as="font" type="font/ttf" href="/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf"> 22 + <link rel="preload" as="font" type="font/ttf" href="/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf"> 39 23 40 24 <style> 41 25 /** ··· 58 42 body { 59 43 margin: 0px; 60 44 padding: 0px; 61 - font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif; 45 + font-family: InterVariable, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif; 62 46 text-rendering: optimizeLegibility; 63 47 /* Platform-specific reset */ 64 48 -webkit-overflow-scrolling: touch;