Braille Viewer draws two braille patterns wrongly (U+28CC, U+2873) because of glyph errors in FreeMono-FixedBraille.ttf

Open Beginner friendly
#21,022 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #21064 by @unvisible789 — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start with fonts\FreeMono-FixedBraille.ttf and the bundled Python check that renders U+2800–U+28FF, then compare the fixed font with upstream GNU FreeFont. Confirm that U+28CC and U+2873 draw dots 3-4-7-8 and 1-2-5-6-7 respectively, and that the all-pattern check reports no glyph errors in the Braille Viewer font.

Written by the indexing model from the issue text.

Description

audience/a11y-tester good first issue p4 triaged
Steps to reproduce:
  1. Open the Braille Viewer (NVDA menu > Tools > Braille Viewer).
  2. Use an output table that produces braille pattern U+28CC (dots 3-4-7-8) or U+2873 (dots 1-2-5-6-7). The simplest way: set the output table to Chinese (Taiwan, Mandarin) zh-tw.ctb, open Notepad and type or paste ⣌⡳. This table passes Unicode braille characters through unchanged, so the display gets exactly these two cells.
  3. Compare the cells drawn in the Braille Viewer with the dots on a braille display, or with the character codes.
Actual behavior:

The Braille Viewer draws the wrong dots for two patterns:

Character Correct dots Drawn by the Braille Viewer
U+28CC ⣌ 3-4-7-8 2-3-4-7-8 (looks the same as U+28CE ⣎)
U+2873 ⡳ 1-2-5-6-7 1-2-6-7 (dot 5 missing)

The braille display shows the correct dots. The text in the viewer's control also holds the correct characters (I read it back with WM_GETTEXT: U+28CC). Only the drawing is wrong.

Expected behavior:

The Braille Viewer draws the same dots that the braille display shows.

Cause:

The Braille Viewer uses the bundled font fonts\FreeMono-FixedBraille.ttf. The glyphs for U+28CC and U+2873 in that font are wrong. I rendered all 256 braille patterns (U+2800 to U+28FF) with Pillow, detected which of the 8 dot positions are inked, and compared them with each code point's bits. Only these two glyphs were wrong. The same check found no errors in Segoe UI Symbol.

The upstream GNU FreeFont FreeMono.ttf has the same two wrong glyphs, so the error probably comes from upstream and was carried into the fixed copy.

Check script (Python 3 with Pillow):

from PIL import Image, ImageDraw, ImageFont

FONT = r"C:\Program Files\NVDA\fonts\FreeMono-FixedBraille.ttf"
F = ImageFont.truetype(FONT, 200)

def render(ch):
    img = Image.new("L", (300, 300), 255)
    ImageDraw.Draw(img).text((50, 20), ch, font=F, fill=0)
    return img.load()

# Find the 8 dot centres from U+28FF (all dots)
px = render("\u28FF")
dark = [(x, y) for x in range(300) for y in range(300) if px[x, y] < 128]

def centres(vals):
    vals, out, cur = sorted(set(vals)), [], []
    for v in vals:
        if cur and v - cur[-1] > 3:
            out.append(sum(cur) / len(cur)); cur = []
        cur.append(v)
    return out + [sum(cur) / len(cur)]

cols, rows = centres(x for x, _ in dark), centres(y for _, y in dark)
POS = {1: (0, 0), 2: (0, 1), 3: (0, 2), 4: (1, 0), 5: (1, 1), 6: (1, 2), 7: (0, 3), 8: (1, 3)}
for code in range(256):
    img = render(chr(0x2800 + code))
    got = sum(1 << (d - 1) for d, (c, r) in POS.items() if img[int(cols[c]), int(rows[r])] < 128)
    if got != code:
        print(f"U+{0x2800 + code:04X}: expected {code:08b}, drawn {got:08b}")

Output:

U+2873: expected 01110011, drawn 01100011
U+28CC: expected 11001100, drawn 11001110
How I found it:

I was testing a braille table that puts Mandarin tones on dots 7 and 8. The Braille Viewer showed 2-3-4-7-8 where the braille display correctly showed 3-4-7-8.

NVDA logs, crash dumps and other attachments:

None needed. The problem is in the font file.

System configuration
NVDA installed/portable/running from source:

Installed

NVDA version:

2026.2 (AMD64)

Windows version:

Windows 11 Enterprise 10.0.26200

Name and version of other software in use when reproducing the issue:

Notepad

Other information about your system:

Braille display: Freedom Scientific Focus 40

Other questions
Does the issue still occur after restarting your computer?

Yes. The glyphs are wrong in the font file itself.

Have you tried any other versions of NVDA? If so, please report their behaviors.

No.

If NVDA add-ons are disabled, is your problem still occurring?

Yes. The font file is part of NVDA.

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Not applicable.

Dominant language
Python
Stars
2.7k
Forks
842
Avg merge
2d 4h
Merged PRs (30d)
56

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvaccess/nvda

All issues in nvaccess/nvda

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.