design-system
design-system copied to clipboard
System Fonts Question
Hello ! I just wonder if we could use a local / google font instead of system fonts please ?
Hi @Celibioux, We could technically add the font-family to the theme so that it can be extended. But the question will be more about "How you'll load the custom font?".
Do you need the custom font for a Strapi App customization or is it for an application that has no relation with Strapi?
@soupette @gu-stav @ronronscelestes I would love to have your thought on it.
@HichamELBSI Thank you for your quick replay for the how? i couldn't answer as i still discover the Strapi code source ^^ ( something like : https://github.com/typekit/webfontloader won't help ?
and for second question i need to match the branding of the Strapi admin panel with my Nuxtjs app as i'm building a scool app in my country so the customizations are 100% related to Strapi
Thanks for your time reading this
I think we could add the font-family to the font-family to the theme for the moment so it can be extended. Wdyt ? @ronronscelestes @gu-stav
@HichamELBSI Technically speaking this could be a good solution, yes. I'm not sure if we want to have this kind of customization in Strapi though, because changing the font family might have huge implications on the design and issues coming up because of this because different families render at different widths and heights. Since in some parts of the UI the space is very limited this could become a problem. Before we open this customization path, I'd like to have approval from @maevalienard - if she does, the solution of allowing the font-family sounds ok to me.
Hi! We could wait for the designer's opinion on it I agree. Just so you know, it was discussed in our squad to add in-app font customization - so it might fit this future need actually!
@HichamELBSI any updates on this please ? thanks
Oh sorry, the delay is on me because I was discussing the idea with the other designers of the team :D
I actually don't think opening the font style to any type of font would be scalable, because they couldn't be adapted to the interface (papyrus, comic sans ms, etc.). However, I think we could open the interface to the most popular Google fonts, but I'd rather see an interface in Strapi to do so. I don't know how complex that would be though, @HichamELBSI do you have any opinion?
It is technically possible but by loading the fonts dynamically we may have some perf issues on the Strapi app, some UI flickering as we had at some point on the v3. Event more since we may have to load a font name from a local storage or from a user profile before loading the font itself 🤷🏽♂️ .
Hum I see. Would that be the same if we only allow it in the code? (the solution you suggested above)
hello folks ! any updates on this one ?
This is not currently on our roadmap. I would open a request in Canny – https://strapi.canny.io/ to get some traction and visibility. There are product implications we need to consider such as UI breaking etc. therefore it can't just be implemented on a development level.
It's not impossible but would most likely require us to also add the customisation feature to the main strapi app to make it work easier for users.
Related to this feature request: https://feedback.strapi.io/feature-requests/p/primary-color-fonts-customization Closing