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

xt font makes UTF-8 unreadable in prompt #336

Open
fabiodl opened this issue Oct 11, 2021 · 7 comments
Open

xt font makes UTF-8 unreadable in prompt #336

fabiodl opened this issue Oct 11, 2021 · 7 comments

Comments

@fabiodl
Copy link

fabiodl commented Oct 11, 2021

Problem Description

UTF-8 appears as squares

Steps to Reproduce

Configuration File

If the font is specified as
font="--dejavu sans mono-medium-r-normal---80-----iso10646-1",
then anything is ok, but the new default ( XPC { font = "xft:monospace-12")
or even font="xft:Dejavu San Mono" does not display UTF-8 chars

Checklist

  • [ y] I've read CONTRIBUTING.md

  • I tested my configuration

    • [y] With xmonad commit 33a86c0
    • [y] With xmonad-contrib commit 20fdcbad0181d9e8fc7571799b1bb02952489df6
@slotThe
Copy link
Member

slotThe commented Oct 12, 2021

font="xft:Dejavu San Mono"

Is this a typo? I would expect a UTF-8 capable font is being able to display UTF-8 characters, regardless of how it's specified.

@ncaq
Copy link

ncaq commented Oct 12, 2021

Are you talking about xmobar instead of xmonad?

xmobar does not have xft enabled by default, so you need to install it as follows.

stack install xmobar --flag xmobar:with_xft

@slotThe
Copy link
Member

slotThe commented Oct 12, 2021

Are you talking about xmobar instead of xmonad?

The title mentions the prompt; while this should probably be an issue in the contrib repo, it does sound like an xmonad issue

@fabiodl
Copy link
Author

fabiodl commented Oct 12, 2021

Are you talking about xmobar instead of xmonad?

xmobar does not have xft enabled by default, so you need to install it as follows.

stack install xmobar --flag xmobar:with_xft

no, about prompts. Go to window: Bring window: etc.
For instance it is sufficient to open this page in a browser https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E8%AA%9E so that the title has utf-8 and do a bring window.

@fabiodl
Copy link
Author

fabiodl commented Oct 12, 2021

font="xft:Dejavu San Mono"

Is this a typo? I would expect a UTF-8 capable font is being able to display UTF-8 characters, regardless of how it's specified.

I tried capital letters in different places and different fonts. While the font visibly changed, the problem remained

@TheMC47
Copy link
Member

TheMC47 commented Oct 12, 2021 via email

@slotThe
Copy link
Member

slotThe commented Feb 3, 2022

So I was looking into this a bit yesterday and it's definitely not just an issue with printing. At least the font that we open via xftFontOpen can't display the respective unicode characters (i.e., xftCharExists returns False on the respective glyphs). It feels unintuitive that we somehow open a wrong font and no-one has noticed this in all of these years

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

4 participants