TextBlock support?
Closed this issue · 7 comments
I'd do it myself but I'm not sure I comprehend what your code is doing.
It’s still very rough, I am not sure of what the exact architecture should be.
In commit f284cee I have rewritten emoji:Image
so that it behaves more like a TextBlock
and I have renamed it emoji:TextBlock
. Please let me know whether that works for you!
(you can see there is still a minor positioning bug but I’ll work on that)
Edit: the positioning bug is apparently caused by the Windows font having bad kerning… not much I can do for now.
Aside from missing a couple properties which was easy to fix. I need Inlines support so that I can bind values with Run. Without Run I was able to get the text to show up by assigning the property to TextBlock but that's not what I want to do.
I tried to add this property to get Inlines to work but it wasn't enough because it is apparently read only?
public InlineCollection Inlines { get => m_textblock.Inlines; }
I see. Note that m_textblock
is just some kind of fallback and is only used when Text
cannot be rendered with the emoji font, so m_textblock.Inlines
is basically useless…
I may have made a design mistake here and perhaps I should create some kind of emoji:Run
class, too, that can be embedded in a TextBlock
.
I have started refactoring emoji:TextBlock
so that it inherits TextBlock
in commit 892dd5b. This will probably allow me to answer your request. Can you maybe clarify what it is you do with Inlines
?
i installed 0.0.0.16 but i am getting "Could not load file or assembly 'Emoji.Wpf, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." error on " wpf:TextBlock</wpf:TextBlock>" line how to solve it?
also i am not able to use emoji:Image
Sorry for the lack of answer, but I do not know how to fix or even reproduce the above problem… did you eventually find a way?
Hi everyone. I’m choosing to close this bug because I think the original issue was fixed a long time ago, and other problems, if still relevant, should have their own issue.