Please update the engine's default fonts so that they include the capital "ẞ" character (used in German), and please make it possible that CommonTextBlock TransformPolicy::ToUpper works when the text includes a "ß" character

See above

[Attachment Removed]

Steps to Reproduce

The German character “ß” recently received a new upper case version, so we now have “ß” and “ẞ”, see wikipedia for reference: https://en.wikipedia.org/wiki/%C3%9F#cite_note-13

The default Unreal Engine font (Roboto) does not have this uppercase character yet, and instead displays a “<?>” glyph, if you check out Roboto on https://fonts.google.com/specimen/Roboto and paste in the characters from above, you can see that the current version of this font does support this character.

When I import this font into an Unreal Engine project, Unreal is able to display that uppercase “ẞ” character, but when you use it in a CommonTextBlock with the ETextTransformPolicy::ToUpper, the TransformPolicy gets ignored. A term like “Außen” does not get displayed as “AUẞEN” but instead still gets displayed as “Außen”. This makes me believe that Unreal also uses outdated Unicode libraries as well, that might be worth updating, or something else is prohibiting this to work properly.

[Attachment Removed]

Hi,

For your first question, we do have a fairly old version of the Roboto font, so I can see about updating that. It’ll likely take some time to run through the legal process there, so if you want a shorter term solution then you could update the engine fonts yourself by copying newer versions into Engine\Content\Slate\Fonts.

Your second question is a bit trickier, as the Unicode standard still prefers SS as the capitalization for ß despite adding the upper case ẞ in Unicode 5.1.0. Our version of ICU is also a bit dated, but the latest SpecialCasing list still has the SS mapping:

# The German es-zed is special--the normal mapping is to SS.
# Note: the titlecase should never occur in practice. It is equal to titlecase(uppercase(<es-zed>))
 
00DF; 00DF; 0053 0073; 0053 0053; # LATIN SMALL LETTER SHARP S

We currently don’t handle string length changes well at all (and have a bug logged for this, UE-186174) so you’ll see an assert fire and the string will fail to convert if ß is converted to upper case. For now, the best workaround is likely to swap the character out manually, as I’m not sure updating our ICU library will change the behavior here.

Best,

Cody

[Attachment Removed]

Thank for your quick reply Cody, and I understand that this is a tricky problem. Initially I thought about adding something like this to UCommonTextBlock:

if (GetTextTransformPolicy() == ETextTransformPolicy::ToUpper)
{
    FString String = GetText().ToString();
 
    String.ReplaceInline(TEXT("ß"), TEXT("SS"));
    String = String.ToUpper();
 
    SetText(FText::FromString(String));
}

but this comes with quite a disadvantage, or risk, that when you change the transform policy to something else later, you are still left with that previous text change.

So we’ll probably try to fix this on the localization side, which is a bit annoying, but it is what it is.

Thanks again!

[Attachment Removed]

That may be the best solution for now; the main hurdle we ran in to is that the text transforms are applied after the text run indices have already been calculated, so we’re assuming string length won’t change at that point. We could do a substitution before then, but it would need to be implemented in each marshaller.

[Attachment Removed]