TL DR: Obviously, JavaFX is not working.
Here is the text you are using.
๐ก๐ซเฒ ๐รฑ
Decimal code representation:
127137 178050 3232 128512 241
Hex representation:
0x1F0A1 0x2B782 0xCA0 0x1F600 0xF1
Display error
Java uses UTF-16 internally. Therefore, consider the presentation of UTF-16:
UTF-16 Performance:
D83C DCA1 D86D DF82 0CA0 D83D DE00 00F1
We see that the display shows five characters that you expect, but then three characters of garbage.
Therefore, he is clearly trying to display 8 glyphs, where there are only five. This is almost certainly because the display code has 8 characters, because three characters are encoded in UTF-16 as surrogate pairs, so write down two 16-bit words each time. In other words, it uses the wrong value for string length in the presence of surrogate pairs.
Nested text error
UTF-8 Presentation of test data:
F0 9F 82 A1 F0 AB 9E 82 E0 B2 A0 F0 9F 98 80 C3 B1
What is seen
00F0 รฐ LATIN SMALL LETTER ETH 009F ๎ <control> = APC = APPLICATION PROGRAM COMMAND 0082 ๎ <control> = BPH = BREAK PERMITTED HERE 00A1 ยก INVERTED EXCLAMATION MARK 00F0 รฐ LATIN SMALL LETTER ETH
(Two control characters can have glyphs in some fonts containing either their abbreviations or hexadecimal codes. They are visible in your example.)
Latin representation of hex1:
F0 9F 82 A1 F0
Note that these five bytes match the first five bytes of the UTF-8 representation of the intended text.
Conclusion: the inserted data was inserted as 5 UTF-8 code points, occupying 17 bytes, but interpreted as 5 Latin1 codes, occupying 5 bytes. Again, the wrong property was used for the length.