Bluesky app fork with some witchin' additions 💫

Font loading improvements (#6993)

* Font loading improvements

* Reconvert with missing files

* Update bskyweb/templates/base.html

Co-authored-by: Rick Viscomi <rviscomi@users.noreply.github.com>

* Update bskyweb/templates/base.html

Co-authored-by: Rick Viscomi <rviscomi@users.noreply.github.com>

* Run web-build to update hashes

* Revert Android to otf

* Use Inter woff2 files

---------

Co-authored-by: Rick Viscomi <rviscomi@users.noreply.github.com>

authored by

Barry Pollard
Rick Viscomi
and committed by
GitHub
bee50c39 6308e91d

+10 -12
+2 -2
app.config.js
··· 234 'expo-font', 235 { 236 fonts: [ 237 - './assets/fonts/inter/InterVariable.ttf', 238 - './assets/fonts/inter/InterVariable-Italic.ttf', 239 // Android only 240 './assets/fonts/inter/Inter-Regular.otf', 241 './assets/fonts/inter/Inter-Italic.otf',
··· 234 'expo-font', 235 { 236 fonts: [ 237 + './assets/fonts/inter/InterVariable.woff2', 238 + './assets/fonts/inter/InterVariable-Italic.woff2', 239 // Android only 240 './assets/fonts/inter/Inter-Regular.otf', 241 './assets/fonts/inter/Inter-Italic.otf',
assets/fonts/inter/Inter-Black.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-BlackItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-Bold.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-BoldItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-ExtraBold.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-ExtraBoldItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-ExtraLight.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-ExtraLightItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-Italic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-Light.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-LightItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-Medium.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-MediumItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-Regular.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-SemiBold.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-SemiBoldItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-Thin.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/Inter-ThinItalic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/InterVariable-Italic.woff2

This is a binary file and will not be displayed.

assets/fonts/inter/InterVariable.woff2

This is a binary file and will not be displayed.

bskyweb/static/media/InterVariable-Italic.01dcbad1bac635f9c9cd.woff2

This is a binary file and will not be displayed.

bskyweb/static/media/InterVariable.c504db5c06caaf7cdfba.woff2

This is a binary file and will not be displayed.

+3 -4
bskyweb/templates/base.html
··· 13 14 <!-- Hello Humans! API docs at https://atproto.com --> 15 16 - <link rel="preload" as="font" type="font/ttf" href="{{ staticCDNHost }}/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf"> 17 - <link rel="preload" as="font" type="font/ttf" href="{{ staticCDNHost }}/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf"> 18 19 <style> 20 /** ··· 26 */ 27 @font-face { 28 font-family: 'InterVariable'; 29 - src: url("{{ staticCDNHost }}/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf") format('truetype'); 30 font-weight: 300 1000; 31 font-style: normal; 32 font-display: swap; 33 } 34 @font-face { 35 font-family: 'InterVariableItalic'; 36 - src: url("{{ staticCDNHost }}/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf") format('truetype'); 37 font-weight: 300 1000; 38 font-style: italic; 39 font-display: swap;
··· 13 14 <!-- Hello Humans! API docs at https://atproto.com --> 15 16 + <link rel="preload" as="font" type="font/ttf" href="{{ staticCDNHost }}/static/media/InterVariable.c504db5c06caaf7cdfba.woff2"> 17 18 <style> 19 /** ··· 25 */ 26 @font-face { 27 font-family: 'InterVariable'; 28 + src: url("{{ staticCDNHost }}/static/media/InterVariable.c504db5c06caaf7cdfba.woff2") format('woff2'); 29 font-weight: 300 1000; 30 font-style: normal; 31 font-display: swap; 32 } 33 @font-face { 34 font-family: 'InterVariableItalic'; 35 + src: url("{{ staticCDNHost }}/static/media/InterVariable-Italic.01dcbad1bac635f9c9cd.woff2") format('woff2'); 36 font-weight: 300 1000; 37 font-style: italic; 38 font-display: swap;
+2 -2
src/alf/util/unusedUseFonts.ts
··· 9 */ 10 export function DO_NOT_USE() { 11 return useFonts({ 12 - InterVariable: require('../../../assets/fonts/inter/InterVariable.ttf'), 13 - 'InterVariable-Italic': require('../../../assets/fonts/inter/InterVariable-Italic.ttf'), 14 }) 15 }
··· 9 */ 10 export function DO_NOT_USE() { 11 return useFonts({ 12 + InterVariable: require('../../../assets/fonts/inter/InterVariable.woff2'), 13 + 'InterVariable-Italic': require('../../../assets/fonts/inter/InterVariable-Italic.woff2'), 14 }) 15 }
+3 -4
web/index.html
··· 18 <link rel="preconnect" href="https://bsky.network"> 19 <title>%WEB_TITLE%</title> 20 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"> 23 24 <style> 25 /** ··· 31 */ 32 @font-face { 33 font-family: 'InterVariable'; 34 - src: url(/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf) format('truetype'); 35 font-weight: 300 1000; 36 font-style: normal; 37 font-display: swap; 38 } 39 @font-face { 40 font-family: 'InterVariableItalic'; 41 - src: url(/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf) format('truetype'); 42 font-weight: 300 1000; 43 font-style: italic; 44 font-display: swap;
··· 18 <link rel="preconnect" href="https://bsky.network"> 19 <title>%WEB_TITLE%</title> 20 21 + <link rel="preload" as="font" type="font/woff2" href="/static/media/InterVariable.c504db5c06caaf7cdfba.woff2" crossorigin> 22 23 <style> 24 /** ··· 30 */ 31 @font-face { 32 font-family: 'InterVariable'; 33 + src: url(/static/media/InterVariable.c504db5c06caaf7cdfba.woff2) format('woff2'); 34 font-weight: 300 1000; 35 font-style: normal; 36 font-display: swap; 37 } 38 @font-face { 39 font-family: 'InterVariableItalic'; 40 + src: url(/static/media/InterVariable-Italic.01dcbad1bac635f9c9cd.woff2) format('woff2'); 41 font-weight: 300 1000; 42 font-style: italic; 43 font-display: swap;