diff --git a/apps/website/README.md b/apps/website/README.md index 244af7561..eae463fd4 100644 --- a/apps/website/README.md +++ b/apps/website/README.md @@ -216,11 +216,28 @@ These are loaded by the shared UI library (`libraries/ui/src/default-config/tail - `frontend-example` — example app - `app-template` — template for new apps -**Website-specific fonts (loaded via next/font):** +**Inter fonts (next/font here, HTTPS for every other app):** - `Inter-*.woff2` - Body text (weights: 400, 500, 600, 700) -- `InterDisplay-*.woff2` - Headlines (weights: 400, 500, 600, 700) +- `InterDisplay-*.woff2` - Headlines (weights: 400, 500, 600, 700), subsetted - `Inter-OFL.txt` - SIL Open Font License for Inter fonts +The shared UI library's `@font-face` rules point every other app at these same files, so replacing them changes typography monorepo-wide, not just on the website. + +`InterDisplay-*.woff2` is subsetted to latin + latin-ext (~106kB → ~42kB per weight). Glyphs outside that range fall back to Inter, which is full-coverage and sits next in the stack. If you upgrade the font, re-subset the new full-coverage originals: + +```bash +python3 -m fontTools.subset InterDisplay-Regular.woff2 \ + --output-file=InterDisplay-Regular.woff2 --flavor=woff2 \ + --unicodes='U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02AF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF' \ + --layout-features+=ss01,ss02,ss03,ss04,cv01,cv02,tnum,case,zero +``` + +`--layout-features+=` is load-bearing — `--layout-features='+ss04'` silently empties GSUB with no error, and the homepage/lander section headings set `fontFeatureSettings: "'ss04' on"`. Verify it survived: + +```bash +python3 -c "from fontTools.ttLib import TTFont; f=TTFont('InterDisplay-Regular.woff2'); print('ss04' in {r.FeatureTag for r in f['GSUB'].table.FeatureList.FeatureRecord})" +``` + For complete font licensing information, see `/public/fonts/README.md` ## Need Help? diff --git a/apps/website/public/fonts/InterDisplay-Bold.woff2 b/apps/website/public/fonts/InterDisplay-Bold.woff2 index 304c31d19..887423106 100644 Binary files a/apps/website/public/fonts/InterDisplay-Bold.woff2 and b/apps/website/public/fonts/InterDisplay-Bold.woff2 differ diff --git a/apps/website/public/fonts/InterDisplay-Medium.woff2 b/apps/website/public/fonts/InterDisplay-Medium.woff2 index f6157fae4..624b72f96 100644 Binary files a/apps/website/public/fonts/InterDisplay-Medium.woff2 and b/apps/website/public/fonts/InterDisplay-Medium.woff2 differ diff --git a/apps/website/public/fonts/InterDisplay-Regular.woff2 b/apps/website/public/fonts/InterDisplay-Regular.woff2 index b5a45e859..49c22167c 100644 Binary files a/apps/website/public/fonts/InterDisplay-Regular.woff2 and b/apps/website/public/fonts/InterDisplay-Regular.woff2 differ diff --git a/apps/website/public/fonts/InterDisplay-SemiBold.woff2 b/apps/website/public/fonts/InterDisplay-SemiBold.woff2 index 6e04091fe..0bf877b1b 100644 Binary files a/apps/website/public/fonts/InterDisplay-SemiBold.woff2 and b/apps/website/public/fonts/InterDisplay-SemiBold.woff2 differ diff --git a/apps/website/src/components/homepage/CourseValueProps.tsx b/apps/website/src/components/homepage/CourseValueProps.tsx index d4d296195..c57a7f8f7 100644 --- a/apps/website/src/components/homepage/CourseValueProps.tsx +++ b/apps/website/src/components/homepage/CourseValueProps.tsx @@ -5,7 +5,7 @@ const Header = () => (

Start making an impact today diff --git a/apps/website/src/components/homepage/EventsSection.tsx b/apps/website/src/components/homepage/EventsSection.tsx index 0dd917b6a..c91130cac 100644 --- a/apps/website/src/components/homepage/EventsSection.tsx +++ b/apps/website/src/components/homepage/EventsSection.tsx @@ -315,7 +315,7 @@ const EventsSection = () => {

Join an event near you diff --git a/apps/website/src/components/homepage/MergedLadder.tsx b/apps/website/src/components/homepage/MergedLadder.tsx index 34650b54c..7d7ccf531 100644 --- a/apps/website/src/components/homepage/MergedLadder.tsx +++ b/apps/website/src/components/homepage/MergedLadder.tsx @@ -40,7 +40,7 @@ const RungHeader = ({ rung }: { rung: Rung }) => ( {rung.step}

{rung.title} diff --git a/apps/website/src/components/lander/TestimonialCarousel.tsx b/apps/website/src/components/lander/TestimonialCarousel.tsx index 075edf771..40c628016 100644 --- a/apps/website/src/components/lander/TestimonialCarousel.tsx +++ b/apps/website/src/components/lander/TestimonialCarousel.tsx @@ -173,10 +173,6 @@ const TestimonialCarousel = ({ ? 'Our community' : 'Meet our alumni shaping AI\'s future'; - const headerSizeClasses = variant === 'homepage' - ? 'text-size-xl bd-md:text-size-2xl' - : 'text-size-xl'; - return (
{/* Header Container */} @@ -187,10 +183,7 @@ const TestimonialCarousel = ({
{variant === 'homepage' ? (

{/* eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing */} diff --git a/apps/website/src/lib/fonts.ts b/apps/website/src/lib/fonts.ts index c5d24b9ce..e8a230a8e 100644 --- a/apps/website/src/lib/fonts.ts +++ b/apps/website/src/lib/fonts.ts @@ -46,12 +46,10 @@ export const interDisplay = localFont({ weight: '600', style: 'normal', }, - { - path: '../../public/fonts/InterDisplay-Bold.woff2', - weight: '700', - style: 'normal', - }, ], variable: '--font-inter-display', display: 'swap', + // Skip the generated Arial-based fallback so the swap falls through to preloaded + // Inter instead: same typeface, different optical size. + adjustFontFallback: false, }); diff --git a/apps/website/src/pages/_app.tsx b/apps/website/src/pages/_app.tsx index 4e4405a55..967a2a0eb 100644 --- a/apps/website/src/pages/_app.tsx +++ b/apps/website/src/pages/_app.tsx @@ -15,7 +15,7 @@ import '../globals.css'; import BugReportProvider, { useBugReport } from '../hooks/useBugReport'; import '../lib/axios'; // Configure axios-hooks import { FOAI_COURSE_SLUG } from '../lib/constants'; -import { inter } from '../lib/fonts'; +import { inter, interDisplay } from '../lib/fonts'; import { useCourses } from '../lib/hooks/useCourses'; import { reportClientError } from '../lib/reportClientError'; import { trpc } from '../utils/trpc'; @@ -81,7 +81,7 @@ const AppContent: React.FC = ({ Component, pageProps }) => { }; return ( -
+
BlueDot Impact