Oni: Rendering of Airline/Powerline fonts

Created on 4 Dec 2016  路  16Comments  路  Source: onivim/oni

I use Airline, and also usually have a zsh terminal hidden somewhere in my buffers.

Airline looks like this:
screen shot 2016-12-04 at 2 21 33 pm

The terminal similarly does not render the patched fonts correctly, and I set and resourced guifonts to a powerline font in my init.vim.

If this is something stupid that I'm forgetting, it probably should go into a "getting started" somewhere.

I really want to see this project take off!

bug help wanted

Most helpful comment

@bert88sta Try with the latest version of Oni.

All 16 comments

Ah yes, I haven't tested with any patched fonts. Thanks for the screenshot, that's really helpful.

Right now, Oni doesn't check 'guifont', and renders based on a config setting in (Config.ts)[https://github.com/extr0py/oni/blob/master/browser/src/Config.ts]:

const MacConfig: any = {
    "editor.fontFamily": "Monaco"
}

const WindowsConfig: any = {
    "editor.fontFamily": "Consolas"
}

You could try editing this directly here to reflect your patched powerline font, and see if that works.

This value also gets ready in the ~/.oni/config.json, so you could add a config.json there that looks like:

{
"editor.fontFamily": "Patched Powerline Fontname"
}

Let me know if that works. Will add notes about this in the README - need to add some info about the non-standard configuration for these options.

Thanks for the feedback and for trying out the app!

Yep, I'll probably be using this for as far as development goes, I'm already super impressed with everything you've done so far.

@extr0py for regular vim-functionality bugs, would you want an issue per or would you rather a large issue/tag that people can post in?

Awesome :)

Regarding the bugs - separate issues would be ideal, since they might have different root causes. Large issues can be tough to close! Worst case we can always split them up, too, though.

@extr0py :

I've changed in my config.json the lines you suggested to a powerline font, and the airline segments look identical. I've changed it to my other favorite colorscheme, wombat, and it still does not work. Regular solarized looks really weird in gui, truecolor looks fine though.

EDIT: Doesn't work, thought I was in the wildmenu issue

Ah ok, seems like a potential issue with how the patched fonts are rendered in the app then. Patched fonts were always a pain for me even in normal VIM :)

For the statusline, I'm hoping to be able to move away from patched fonts. There's some really exciting UI work happening in the External UI RFC that I'd like to take advantage of in order to enable rich status lines, on par with something like Atom, without needing a patched font. Even just having CSS styling plus font-awesome icons would give us a much improved look & feel.

If someone would be up for investigating the patched font rendering, the code in CanvasRenderer.ts would be a good place to start - it'd be interesting to know how the special font characters are being rendered there.

After some more digging, I'm sure it's got to be some sort of incongruency between how neovim would render the fonts normally and how it's sending them to oni. I think this is this way because my terminal is zsh and uses patched fonts, which render fine. However, airline still does not. Honestly though, patched fonts are much much more relevant in the context of people using this as a terminal, since we could probably replace the statusline

If you read my last comment, that was a lie. It does, however, actually recognize the glyphs, leading me to think that changing the font to a power line one would work.

Alright, this is the current state of airline (granted we're hoping for separation of ui elements)
screen shot 2016-12-22 at 2 18 44 pm

You can see that it at least acknowledges the glyph of the patched font. Changing the font doesn't help, be it guifont in my init.vim or editor.fontfamily in config.json

@bert88sta Try with the latest version of Oni.

@kybaeus it works!

Sweeet! Thanks @kybaeus ! I'll close this out

If airline is now working in Oni, how do you guys feel about adding it as one of the default plugins included with Oni? It's a pretty popular plugin and I think it would help make Oni look more like an IDE and less like a simple text editor. Just a suggestion. 馃槃

Looks like this issue is resolved, and #201 is tracking an external statusline implementation, which should help making Oni look like a real IDE :smile:

@bryphe how to solve this rending problem?

screen shot 2018-04-10 at 7 07 32 pm

@icearith same rendering issue here. How did you solve it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jordwalke picture jordwalke  路  25Comments

bryphe picture bryphe  路  22Comments

bryphe picture bryphe  路  29Comments

keforbes picture keforbes  路  19Comments

rococode picture rococode  路  20Comments