Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions apps/desktop/src/preview/Annotation.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
}

:host {
--t3-font-sans:
"DM Sans Variable", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
sans-serif;
--t3-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
--t3-font-mono:
"SF Mono", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
--t3-radius: 0.625rem;
--t3-background: white;
--t3-foreground: oklch(0.269 0 0);
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/preview/AnnotationStyles.generated.ts

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions apps/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,7 @@
body {
background: #ffffff;
color: #262626;
font-family:
"DM Sans Variable",
"DM Sans",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
system-ui,
sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

html.dark body {
Expand Down
2 changes: 0 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@effect/atom-react": "catalog:",
"@fontsource-variable/dm-sans": "^5.2.8",
"@fontsource/jetbrains-mono": "^5.2.8",
"@formkit/auto-animate": "^0.9.0",
"@legendapp/list": "catalog:",
"@lexical/react": "^0.41.0",
Expand Down
6 changes: 2 additions & 4 deletions apps/web/src/appearanceFonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ import {
MIN_PROMPT_FONT_SIZE,
} from "@t3tools/contracts";

// Pylon's bundled brand faces lead both stacks; see the `@fontsource` imports
// in `main.tsx`. The system faces stay behind them as fallbacks.
export const DEFAULT_SANS_FONT_STACK =
'"DM Sans Variable", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';
'-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';

// Concrete names first: some engines alias `ui-monospace` to the
// proportional system UI font, which would break every code surface.
export const DEFAULT_CODE_FONT_STACK =
'"SF Mono", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace';
'"SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace';

export const TYPOGRAPHY_ADVANCED_STORAGE_KEY = "t3code:typography-advanced";

Expand Down
35 changes: 10 additions & 25 deletions apps/web/src/components/settings/SettingsPanels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1185,33 +1185,18 @@ export function AppearanceSettingsPanel() {
);
}

function probeFontDefaultFamilies() {
return {
sans: resolveDefaultFamilyLabel(DEFAULT_SANS_FONT_STACK) ?? "System default",
code: resolveDefaultFamilyLabel(DEFAULT_CODE_FONT_STACK) ?? "System monospace",
};
}

function useFontDefaultFamilies() {
const settings = usePrimarySettings();
// An unset preference shows the font it resolves to on this machine, so the
// name is probed rather than hardcoded. Pylon's sans default is a bundled
// face, which loads asynchronously: a probe on first mount can miss it and
// report the system fallback instead, so re-probe once font loading settles.
const [defaults, setDefaults] = useState(probeFontDefaultFamilies);
useEffect(() => {
let cancelled = false;
void document.fonts?.ready.then(() => {
if (cancelled) return;
setDefaults((current) => {
const next = probeFontDefaultFamilies();
return current.sans === next.sans && current.code === next.code ? current : next;
});
});
return () => {
cancelled = true;
};
}, []);
// An unset preference shows the font it resolves to on this machine; the
// default stacks are the platform's own faces, so the name is probed, not
// hardcoded.
const defaults = useMemo(
() => ({
sans: resolveDefaultFamilyLabel(DEFAULT_SANS_FONT_STACK) ?? "System default",
code: resolveDefaultFamilyLabel(DEFAULT_CODE_FONT_STACK) ?? "System monospace",
}),
[],
);
return {
sans: defaults.sans,
code: defaults.code,
Expand Down
8 changes: 2 additions & 6 deletions apps/web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,9 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
the variables and Settings -> Appearance can override them at runtime. The
default stacks are mirrored in `appearanceFonts.ts`. */
@theme {
--font-sans:
"DM Sans Variable", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
sans-serif;
/* Concrete names first: some engines alias `ui-monospace` to the proportional
system UI font, which would break every code surface. */
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
--font-mono:
"SF Mono", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

@theme inline {
Expand Down
7 changes: 0 additions & 7 deletions apps/web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ import { passkeys } from "@clerk/electron/passkeys";
import { ClerkProvider as ElectronClerkProvider } from "@clerk/electron/react";
import { createHashHistory, createBrowserHistory } from "@tanstack/react-router";

// Pylon ships its brand faces rather than inheriting whatever the OS supplies.
// Settings -> Appearance still overrides them per surface; these are the
// defaults those pickers reset back to.
import "@fontsource-variable/dm-sans/index.css";
import "@fontsource/jetbrains-mono/400.css";
import "@fontsource/jetbrains-mono/500.css";

import "./index.css";

import { isElectron } from "./env";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/terminal/ghostty/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const TERMINAL_GLYPH_FALLBACKS =
// unknown keyword (like ui-monospace) makes canvas font shorthand parsing
// reject the whole string.
export const DEFAULT_TERMINAL_FONT_FAMILY =
'"SF Mono", "SFMono-Regular", "JetBrains Mono", ' + TERMINAL_GLYPH_FALLBACKS;
'"SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", ' + TERMINAL_GLYPH_FALLBACKS;
const CONTENT_PADDING = 4;
const MIN_SCROLLBAR_THUMB_HEIGHT = 18;
/** Half a blink cycle: the visible and hidden phases are equally long. */
Expand Down
16 changes: 0 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading