Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextBlock support? #1

Closed
spacecowgirl314 opened this issue Apr 15, 2018 · 7 comments
Closed

TextBlock support? #1

spacecowgirl314 opened this issue Apr 15, 2018 · 7 comments

Comments

@spacecowgirl314
Copy link

I'd do it myself but I'm not sure I comprehend what your code is doing.

@samhocevar
Copy link
Owner

samhocevar commented Apr 16, 2018

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!

image

(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.

@spacecowgirl314
Copy link
Author

spacecowgirl314 commented Apr 20, 2018

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; }

@samhocevar
Copy link
Owner

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.

@samhocevar
Copy link
Owner

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?

@learnwithkharsh
Copy link

learnwithkharsh commented Aug 23, 2018

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

@samhocevar
Copy link
Owner

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?

@samhocevar
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants