What i have so far
I was trying to implement a multi-line TextInput with javaFx, one that is capable of displaying emojis, I used a VBox of FlowPanes (a FlowPane for each line), split the line by spaces into words, the words are displayed in an HBox and the HBox will contain Text nodes for text and ImageView for Emojis, The current setup is described in the following image
The following screenshot shows what i have so far
The problem
The problem i'm facing is with the complex word, when multiple emojis (ImageViews) are displayed in an HBox, the Carret position estimation will be wrong by half a pixel for each image (because i'm assuming the width of the HBox would be equal to the sum of the fitWidths of its children ?, but it's not), as if the HBox has some kind of spacing although the spacing property is set to 0.
the effect gets worse if a lot of emojis are shown together, as shown in the following screenshots
It's also not Padding, or Borders, any help would be appreciated, and i'm sorry for the long boring explanation, i had to add it in case it would help anyone help me resolve the issue.