Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
Dealing with emojis 😌
This emoji 😌 [U+1F60C] just gave us problems in our app. Probably other emojis will do the same, but client was able to write it in a TextInput
but not render it into a Label
from FeathersUI
AIR SDK: 33.1.1.476 / 33.1.1.856 FeathersUI: 4.1.1 Affected environment: all devices as far as I can tell.
The stack trace from a mobile device:
::0 -> Uncaught Error // TypeError // TypeError: Error #1009 // TypeError: Error #1009
at feathers.controls.text::TextBlockTextRenderer/refreshTextLines()
at feathers.controls.text::TextBlockTextRenderer/measure()
at feathers.controls.text::TextBlockTextRenderer/measureText()
at feathers.controls::Label/autoSizeIfNeeded()
at feathers.controls::Label/draw()
at feathers.core::FeathersControl/validate()
at feathers.controls::LayoutGroup/handleManualLayout()
at feathers.controls::LayoutGroup/draw()
at feathers.controls.renderers::LayoutGroupListItemRenderer/draw()
The label in the item renderer is custom added, and uses a simple theme style:
protected function setHistoryDetailsStyles(textRenderer:Label):void
{
textRenderer.fontStyles = this.detailsFontStyle;
}
this.detailsFontStyle = new TextFormat(FONT_NAME_ITALIC, 10, 0x999999, HorizontalAlign.LEFT, VerticalAlign.TOP);
FONT_NAME_ITALIC = "embedRobotoItalic"
[Embed(source="/../assets/fonts/Roboto-Italic.ttf",
fontFamily="embedRobotoItalic",
fontWeight="normal",
mimeType="application/x-font",
embedAsCFF="true")]
protected static const ROBOTO_ITALIC:Class;
Now it's probaly not a Feathers issue, since on desktop the error is a bit diffrent:
Error: Error #2192: An unpaired Unicode surrogate was encountered in the input.
at flash.text.engine::TextBlock/DoCreateTextLine()
at flash.text.engine::TextBlock/recreateTextLine()
at feathers.controls.text::TextBlockTextRenderer/refreshTextLines()[src\feathers\controls\text\TextBlockTextRenderer.as:2437]
the last line in question before entering air sdk:
line = this.textBlock.recreateTextLine(line, null, lineWidth, 0, true);
Can't reproduce it outsite FeathersUI since I don't know how to use TextLine
and TextBlock
.
Currently we have no workarrounds, and don't know how to limit the charset. I think the issue is that air is not fully capable of utf8mb4.
Hi
We're currently unable to reproduce this - but had come across something similar quite a while ago which seemed to be an issue within the truetype file. Are you able to create the desktop test app in a fairly basic form and then send us the SWF so that we can run it on a debug version of AIR?
thanks