Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

powerline fonts have mangled output #14

Open
gvoysey opened this issue Jul 3, 2018 · 10 comments
Open

powerline fonts have mangled output #14

gvoysey opened this issue Jul 3, 2018 · 10 comments

Comments

@gvoysey
Copy link

gvoysey commented Jul 3, 2018

on ubuntu 16.04, firefox 60.0.2, a recorded session shows mangled powerline fonts in my oh-too-blingy zsh config.

compare static png:
image
attached SVG:

rendered.zip

@immanuelfodor
Copy link

Same here. I use https://github.com/chris-marsh/pureline with Noto Mono on Manjaro Linux, and the special characters in the SVG are unrecognizable. Even when I try to provide the --font="Noto Mono" parameter.

@nbedos
Copy link
Owner

nbedos commented Jul 4, 2018

Yeah, I noticed that with powerline fonts. I have no idea why the output is mangled though. All characters of a line in the SVG animation have the same vertical position and font size. What's the difference between powerline fonts and regular fonts?

@immanuelfodor
Copy link

immanuelfodor commented Jul 5, 2018 via email

@gvoysey
Copy link
Author

gvoysey commented Jul 5, 2018

What's the difference between powerline fonts and regular fonts?

I'm not sure in general. In my case, i'm using https://github.com/abertsch/Menlo-for-Powerline

@ylmrx
Copy link

ylmrx commented Jul 9, 2018

I use the Nerd Font package and Tilix as a terminal emulator, it shows the same behavior for many of the fonts (within the terminal emulator and the browser). (these size problems come and go with the commit on the font repo side)
So, it's related to the font itself and pyte (the python library in charge of rendering a cool term window). hard to correct it in termtosvg.

@immanuelfodor : Maybe you unchecked the "allow webpage to specify font" in preferences > display > advanced (I had the very same problem). If you specify the font, it should be more like : "Noto Mono for Powerline" or something like this (I don't think Noto Mono will carry the "powerline" cool chars)

@immanuelfodor
Copy link

immanuelfodor commented Jul 10, 2018

@ylmrx nope, it's untouched (default checked) in my FF.

I tried termtosvg --font "Noto Mono for Powerline" but it does not help. However, the Hack font works well, so it must be an issue with Noto Mono as you suggested in your last sentence.

BTW does this mean that the user viewing the recording should have the font installed on his/her machine? Or is the font embedded into the SVG so the output is multiplatform and environment independent?

@ylmrx
Copy link

ylmrx commented Jul 10, 2018

The SVG doesn't include the font. You need to have the specific font installed.
It's not too bad as there's a failover font "monospace" (which your browser links to a default one), and it's platform-independent. However, this won't be a "powerline"-friendly (as it's perfectly non-standard)

@gvoysey
Copy link
Author

gvoysey commented Jul 10, 2018

The SVG doesn't include the font. You need to have the specific font installed.

Which is interesting, because even when this is true the powerline output is still off.

@amcgregor
Copy link

amcgregor commented Jun 9, 2019

The SVG doesn't include the font. You need to have the specific font installed.

Which is interesting, because even when this is true the powerline output is still off.

I present my hand-massaged ("mangled") clone of window_frame_js named hasklug-apprentice-progressive-window-compact, updated to:

  • Use ES6 and more compactly represent the actions.
  • Eliminate unnecessary API "gentleness". Do or do not, there is no try.
  • Progressively enhance. Only present interactive elements requiring JS if JS is actually running. (I.e. hide them if embedded in a non-interactive, restricted, or incapable environment or viewer, such as an IRC client's embed.)
  • Embed and utilize the Nerd Fonts variant of Hasklig, Hasklug, providing a ludicrous number of icon glyphs from various sources in addition to the Powerline symbols. Alas, dear Yorick, ligatures. 😭

SVG with embedded font.

Here's an example utilizing the Powerline symbols of that font in my Zsh and Vim setup:

SVG with embedded font using Powerline symbols.

@marcstreeter
Copy link

same here, I probably will just open regular terminal window and record from there until this is figured out.

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

No branches or pull requests

6 participants