Oni: Bold and italic font not working

Created on 7 Nov 2017  路  6Comments  路  Source: onivim/oni

Hi,

I just installed oni, and it really works good. I just noticed that both bold and italic font are not showing.
Here's screenshot from neovim:
neovim

And a screenshot from oni
oni

I'm using Iosevka Term font.

bug help wanted

Most helpful comment

I might be able to fix this if you could point me in right direction @bryphe.

Where exactly does Oni receive this info?

the bufferUpdateEvent in BufferUpdates.ts is as close as I can get.

All 6 comments

Hi @kristijanhusak ,

Thanks for trying out Oni, and taking the time to report the issue! Appreciate the screenshots.

Yes, looks like we are ignoring the bold / italic font info coming from Neovim - definitely a bug.

I might be able to fix this if you could point me in right direction @bryphe.

Where exactly does Oni receive this info?

the bufferUpdateEvent in BufferUpdates.ts is as close as I can get.

That would be great to have help, @superquest !

Here's a few places to look:

Hope that helps, let me know if you have any questions!

I've tried to produce a highlight_set notification with a highlightInfo.bold or highlightInfo.italic flag by editing a markdown file with content like # this and _this_.

Such content is bolded and italicized in terminal Neovim, but no highlightInfo.bold or highlightInfo.italic flags show up in the highlight_set notification in Oni. Strange given that :help ui-event-highlight_set definitely says they should be there.

Using this method I have, however, produced a highlightInfo.underline flag. And it was a boolean -- even though the help docs specify that it should be text.

Neovim-qt does exactly what we're trying to do as well.

Well I'm stuck here.

I'm going to try to figure out the rendering given a bold / italic cell.

I'm going to try to figure out the rendering given a bold / italic cell.

Cool, splitting it up like that sounds like a good strategy! Thanks for your help.

I'm seeing some bold's come through here:
image
(in Screen.ts where it handles Actions.SET_HIGHLIGHT).

Seems like we are just ignoring them though, and not ever setting this._currentHighlight.bold or this._currentHighlight.italic - I think wiring it up there is the first step.

Then, once we have those values on this._currentHighlight, we can pick them up in Actions.PutAction block - which also isn't caring about the bold or italic values.

Was this page helpful?
0 / 5 - 0 ratings