Is it possible in cmd to set the character cell size to exactly 1x1 pixels?

Anton Sumak 0 Reputation points
2025-12-10T21:06:49.4366667+00:00

Hello, I am experimenting with cmd and I would like to know if it is possible to configure the console font so that each character cell is rendered as exactly 1x1 pixels.

I have already tried several approaches, but none of them achieved this goal:

  • Using the WinAPI function SetCurrentConsoleFontEx, the smallest size I could obtain was 1x2.
  • I created a custom font with no padding or spacing, but the result was still 1x2.
  • With a square font (equal width and height glyphs), the minimum size became 2x2.
  • I also investigated raster fonts: I discovered that each Terminal font size corresponds to a separate .FON file. I was able to replace app866.fon, but I could not add a new font file to introduce a new size (1x1).

Given these attempts, I would like to ask:

  • Is there any supported way in Windows to achieve a true 1x1 pixel font size in cmd?
  • Or is this limitation inherent to the way cmd renders fonts through GDI?

Thank you very much for your guidance.

Windows development | Windows API - Win32
{count} votes

2 answers

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 6,540 Reputation points Microsoft External Staff Moderator
    2025-12-11T09:10:45.2566667+00:00

    Hi @Anton Sumak ,

    Thanks for reaching out.

    What you’re trying to achieve - a true 1×1 pixel character cell in the Windows Console (cmd) - doesn’t appear to be supported by the way the console renders text. The console relies on GDI-style font rendering, and in practice it enforces a minimum glyph size that’s larger than 1 pixel. Even when using custom raster fonts, .FON files, or APIs like SetCurrentConsoleFontEx, the console tends to clamp the size to something like 1×2 or 2×2, rather than accepting 1×1. From what’s observable, this behavior seems to come from the console subsystem itself rather than the specific font files you supply.

    Because of that, there doesn’t seem to be a way to get true 1×1 pixel character cells in cmd, and there’s no documented API setting that would allow overriding the minimum character-cell size.

    If you need a very small “pixel-like” effect, one possible workaround is to design glyphs that act as pixel fragments. With a minimum cell size of 1×2, you can create characters that represent things like the top half or bottom half of a pixel. By combining multiple characters, you can visually approximate finer resolution, even though the console still isn’t rendering real 1×1 cells underneath.

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

    1 person found this answer helpful.
    0 comments No comments

  2. Anton Sumak 0 Reputation points
    2025-12-20T14:34:11.73+00:00

    From my experiments, it was not possible to achieve a smaller cell size than 1x2 pixels in cmd. Using fonts designed with a single‑pixel glyph is an interesting idea, but you need to take into account ClearType subpixel antialiasing. Because of this rendering method, a single pixel glyph will effectively be blurred into a 2x2 block, so the result is never a true 1x1 cell.

    I also investigated raster fonts, but I am not aware of any supported way to introduce new raster font sizes at that granularity.

    There are a few possible workarounds:

    • You can eliminate the antialiasing effect by coloring the background rather than relying on single‑pixel glyphs.
    • Accept that a 1x2 cell is already extremely small and may be sufficient for most scenarios.

    The only practical solution I found was to switch to Windows Terminal. There you can easily configure a true 1x1 pixel, and rendering performance is significantly better.

    For example, with WriteConsoleA output my measurements were:

    • cmd: ~523 ms
    • Windows Terminal (Direct2D): ~45 ms
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.