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

Pango unknown glyph with certain fonts #127

Open
NBonaparte opened this issue Feb 5, 2017 · 9 comments
Open

Pango unknown glyph with certain fonts #127

NBonaparte opened this issue Feb 5, 2017 · 9 comments
Assignees
Labels

Comments

@NBonaparte
Copy link
Collaborator

Pango has a certain "feature" where spaces use the font for the character before the space. As a result, there can be some undesirable results:

  • fonts without space characters will display tofu symbols (example here).
  • when switching between symbolic and monospace fonts, the width will be incorrect (it uses the symbol font's space).

One solution to the former is to add a fallback attribute to each space. With the latter, a specific font family can be applied through another attribute.

So far, the only workaround I've come up with is looping through each buffer text, finding any spaces, and applying a fallback attribute to every space.

@NBonaparte NBonaparte added the bug label Feb 5, 2017
@NBonaparte NBonaparte self-assigned this Feb 5, 2017
@jacksgt
Copy link
Collaborator

jacksgt commented Feb 5, 2017

It is already possible to specify multiple (fallback) fonts in yabar, e.g.:

font: "Droid Sans, FontAwesome Bold 9";

Doesn't this cover the missing spaces?

@NBonaparte
Copy link
Collaborator Author

NBonaparte commented Feb 5, 2017

No, for some reason it doesn't switch fonts for spaces, so we have to do it manually.

FontAwesome has spaces, but Material Design Icons doesn't.
If you use FontAwesome with a monospace font, the spaces will be that of FontAwesome, rather than that of the monospace one, making it look unbalanced.
Material Design Icons just shows tofu symbols.

Maybe this should be set as a compile flag?

Here's an example for the wrong spacing size (fonts are Source Code Pro and FontAwesome).
First one uses <tt> </tt> instead of just a space, making them have proper width.
2017-02-05-155158_1920x24_scrot
2017-02-05-155246_1920x24_scrot

@soyuka
Copy link

soyuka commented Jan 28, 2018

FontAwesome v5 apparently has no more space character as I'm facing this issue :|.

/edit event internal-spacing does output a tofu symbol.

@gh67uyyghj
Copy link

I use Archlinux and something happened after my last update a week ago. Some icons aren't showing correctly. But I don't my problem is related to this issue. Something happened with FontAwesome 5 I guess

@Narrat
Copy link

Narrat commented Jan 28, 2018

Regarding the FontAwesome5 thing, there is this Arch bug report: https://bugs.archlinux.org/task/56899

@NBonaparte
Copy link
Collaborator Author

NBonaparte commented Jan 28, 2018

Can't believe Pango still hasn't fixed that. Does the fix_pango branch still fix this issue? I just rebased it onto master.

@Narrat
Copy link

Narrat commented Feb 3, 2018

With the fix_pango branch and following fonts font: "DejaVu Sans Mono 10, Siji 10, MaterialDesignIcons 10"; I'm still having those unknown glyphs

@soyuka
Copy link

soyuka commented Feb 12, 2018

Tried the fix_pango branch without success. I'm using Source Code Pro and awesome 5.

@soyuka
Copy link

soyuka commented Apr 2, 2018

Updating/installing these packages fixed the issue for me:

otf-font-awesome ttf-font-awesome

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

No branches or pull requests

5 participants