Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please help me with how to modify the default_font setting? #590

Closed
Nanyuting opened this issue Dec 24, 2024 · 3 comments
Closed
Labels

Comments

@Nanyuting
Copy link

Code Example:
var _string = "[fnt1]Juju is the best {_value},he is powerful"
{_value} will be replaced with "[fnt2]mage[/f]" during actual gameplay.
The expected display should be:
"[fnt1]Juju is the best [fnt2]mage[/f],he is powerful"
However, the actual display results in:
"[fnt1]Juju is the best [fnt2]mage[/f],? ? ?"
This issue occurs because [fnt1] is a Chinese font, and __scribble_state.__default_font does not support Chinese.

What I have in mind is that I might need to modify __scribble_state.__default_font = "fnt1" before rendering the string, but I'm not sure whether this is possible.

I’ve had difficulty finding similar information online, so I’m afraid I’m bothering you with this.
Or should I modify the settings elsewhere?
I apologize for the inconvenience.
c4bb6bd8-3ddc-4cf0-bde1-eb6d8a3e69e0

@JujuAdams
Copy link
Owner

You can use scribble_font_set_default() to set the default font.

In your case, instead of using [/f] I'd use [fnt1].

@Nanyuting
Copy link
Author

Thank you so much, Juju.
Especially for your suggestion ‘instead of using [/f] I'd use [fnt1],’ which is something I could have thought of. However, when I ran into problems, my thinking got stuck in a dead end, and I couldn't get out of the maze.
I really appreciate your support.
By studying Scribble's functions, I made my own editor, and I'm using it to remake my game.
I'll send you good news later.

@JujuAdams
Copy link
Owner

Glad I could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants