Answer the question
In order to leave comments, you need to log in
How to change font and color in single piece of text in Json?
Good afternoon, I am translating dialogues for a browser game. It should be noted right away that I am not a programmer.
I just want to make the text more beautiful and, if I may say so, visually emotional)
All text is in json, the parameters for which are set in css.
At first, the text got out of the scope of the proposed field, but I coped with this by adjusting the transfer and increasing the scale of the text field. But now I have a question to which I can not find an answer yet.
1. How to change the color of individual text fragments? As far as I read, you need to create a separate class with color parameters and tag the necessary lines of text with this class. But will it work in JSON?
2. Want to change the font of individual text fragments? Here I did not find anything at all regarding json. As far as I understand, this is all somehow connected with HTML tags
Example of text in Sublime
{
"name": "",
"text": "Blah blah blah",
"type": "TXT"
},
{
"name": " 【H】",
"text": "「Blah blah blah」",
"type": "TXT",
"id": "038_0026",
"src": "/img/common/voice/ogg/v_SR038_0026 .a5f42560b8afac802b473be4de756176.ogg"
Answer the question
In order to leave comments, you need to log in
Json is a text data interchange format. You can't set colors in it, because it's just text. But when you are already processing this json, you can wrap the received information in tags and set css styles for them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question