Skip to content

fix: update monospace font-face for fenced code block#910

Open
bmuenzenmeyer wants to merge 1 commit into
mainfrom
windows-table
Open

fix: update monospace font-face for fenced code block#910
bmuenzenmeyer wants to merge 1 commit into
mainfrom
windows-table

Conversation

@bmuenzenmeyer

@bmuenzenmeyer bmuenzenmeyer commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a font-stack for pre / code blocks.

I heavily used Claude Code Opus to measure glphs and understand the problem, the fix is quite easy and surgical, suggested by me.

Validation

Watch the preview

https://api-docs-tooling-git-windows-table-openjs.vercel.app/url.html

image

Related Issues

Possible fix for #909

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Jul 17, 2026 2:18am

Request Review

@bmuenzenmeyer

Copy link
Copy Markdown
Contributor Author

this is all i had time to do right now - will check CI in a bit

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.17%. Comparing base (4534824) to head (a2f9108).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #910   +/-   ##
=======================================
  Coverage   86.17%   86.17%           
=======================================
  Files         188      188           
  Lines       17146    17146           
  Branches     1540     1539    -1     
=======================================
  Hits        14776    14776           
  Misses       2363     2363           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

api-links Generator

Performance

Metric Base Head Diff
Elapsed time 1.28 s 1.37 s +90.00 ms (+7.03%)
User CPU time 2.75 s 2.87 s +120.00 ms (+4.36%)
System CPU time 340.00 ms 330.00 ms -10.00 ms (-2.94%)
Peak resident memory 348.51 MB 345.77 MB -2.75 MB (-0.79%)

legacy-html Generator

Performance

Metric Base Head Diff
Elapsed time 12.46 s 18.20 s +5.74 s (+46.07%)
User CPU time 39.93 s 60.94 s +21.01 s (+52.62%)
System CPU time 1.60 s 2.56 s +960.00 ms (+60.00%)
Peak resident memory 2.33 GB 2.22 GB -112.64 MB (-4.73%)

legacy-json Generator

Performance

Metric Base Head Diff
Elapsed time 10.23 s 8.73 s -1.50 s (-14.66%)
User CPU time 27.83 s 27.00 s -830.00 ms (-2.98%)
System CPU time 2.06 s 1.91 s -150.00 ms (-7.28%)
Peak resident memory 1.69 GB 1.67 GB -26.36 MB (-1.52%)

llms-txt Generator

Performance

Metric Base Head Diff
Elapsed time 7.74 s 5.25 s -2.49 s (-32.17%)
User CPU time 23.79 s 15.53 s -8.26 s (-34.72%)
System CPU time 1.32 s 1.21 s -110.00 ms (-8.33%)
Peak resident memory 1.57 GB 1.85 GB +290.93 MB (+18.10%)

orama-db Generator

Output size

| File | Base | Head | Diff |

|-|-|-|-|

| orama-db.json | 8.90 MB | 8.90 MB | -1.00 B (-0.00%) |

Performance

Metric Base Head Diff
Elapsed time 8.38 s 8.76 s +380.00 ms (+4.53%)
User CPU time 23.44 s 26.47 s +3.03 s (+12.93%)
System CPU time 1.44 s 1.97 s +530.00 ms (+36.81%)
Peak resident memory 1.59 GB 1.76 GB +167.56 MB (+10.28%)

web Generator

Output size

| File | Base | Head | Diff |

|-|-|-|-|

| all.html | 21.27 MB | 21.27 MB | -158.00 B (-0.00%) |
| styles.css | 141.88 KB | 141.99 KB | +106.00 B (+0.07%) |

Performance

Metric Base Head Diff
Elapsed time 77.88 s 77.17 s -710.00 ms (-0.91%)
User CPU time 161.49 s 170.11 s +8.62 s (+5.34%)
System CPU time 4.90 s 4.62 s -280.00 ms (-5.71%)
Peak resident memory 5.59 GB 5.75 GB +158.13 MB (+2.76%)

@bmuenzenmeyer
bmuenzenmeyer marked this pull request as ready for review July 17, 2026 02:21
@bmuenzenmeyer
bmuenzenmeyer requested a review from a team as a code owner July 17, 2026 02:21
@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Presentation-only CSS scoped to pre; no logic, auth, or data changes.

Overview
Fixes misaligned ASCII-art diagrams in fenced code blocks (e.g. the URL table) on Windows by not rendering those blocks entirely in IBM Plex Mono.

Inside main pre, the PR redefines --font-ibm-plex-mono to a system monospace stack (SFMono-Regular, Menlo, Consolas, etc.)—the same stack the legacy-html generator uses. Box-drawing characters (U+2500–U+257F) are missing from Plex/Google Fonts and were falling back per-glyph to OS monospace with different advance widths than Plex letters, which sheared diagrams. Scoped to pre only so inline code and other UI (e.g. search shortcut keys) still use IBM Plex Mono via the root variable.

Reviewed by Cursor Bugbot for commit a2f9108. Bugbot is set up for automated code reviews on this repo. Configure here.

@avivkeller

Copy link
Copy Markdown
Member

Is this a doc-kit specific issue, or should this fix be upstreamed to ui-components

@MikeMcC399

Copy link
Copy Markdown

https://api-docs-tooling-git-windows-table-openjs.vercel.app/url.html looks good on my WIndows 25H2 system as well.

@MikeMcC399

Copy link
Copy Markdown

Is "font-sace" a typo?

Perhaps "font-space" or "font-face" is meant?

@bmuenzenmeyer bmuenzenmeyer changed the title fix: update monospace font-sace for fenced code block fix: update monospace font-face for fenced code block Jul 17, 2026
@bmuenzenmeyer

Copy link
Copy Markdown
Contributor Author

Is this a doc-kit specific issue, or should this fix be upstreamed to ui-components

I can check today by recreating the table in some website about markdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants