Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Natulyre

5
Posts
2
Topics
1
Following
A member registered Aug 07, 2017

Recent community posts

(2 edits)

Great, I had been waiting for an update because changing line 1606 did not fix the issue on my side either.

Following @hsu99 instruction by adding a call to Rebuild() in OnRectTransformDimensionsChange(); and adding if(uiMode) LayoutRebuilder.MarkLayoutForRebuild(tr); immediately fixes rectTransform sizing issues.

I stumbled upon the same issue recently here over on 2020.3.15f2; let me know if I can be of any help (i.e. after checking out hsu99's sample project).

I've tried out the test build in a few different scenarios and it seems to be working great, the hyphens behaves as expected!

The newly added unicode tag is quite enjoyable. I wasn't convinced at first, but it turns out to be explicit, yet clean enough (as in easily distinguished within a sentence), to be of use. We'll probably end up extending STM with a few custom tags/strings for our most commonly used 'special' characters, as per your suggestion.

Hyphen compatibility was our main issue right now, and that's clearly been resolved. Thanks a bunch!

(1 edit)

Hello,

Our localization expert wants us to go further with our text handling approach on our new project. He's been reading a PDF on the 'best practices for game localization' (https://cdn.ymaws.com/www.igda.org/resource/collection/2DA60D94-0F74-46B1-A9E2-F...), but more precisely, about how to handle line-breaks and word-wrapping (page 16).

We've had issues in the past dealing with word-wrapping, as in,  "Where do we insert a line-break when dealing with Japanese sentences as they do not make use of spaces or word separators". In order to deal with this issue, we are currently using explicit line-breaks (\r), as well as Zero-Width Spaces (U+200B).  While this isn't perfect, this seems to be our best solution so far; translators can decide when and where words and sentences should break. I believe there are rules for when words should be cut (i.e. https://www.w3.org/International/articles/typography/linebreak), and plausibly it could be automated, but we're definitely not linguistic experts.

Another language that we need to support is French, which grammatically, requires the use of hyphens when breaking words. I am aware of the 'Insert Hyphen' functionality, which works fine by default. But if we enable this option, while using our Zero-Width Spaces strategy to explicitly pick out when to trigger line breaks, no hyphen will show up.



I believe this is due to the fact that Zero-Width Spaces are just grouped up in the 'linebreakFriendlyChars[]' array, and clearly it wouldn't make sense for spaces, tabs or hyphens-based line-breaks to add additional hyphens, heck, under certain circumstances that'd probably end up creating an infinite loop. I took a quick peek at RebuildTextInfo(), and figured out where the hyphens are added under normal circumstances, but I wasn't comfortable enough (yet) to change this up on my own, and other users might benefit from this.

Here's an example of the  issue. I've added in black lines to illustrate where the Zero-Width Spaces characters are located at.

Current Behavior: This is what happens when 'Insert Hyphens' is enabled and we make use of Zero-Width Spaces to determine word breaks. You can see how it cuts at just the right places based on the text box's size.

Desired Behavior: This is what we'd like to be able to achieve. Have STM add hyphens when line-breaking a word at a Zero-Width Space.

I believe our desired behavior should be toggle-able as it isn't standard across all languages. We definitely wouldn't want hyphen when dealing with Japanese for example. AFAIK, this should be safe enough to be directly embedded into the "Insert Hyphen" toggle.



I'm open to suggestions. The main reason we went with Zero-Width Space usage was to make sure it was easy enough for our translators to add these in. Maybe some kind of <tag> could be used, but I fear it'd get noisy rapidly enough as well as impair auto-correct & spellcheckers.
(1 edit)

Hello there, I've recently acquired Super Text Mesh (Version 1.8.5), and it seems to be very promising but I've just updated to 1.8.8 and I have some issues.  My unity project is using 2018.1.0f2 (64 bit) in PC mode.

When I instantiate a 'UI/Super Text' through the 'right-click menu', it isn't visible.  I'm guessing this might have something to do with the default shader being set to (Super Text Mesh/UI/Default). This same shader is used in the 'ShaderText' scene, and it isn't visible there either.

While I'm here, I can't quite out how to apply the 'SDF' shader on a normal font, as referenced by the documentation. I see a checkbox for SDF but it cannot be checked.

If I instead set an SDF shader directly, well, it works in the scene view, but it'll be pitch black in the game view. Any ideas?