Allow users to choose font

AI-generated summary

Users are discussing ways to allow users to choose their preferred font in Discourse. Jonathan5 initially asked how this could be achieved, and michaelhenderson suggested requesting a plugin to add this functionality.

awesomerobot proposed two possible solutions: creating multiple themes with different fonts, although this may become complicated if offering a variety of themes with different styles; or creating a plugin that allows users to change their font preference, which would be more seamless.

Another approach suggested by Heliosurge involves adding a user field that integrates a Google Font component, similar to an existing feature discussed in the Google Fonts topic, to allow users to choose from a list of fonts.

How could this be achieved?

Would it require multiple themes, each identical except for its font and name?

I did some searching on the forum and didn’t really find a topic with information that could help you achieve this. You might need to request the feature to have the functionality written into a plugin. You might could request a plug-in that changes the font in the feature category.

In a theme you could probably do this by adding a setting that saves to localStorage, the downside being that users would have to change the preference in each browser they use.

You could have multiple themes, but that would get complicated if you want to offer more themes that change styles beyond the font.

A plugin would be a little more complicated, but would probably be the most seamless way to do it, because you could add actual settings instead of relying on browser storage or having many themes.

Could it possible with adding a user field with modifying. somethong like your google font component to allow user to choose from a liat?