I’m trying to see if I can use Pango to render “custom emojis” that you see on chat networks like discord, slack, twitch, etc. I followed the
examples/pangoshape.c example and have had some success, but part of my requirements is that I need to use one shape for multiple characters in the text that’s being laid out. For example, if I see the text “kapow test” I want to to replace it with " text".
Now I have that somewhat working, but the issue is that the shape is being rendered for each character in the text. I have specified a range in the shape attribute and kind of hoped that’d just hide all of that text and use my shape once, but apparently that’s not how it works. You can see an example here
I just noticed that the range is off in this image, sorry about that, I had hard coded it and just didn’t notice :-/
Alignment and scaling is wrong, but what I’m aiming for here is to just show the
KAPOW once but leave the original text intact so that i can be pulled out of the layout later (so the user can copy/paste/etc).
So my question is, is this possible, and if so how? I’ve scoured the docs and examples and I just can’t seem to find anything that can help me. I can provide the full code if necessary, it’s just kind of messy as I’ve been trying all sorts of things to make this work.