non monospace fonts
Opened this issue · 4 comments
eporral1 commented
Hi, thank you for this package, it saved me a lot of work :)
Is it possible to make it work with non mono-space fonts ?
Using a non mono-space font (with a ui text inside a layout) makes the emojis position incorrect
I had to change the following line
TextGenerator textGen = textToEdit.cachedTextGenerator;
to
TextGenerator textGen = textToEdit.cachedTextGeneratorForLayout;
Here is an example
Thanks!
mcraiha commented
I did not test this with layouts. So if the layouts alter the positioning of characters then the Vector3 imagePos... part will be calculated incorrectly and emoji positions will be wrong.
eporral1 commented
mcraiha commented
Check that your font has em quad character (U+2001). And if it is there then check that it is actually occupies square area.