Skip to content

Add fonts module: document and load Raleway/Roboto in solid-ui#736

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/check-installed-fonts-mashlib
Closed

Add fonts module: document and load Raleway/Roboto in solid-ui#736
Copilot wants to merge 2 commits intomainfrom
copilot/check-installed-fonts-mashlib

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

style.js referenced Raleway, Roboto, and Arial in inline style strings, but none of these web fonts were ever loaded — Raleway and Roboto silently fell back to the browser's sans-serif on most systems.

Changes

  • src/styleConstants.js — two new constants centralise the font stacks:

    fontFamilyButton: 'Raleway, Roboto, sans-serif',
    fontFamilyHeader: 'Arial, sans-serif',
  • src/style.js — all hard-coded font-family literals replaced with template-literal references to those constants.

  • src/fonts.ts (new) — public module exposing:

    • fontNames — individual font names (Raleway, Roboto)
    • fontFamilies — full CSS font-family stacks
    • loadFonts(url?) — idempotent function that injects a <link rel="stylesheet"> into document.head; defaults to Google Fonts but accepts any self-hosted URL for privacy-conscious deployments:
      // Use default Google Fonts endpoint
      loadFonts()
      
      // Or supply a self-hosted stylesheet
      loadFonts('https://my-pod.example/fonts/raleway-roboto.css')
  • src/index.tsfonts added to named exports and window.UI.

Copilot AI changed the title [WIP] Investigate installed fonts in Mashlib Add fonts module: document and load Raleway/Roboto in solid-ui Apr 9, 2026
Copilot AI requested a review from SharonStrats April 9, 2026 13:38
@SharonStrats
Copy link
Copy Markdown
Contributor

I was just asking a question didn't want a PR.

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.

2 participants