1

I recently bought a Windows 10 laptop, TravelMate P2410-G2-M. The resolution is set to the native physical resolution of the display.

However, my Gvim text displays with some pixel columns/rows smeared over multiple display pixel column/rows:

enter image description here

How can I identify fonts whose pixels map one-to-one with the pixels on the display?

The above is a general question, but the specific system I'm using is configured as follows:

  • Using Windows 10 and 64-bit Cygwin's X-windows, downloaded and installed circa start of 2020

  • The above screen shot of bleeding pixels was using the Gvim option guifont=Lucida\ Console\ Regular\ 9

Thanks.

1 Answer 1

0

Normally in Windows you should specify your font using separate fields for the font face, height and so on.

For instance, perhaps this will work better:

set guifont=Lucida_Console:h9

See :help E244 for the details of the fields you can set for the font.

In particular, take a look at the q parameter, for font quality, which includes settings such as PROOF, DRAFT, ANTIALIASED, NONANTIALIASED, or CLEARTYPE. Perhaps using a NONANTIALIASED font quality is what you're after?

Finally, consider using a font picker, which you can launch with:

:set guifont=*

You might be able to tweak details of the font in the font dialog and it's possible that you'll get a preview of what the font will look like in that dialog too.

Once you're happy with a selection, you can query :set guifont? to save that selection to your vimrc file.

12
  • Thanks, filbranden. I did some limited experimentation, and adding :q<*anything*> after the font name makes the font become the same spaced-out look as when I provide an illegal font name. The :q qualifier might not apply to X11, even on a Windows machine. I had the same result with Lucida\ Console\ Regular:9:qNOTANTIALIASED. Mar 3, 2020 at 12:25
  • The font specified in my original question was chosen from font picker set guifont=*. It's not always easy to tell how it looks from the sample that it provides, and it might be related to the colors that I use (the font picker uses black on white). I also used xfontsel in the past, but it's really complicated, with all its fields. It's the nuclear option, but I really was trying to focus my question on how to identify fonts that map pixel-to-pixel to the display. Mar 3, 2020 at 12:26
  • For example, is there a naming convention for them? A font family name? Is this complicated by the use of X11 on Windows? I'm not sure if antialiasing means the same thing; in DSP, it means low pass filtering to remove artifacts from sampling. You can have mismatched sampling without antialiasing (which would be really bad), but I'm really shooting for matched sampling so that antialiasing is not needed. Mar 3, 2020 at 12:26
  • Ah I missed you're on X11. Yes, this definitely complicates things a lot more! The answer I wrote was assuming you were on a native Windows build... Any reason why you're not using one?
    – filbranden
    Mar 3, 2020 at 15:25
  • I imagine you'll have similar trouble with other X11 applications, so maybe consider asking on Unix&Linux SE... Or, better yet, Superuser SE, there you might get expert advice on X11, Cygwin and such...
    – filbranden
    Mar 3, 2020 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.