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

Display unicode emoji in UI #464

Open
JDsnyke opened this issue Aug 22, 2020 · 6 comments
Open

Display unicode emoji in UI #464

JDsnyke opened this issue Aug 22, 2020 · 6 comments

Comments

@JDsnyke
Copy link

JDsnyke commented Aug 22, 2020

Is it possible to view Unicode emoji in the UI?

@JDsnyke JDsnyke closed this as completed Aug 22, 2020
@JDsnyke
Copy link
Author

JDsnyke commented Aug 23, 2020

I have tested this and it appears that Shoes shows a default placeholder instead of the actual emoji. Placed in the window title it appears to be fine, so potentially something wrong somewhere? (Refer to pics)

Imgur
Imgur

@JDsnyke JDsnyke reopened this Aug 23, 2020
@ccoupe
Copy link

ccoupe commented Aug 23, 2020

Are the emojis in the font being used? The default fonts from Shoes doesn't have them so you need to specify the correct font name for each element. The 'correct' font will be user and system specific if portability is an issue for you.

@JDsnyke
Copy link
Author

JDsnyke commented Aug 24, 2020

Are the emojis in the font being used? The default fonts from Shoes doesn't have them so you need to specify the correct font name for each element. The 'correct' font will be user and system specific if portability is an issue for you.

So following up I've tried different fonts like DejaVuSans and Unicode and gotten no changes at all....

What I used for example is as follows,

emojifont = font "fonts/DejaVuSans.ttf"

para "#{account_name}", font: emojifont, size: "18"

@ccoupe
Copy link

ccoupe commented Aug 24, 2020

DejaVuSans is a Shoes font. You need to use a system font that has emoji's. This should list all the fonts you have on your system.

Shoes.app do
  stack do
    all_fonts = Shoes::FONTS
    all_fonts.each {|ft| para ft}
  end
end

@JDsnyke
Copy link
Author

JDsnyke commented Aug 28, 2020

System fonts don't seem to work either (as seen here). Does it work for you when you run it?

@ccoupe
Copy link

ccoupe commented Aug 28, 2020

I don't have fonts with emojis on my Linux system or I don't know their names or the unicode for the glyph because I don't use emojis. What is the font name with the emojis you want to display? what is the \uNNNN string you are using?

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

2 participants