On Mi, 13 Jun 2018, Luc Hermitte wrote:
> Hi, > > Is there a way to test whether vim can display a glyph with the current font? > Given it defaults to some made-up glyphs I suspect it has a way to do it > internally, but I haven't found in the doc whether this information is > exposed. > > The objective is to be able to select the fallback solution > > :let warning_sign = FirstSupportedAmong("\u26a0", "\u26DB", "!!") I don't think there is a good way, because especially in the terminal Vim won't know what the result of a character will actually look like. Best way I can think of, put the character on the tabline. Then capture the result and compare using `:echo nr2char(screenchar(1,1))` That is probably nothing that can be done without the user noticing it (e.g. it most likely requires a redraw for the tabline to be displayed before capturing the result and then hiding and restoring the tabline again). Best, Christian -- Letzte Worte eines Chemikers: "So, jetzt die Knallgasprobe." -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.