Mashiane Expert Licensed User Longtime User May 9, 2022 #1 Hi I have added a font with B4X: BANano.Header.AddCSSFile("https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900") and my UI is not showing the expected look, so after running a page inspect I notice that there is no reference to the font. Perhaps this is normal behaviour, please advice. Thanks in advance.
Hi I have added a font with B4X: BANano.Header.AddCSSFile("https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900") and my UI is not showing the expected look, so after running a page inspect I notice that there is no reference to the font. Perhaps this is normal behaviour, please advice. Thanks in advance.
alwaysbusy Expert Licensed User Longtime User May 9, 2022 #2 Yes, this is expected behavior as this is no css file. Try (font-family may need !important if some other css is already setting the body font-family): B4X: #if CSS @import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900'); body { font-family: 'Roboto'; } #End If Alwaysbusy Upvote 0
Yes, this is expected behavior as this is no css file. Try (font-family may need !important if some other css is already setting the body font-family): B4X: #if CSS @import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900'); body { font-family: 'Roboto'; } #End If Alwaysbusy
Mashiane Expert Licensed User Longtime User May 9, 2022 #3 Thanks, strange because this is the link from the Vuetify site.. B4X: <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> I have just tried your suggestion, sadly same behavior. For now I will just refer to Assets folder resource. You said... alwaysbusy said: this is no css file. Click to expand... and used @import, so its a module? wow! Upvote 0
Thanks, strange because this is the link from the Vuetify site.. B4X: <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> I have just tried your suggestion, sadly same behavior. For now I will just refer to Assets folder resource. You said... alwaysbusy said: this is no css file. Click to expand... and used @import, so its a module? wow!