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

Extra \n on the subtitle text. #11

Open
Glwssa opened this issue Feb 21, 2022 · 2 comments
Open

Extra \n on the subtitle text. #11

Glwssa opened this issue Feb 21, 2022 · 2 comments

Comments

@Glwssa
Copy link

Glwssa commented Feb 21, 2022

Hi.
I'm using Subtitle Dispenser to place the subtitles on a 1087x180 rectangular box, but when the subtitle dispenser places an extra \n on the end of each subtitle and it messes with the alignment of the text inside the box.
Screenshot_42
Screenshot_41

@Glwssa
Copy link
Author

Glwssa commented Feb 21, 2022

Fixed it by going to the subtitle displayer and removing all the \n,\t,\r from the final text output.
currentlyDisplayingText.text = currentlyDisplayingText.text.Replace("\t", "").Replace("\n", "").Replace("\r", "").Replace("\r\n", "");

@Glwssa
Copy link
Author

Glwssa commented Feb 24, 2022

Update: Found a better solution that fixes the issue without deleting all the other \n on the text.
currentlyDisplayingText.text = currentlyDisplayingText.text.TrimEnd('\n');

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