Adding a "font-family" property for text objects. (#1311)

- Tiled displays your system fonts.
- Computers have different sets of fonts. Therefore, browsers never rely on system fonts
- Which means if you select a font in Tiled, it is quite unlikely it will render properly in WorkAdventure

To circumvent this problem, in your text object in Tiled, you can now add an additional property: `font-family`.

The `font-family` property can contain any "web-font" that can be loaded by your browser.

This allows us to use the "Press Start 2P" 8px font in text objects, which renders way better than the default "Sans serif" font of your browser.
This commit is contained in:
David Négrier 2021-07-29 17:49:51 +02:00 committed by GitHub
parent 7ffe564e8e
commit 315fe7ca82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 17 deletions

View file

@ -58,11 +58,17 @@
"height":94.6489098314831,
"id":1,
"name":"",
"properties":[
{
"name":"font-family",
"type":"string",
"value":"\"Press Start 2P\""
}],
"rotation":0,
"text":
{
"fontfamily":"Sans Serif",
"pixelsize":11,
"pixelsize":8,
"text":"Test:\nWalk on the carpet and press space\nResult:\nJitsi opens on meet.jit.si (check this in the network tab). Note: this test only makes sense if the default configured Jitsi instance is NOT meet.jit.si (check your .env file)",
"wrap":true
},