marionebl / svg-term-cli

Share terminal sessions via SVG and CSS
MIT License
3.57k stars 118 forks source link

How to set list of fonts? Especial need for NERD fonts #49

Open ivakyb opened 5 years ago

ivakyb commented 5 years ago

tags: nerd font, powerline

ivakyb commented 5 years ago

can't upload svg because of

изображение
ivakyb commented 5 years ago

https://asciinema.org/a/wFKjX0AsVuesXIIACS6JSE0Wt shows fine but svg does not support powerline symbols

изображение
sinedied commented 5 years ago

Any idea on how to embed font or convert special glyph to svg glyphs?

marionebl commented 4 years ago

I dug a bit into the approach asciinema takes for this. Seems like they have a special web font for Powerline symbols. From their CSS file:

@font-face {
  font-family: 'Powerline Symbols';
  src: local('Powerline Symbols'), local('PowerlineSymbols'), url('/fonts/PowerlineSymbols-16d842d90121c528e972bd3af66cf5e0.otf?vsn=d') format('opentype');
}

A feature to optionally embed this web font into the resulting SVG would solve this. Let's see how pronounced the performance impact of this is - maybe we could even strip the font down to the glyphs we find to be actually in use?

miraclx commented 4 years ago

Addressed in #61 See https://github.com/miraclx/svgembed