forked from synchrok/TypeText
-
Notifications
You must be signed in to change notification settings - Fork 28
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
problem with UTF-32 characters, like: 🍀 or 💕 #19
Comments
Thanks for the issue report! Unfortunately we are just maxed out with how
many projects we can support actively. I do hope to get back to TextTyper
in the next few months, at which time I'll add more improvements and
bugfixes. But right now I'm not gonna be able to look into this.
…On Sun, Feb 24, 2019 at 9:56 AM fpv999 ***@***.***> wrote:
those UTF-32 characters ( like U+1F340) are stored in 4-bytes sequences,
starting with 0xD8xx ... thus in one moment Unity Text components receives
only a first-half of the UTF-32 character, which leads to crash like this:
ArgumentException: invalid utf-16 sequence at -1819518832 (missing
surrogate tail) Parameter name: string
UnityEngine.TextGenerator.Populate_Internal (System.String str,
UnityEngine.Font font, Color color, Int32 fontSize, Single scaleFactor,
Single lineSpacing, FontStyle style, Boolean richText, Boolean
resizeTextForBestFit, Int32 resizeTextMinSize, Int32 resizeTextMaxSize,
Int32 verticalOverFlow, Int32 horizontalOverflow, Boolean updateBounds,
TextAnchor anchor, Single extentsX, Single extentsY, Single pivotX, Single
pivotY, Boolean generateOutOfBounds, Boolean alignByGeometry,
System.UInt32& error)
UnityEngine.TextGenerator.Populate_Internal (System.String str,
UnityEngine.Font font, Color color, Int32 fontSize, Single scaleFactor,
Single lineSpacing, FontStyle style, Boolean richText, Boolean
resizeTextForBestFit, Int32 resizeTextMinSize, Int32 resizeTextMaxSize,
VerticalWrapMode verticalOverFlow, HorizontalWrapMode horizontalOverflow,
Boolean updateBounds, TextAnchor anchor, Vector2 extents, Vector2 pivot,
Boolean generateOutOfBounds, Boolean alignByGeometry,
UnityEngine.TextGenerationError& error)
UnityEngine.TextGenerator.PopulateAlways (System.String str,
TextGenerationSettings settings)
UnityEngine.TextGenerator.PopulateWithError (System.String str,
TextGenerationSettings settings)
UnityEngine.TextGenerator.Populate (System.String str,
TextGenerationSettings settings)
UnityEngine.TextGenerator.GetPreferredWidth (System.String str,
TextGenerationSettings settings)
UnityEngine.UI.Text.get_preferredWidth ()
UnityEngine.UI.LayoutUtility.m__2 (ILayoutElement e)
UnityEngine.UI.LayoutUtility.GetLayoutProperty (UnityEngine.RectTransform
rect, System.Func2 property, Single defaultValue, ILayoutElement& source)
UnityEngine.UI.LayoutUtility.GetLayoutProperty (UnityEngine.RectTransform
rect, System.Func2 property, Single defaultValue)
UnityEngine.UI.LayoutUtility.GetPreferredWidth (UnityEngine.RectTransform
rect)
UnityEngine.UI.LayoutUtility.GetPreferredSize (UnityEngine.RectTransform
rect, Int32 axis)
UnityEngine.UI.HorizontalOrVerticalLayoutGroup.GetChildSizes
(UnityEngine.RectTransform child, Int32 axis, Boolean controlSize, Boolean
childForceExpand, System.Single& min, System.Single& preferred,
System.Single& flexible)
UnityEngine.UI.HorizontalOrVerticalLayoutGroup.CalcAlongAxis (Int32 axis,
Boolean isVertical)
UnityEngine.UI.VerticalLayoutGroup.CalculateLayoutInputHorizontal ()
UnityEngine.UI.LayoutRebuilder.m__2 (UnityEngine.Component e)
UnityEngine.UI.LayoutRebuilder.PerformLayoutCalculation
(UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction`1 action)
UnityEngine.UI.LayoutRebuilder.Rebuild (CanvasUpdate executing)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate ()
UnityEngine.Canvas:SendWillRenderCanvases()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAYUKRgYOShx58pd_IcZnvkyRU9hTVn3ks5vQqgagaJpZM4bOk1x>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
those UTF-32 characters ( like U+1F340) are stored in 4-bytes sequences, starting with 0xD8xx ... thus in one moment Unity Text components receives only a first-half of the UTF-32 character, which leads to crash like this:
ArgumentException: invalid utf-16 sequence at -1819518832 (missing surrogate tail) Parameter name: string
UnityEngine.TextGenerator.Populate_Internal (System.String str, UnityEngine.Font font, Color color, Int32 fontSize, Single scaleFactor, Single lineSpacing, FontStyle style, Boolean richText, Boolean resizeTextForBestFit, Int32 resizeTextMinSize, Int32 resizeTextMaxSize, Int32 verticalOverFlow, Int32 horizontalOverflow, Boolean updateBounds, TextAnchor anchor, Single extentsX, Single extentsY, Single pivotX, Single pivotY, Boolean generateOutOfBounds, Boolean alignByGeometry, System.UInt32& error)
UnityEngine.TextGenerator.Populate_Internal (System.String str, UnityEngine.Font font, Color color, Int32 fontSize, Single scaleFactor, Single lineSpacing, FontStyle style, Boolean richText, Boolean resizeTextForBestFit, Int32 resizeTextMinSize, Int32 resizeTextMaxSize, VerticalWrapMode verticalOverFlow, HorizontalWrapMode horizontalOverflow, Boolean updateBounds, TextAnchor anchor, Vector2 extents, Vector2 pivot, Boolean generateOutOfBounds, Boolean alignByGeometry, UnityEngine.TextGenerationError& error)
UnityEngine.TextGenerator.PopulateAlways (System.String str, TextGenerationSettings settings)
UnityEngine.TextGenerator.PopulateWithError (System.String str, TextGenerationSettings settings)
UnityEngine.TextGenerator.Populate (System.String str, TextGenerationSettings settings)
UnityEngine.TextGenerator.GetPreferredWidth (System.String str, TextGenerationSettings settings)
UnityEngine.UI.Text.get_preferredWidth ()
UnityEngine.UI.LayoutUtility.m__2 (ILayoutElement e)
UnityEngine.UI.LayoutUtility.GetLayoutProperty (UnityEngine.RectTransform rect, System.Func
2 property, Single defaultValue, ILayoutElement& source) UnityEngine.UI.LayoutUtility.GetLayoutProperty (UnityEngine.RectTransform rect, System.Func
2 property, Single defaultValue)UnityEngine.UI.LayoutUtility.GetPreferredWidth (UnityEngine.RectTransform rect)
UnityEngine.UI.LayoutUtility.GetPreferredSize (UnityEngine.RectTransform rect, Int32 axis)
UnityEngine.UI.HorizontalOrVerticalLayoutGroup.GetChildSizes (UnityEngine.RectTransform child, Int32 axis, Boolean controlSize, Boolean childForceExpand, System.Single& min, System.Single& preferred, System.Single& flexible)
UnityEngine.UI.HorizontalOrVerticalLayoutGroup.CalcAlongAxis (Int32 axis, Boolean isVertical)
UnityEngine.UI.VerticalLayoutGroup.CalculateLayoutInputHorizontal ()
UnityEngine.UI.LayoutRebuilder.m__2 (UnityEngine.Component e)
UnityEngine.UI.LayoutRebuilder.PerformLayoutCalculation (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction`1 action)
UnityEngine.UI.LayoutRebuilder.Rebuild (CanvasUpdate executing)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate ()
UnityEngine.Canvas:SendWillRenderCanvases()
The text was updated successfully, but these errors were encountered: