Answered by:
ADFS theme is not serving a font file

Question
-
We are trying to use a custom font on our ADFS sign-in page. We have run this command:
Set-AdfsWebTheme -TargetName "customthemename" -AdditionalFileResource @{Uri="/adfs/portal/fonts/ourfont.eot";Path="C:\webtheme\fonts\ourfont.eot"}
However, we are getting a 404 when we navigate to /adfs/portal/fonts/ourfont.eot. We are able to register URLs for additional CSS assets using this method, but fonts are not working. Is there a way we can get the ADFS sign-in site serving a font file?
Tuesday, August 6, 2019 11:02 PM
Answers
-
Nope, we cannot import font files in a web theme.
Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
- Marked as answer by SeanW1 Wednesday, August 7, 2019 12:16 AM
Tuesday, August 6, 2019 11:49 PM
All replies
-
Nope, we cannot import font files in a web theme.
Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
- Marked as answer by SeanW1 Wednesday, August 7, 2019 12:16 AM
Tuesday, August 6, 2019 11:49 PM -
Got it, thank you.Wednesday, August 7, 2019 12:16 AM
-
That said... It seems that as long as the browser supports it... You could import your font as a CSS file, and reference it in a src property in the CSS file. It seems to work for Chrome and TTF file.
Set-AdfsWebTheme -TargetName Custom -AdditionalFileResource @{Uri="/adfs/portal/vegan.css";Path="C:\webtheme\css\Vegan.ttf"}
Then reference it in the StyleSheet.css file... Modify the StyleSheet.css file with:
…
@font-face { font-family: vegan;
src: url('/adfs/portal/vegan.css'); }
…Then import the CSS:
Set-AdfsWebTheme -TargetName Custom -StyleSheet @{Path = "C:\Webtheme\css\style.css" }
Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Wednesday, August 7, 2019 3:37 PM