Default font for project

We need a place to set up a ‘default font’ for a project, so that every text object uses it by default if no individual font is specified. It also might be a good idea, to make sure this font is included in every new GDevelop project that’s created, so when it’s published the correct font is always there.


I understand setting a default font for a project, it’s a good idea, but I didn’t understand the last part about including the font in all the other GDevelop projects.

So basically I noticed that when I ran my game in browser (of of liluo), the text placement, spacing, etc was different than in the editor. Someone informed me that it will just happen to use whatever is most common in use on the system, and that GDevelop doesn’t have control over that. However when I added an actual font file, everything displayed as it was supposed to. I proposed having this default font literally in the project folder you created when you created a new project. This means is this default font would always be in the project regardless of where you exported.

I’d make it optional, because I prefer a plain font instead of a wrongly themed inherited one.

But I also would like to establish an user defined default font (I was unaware of this inconsistency between systems).

For me the best thing is:

In preferences:

  • a switch between “let system decide font” <> “override system font”
  • an optional “user defined default font”

In new-project-popup:

  • a switch between “Gdevelop default font” <> “user defined default font” <> a “chose font” option pointing to the last used font

Just to clear up some items on here:

This is what supplying a font file does in text objects (including BBText objects). Not sure there needs to be a separate space to replicate existing functionality.

For clarity, I believe right now leaving the font file blank will have it use whatever the system defines as “Arial”, which is actually different on different OSes and some browsers (some have different weightings/spacing/etc).

For the last one, this is already how fonts behave. As soon as you add one to a project it is always selectable from the dropdown on any new text object.

Otherwise, some sort of project wide field that lets you select a default font makes sense to me, too.

1 Like