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

Font missing Character in Japanese Fragment Menu [JP only] #41

Open
drojf opened this issue Nov 27, 2022 · 4 comments
Open

Font missing Character in Japanese Fragment Menu [JP only] #41

drojf opened this issue Nov 27, 2022 · 4 comments

Comments

@drojf
Copy link
Contributor

drojf commented Nov 27, 2022

after unlocking the fragments in matsuribayashi, the japanese menu text displays "カケラ ぎをする", which doesn't make any sense. Based on the corresponding text in the console version, I suspect that it's supposed to say "カケラ紡ぎをする"

Our Mod's Menu
1669567433331

Console Version
1669567355331

I can't seem to find the image for this button in the https://github.com/07th-mod/ui-editing-scripts repository? But because it is red colored, we must have replaced it? I'm not sure what happened there...unless it was manually patched rather than using our ui-editing-scripts see below

@drojf
Copy link
Contributor Author

drojf commented Nov 27, 2022

Oh I think I get it, this is just text, not an image, in flow.txt

SavePoint("カケラ紡ぎをする", "Connecting Fragments");

SavePoint("カケラ紡ぎをする", "Connecting Fragments");

For whatever reason the font we use can't display that character (紡)? I'm not sure what characters are actually supported on the font used by the menu buttons...

@drojf drojf changed the title Wrong Japanese Fragment Text [JP only] Font missing Character in Japanese Fragment Menu [JP only] Nov 27, 2022
@drojf
Copy link
Contributor Author

drojf commented Nov 28, 2022

It does look like the msgothic_2 font (I assume this is used for menus) is missing that character. It looks like it has a much smaller set of characters than msgothic_0.

As a workaround, I'll write the missing character in hiragana like so:

カケラつむぎをする

or if not enough space

カケラつむぎ (like how it looks in the console game)


This issue might also affect the console arcs (unless it adds more characters to the atlas for msgothic_2):

It has

SavePoint("警察事件調書", "Police Case Files");

and

SavePoint("カケラ紡ぎ", "Connecting Fragments");

which might not be rendered correctly.

@drojf
Copy link
Contributor Author

drojf commented Nov 28, 2022

OK, I looked into this even more...it looks like this menu appears when you call FragmentViewChapterScreen(); - NOT the SavePoint() function which I wrote about above (the SavePoint() fn only makes a save point and doesn't display this menu)

It looks like the text is stored in the ChapterScreen class in the public List<ChapterButton> ChapterButtons;. But I couldn't easily figure out how to change the text, I could only hide the text by disabling the public MeshRenderer TextMesh; on the ChapterButton object.

For now I think this is too difficult to change, so I won't try to fix this for now.

@drojf
Copy link
Contributor Author

drojf commented Nov 28, 2022

ok, I did figure out how to change the text...it turns out there is this class called "TextRefresher" which handles setting English/Japanese text automatically. The actual text strings are probably set in the Unity editor, which is why they don't appear in the code.

If you run this in the Show() function of the ChapterScreen class, you can set the text (this will just override the first button).

			TextRefresher textRefresher = ChapterButtons[0].TextMesh.GetComponent<TextRefresher>();
			textRefresher.Japanese = "カケラつむぎをする";

This should really be set in the localization.json so it can be set for other languages.

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

No branches or pull requests

1 participant