neovim-qt icon indicating copy to clipboard operation
neovim-qt copied to clipboard

Use QFont::exactMatch to check whether font is an exact match

Open charmander opened this issue 1 year ago • 1 comments

Fixes GuiFont being unnecessarily picky, e.g. when the foundry isn’t included ("Roboto Mono" != "Roboto Mono [GOOG]").

charmander avatar Jul 15 '22 02:07 charmander

What scenario does this fix?

I assume something like :GuiFont Roboto Mono currently reports an unknown font error, and with this patch the font reports correctly.

We should do some testing to make sure this patch does not cause font description string mismatch issues downstream.

After testing, this is probably fine to merge! :thumbsup:

jgehrig avatar Jul 15 '22 21:07 jgehrig

@charmander

Friendly ping :)

I would be happy to merge these changes if you can quickly explain the broken scenario.

jgehrig avatar Aug 02 '22 03:08 jgehrig

I assume something like :GuiFont Roboto Mono currently reports an unknown font error, and with this patch the font reports correctly.

Sorry for the wait! Yes, that’s the scenario. I haven’t had time to look at the tests yet.

charmander avatar Aug 02 '22 03:08 charmander

It looks like exactMatch is too picky for this purpose in a different way (font size).

charmander avatar Aug 27 '22 22:08 charmander