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

Incorrectly rendered ligatures with Fira Code #684

Closed
nilp0inter opened this issue Jun 3, 2020 · 7 comments
Closed

Incorrectly rendered ligatures with Fira Code #684

nilp0inter opened this issue Jun 3, 2020 · 7 comments

Comments

@nilp0inter
Copy link

Expected Behavior

Long ligatures should render properly. As an example, this is the expected behavior when rendering an ASCII progress bar with Fira Code.

image

Current Behavior

Currently QTerminal (and Konsole) render it wrong.

image

Possible Solution
Steps to Reproduce (for bugs)
  1. Install Fira Code (https://github.com/tonsky/FiraCode)
  2. Set Fira Code as the default font in QTerminal
  3. Run echo '4ce9f247a3c6: Loading layer [==================================================>] 49.66MB/49.66MB'
Context

This bugs makes progress bars and long ligature glyphs render very badly (specially on programs that use them for dynamically display information).

System Information
  • Distribution & Version: Arch
  • Kernel: 5.6.15-arch1-1
  • Qt Version: 5.14.2
  • qtermwidget Version: ???
  • lxqt-build-tools Version: ???
  • Package version: 0.15.0
Additional notes
@tsujan
Copy link
Member

tsujan commented Jun 3, 2020

This bug also affects Konsole, so maybe is a Qt bug?

Or, maybe, a bug in Fira Code. If it works fine in all non-Qt terminal emulators, that doesn't show the bug is in Qt or Konsole or QTerminal. For example, I remember a "monospace" font (but don't remember its name) which was correctly detected as non-monospace by Qt but not by GTK (or its specialized libraries).

@tsujan
Copy link
Member

tsujan commented Jun 3, 2020

In addition, I can type "continuous progressbars" with DejaVu Sans Mono and appropriate characters in Qterminal:

progressbar

@nilp0inter
Copy link
Author

Any idea on how we can debug and identify where the bug is? I am pretty new to ligatures.

@tsujan
Copy link
Member

tsujan commented Jun 3, 2020

I am pretty new to ligatures.

Then you know more than I do ;) I just played with characters:

example

example.txt

@tsujan
Copy link
Member

tsujan commented Jun 3, 2020

This shows how reliable QTerminal's rendering is (but doesn't disprove your report):

madness

Taken from http://xahlee.info/comp/unicode_drawing_shapes.html

@yan12125
Copy link
Member

I installed Fira Code from the Arch Linux official package [1], and make qterminal to use that by modifying ~/.config/qterminal.org/qterminal.ini (somehow Fira Code is not considered a mono-spaced font by Qt)

fontFamily=Fira Code

And the original example works fine

image

Combining other examples provided by @tsujan, I consider your issue is from somewhere other than qterminal. I'm sorry I cannot help on debugging as I'm not familiar with ligatures. You may get better help from Arch Linux forums.

If in the end you find out the issue is indeed from qterminal, feel free to leave a comment here and I will reopen the issue.

[1] https://www.archlinux.org/packages/community/any/ttf-fira-code/

@nilp0inter
Copy link
Author

Thank you @yan12125 , that info is very helpful.

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