Skip to content

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

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

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

Conversation

@bmuenzenmeyer

@bmuenzenmeyerbmuenzenmeyer 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

vercelBot commented Jul 17, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
api-docs-toolingReadyReadyPreviewJul 17, 2026 2:18am

Request Review

@bmuenzenmeyer

Copy link
Copy Markdown
ContributorAuthor

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

@codecov

codecovBot 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

MetricBaseHeadDiff
Elapsed time1.28 s1.37 s+90.00 ms (+7.03%)
User CPU time2.75 s2.87 s+120.00 ms (+4.36%)
System CPU time340.00 ms330.00 ms-10.00 ms (-2.94%)
Peak resident memory348.51 MB345.77 MB-2.75 MB (-0.79%)

legacy-html Generator

Performance

MetricBaseHeadDiff
Elapsed time12.46 s18.20 s+5.74 s (+46.07%)
User CPU time39.93 s60.94 s+21.01 s (+52.62%)
System CPU time1.60 s2.56 s+960.00 ms (+60.00%)
Peak resident memory2.33 GB2.22 GB-112.64 MB (-4.73%)

legacy-json Generator

Performance

MetricBaseHeadDiff
Elapsed time10.23 s8.73 s-1.50 s (-14.66%)
User CPU time27.83 s27.00 s-830.00 ms (-2.98%)
System CPU time2.06 s1.91 s-150.00 ms (-7.28%)
Peak resident memory1.69 GB1.67 GB-26.36 MB (-1.52%)

llms-txt Generator

Performance

MetricBaseHeadDiff
Elapsed time7.74 s5.25 s-2.49 s (-32.17%)
User CPU time23.79 s15.53 s-8.26 s (-34.72%)
System CPU time1.32 s1.21 s-110.00 ms (-8.33%)
Peak resident memory1.57 GB1.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

MetricBaseHeadDiff
Elapsed time8.38 s8.76 s+380.00 ms (+4.53%)
User CPU time23.44 s26.47 s+3.03 s (+12.93%)
System CPU time1.44 s1.97 s+530.00 ms (+36.81%)
Peak resident memory1.59 GB1.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

MetricBaseHeadDiff
Elapsed time77.88 s77.17 s-710.00 ms (-0.91%)
User CPU time161.49 s170.11 s+8.62 s (+5.34%)
System CPU time4.90 s4.62 s-280.00 ms (-5.71%)
Peak resident memory5.59 GB5.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 ownerJuly 17, 2026 02:21
@cursor

cursorBot 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

This comment was marked as resolved.

@bmuenzenmeyerbmuenzenmeyer changed the title fix: update monospace font-sace for fenced code blockfix: update monospace font-face for fenced code blockJul 17, 2026
@bmuenzenmeyer

Copy link
Copy Markdown
ContributorAuthor

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.

@bmuenzenmeyer

Copy link
Copy Markdown
ContributorAuthor

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.

Locally within the docs site, it might be even worse

image

@bmuenzenmeyer

Copy link
Copy Markdown
ContributorAuthor

nodejs/nodejs.org#9015 now fixes this upstream

Sign up for freeto 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

@bmuenzenmeyer@avivkeller@MikeMcC399@AugustinMauroy