diff --git a/apps/desktop/layer/renderer/src/components/common/ShadowDOM.tsx b/apps/desktop/layer/renderer/src/components/common/ShadowDOM.tsx
index 44c46a078..0e6531256 100644
--- a/apps/desktop/layer/renderer/src/components/common/ShadowDOM.tsx
+++ b/apps/desktop/layer/renderer/src/components/common/ShadowDOM.tsx
@@ -9,6 +9,7 @@ import root from "react-shadow"
import { useUISettingKeys } from "~/atoms/settings/ui"
import { useReduceMotion } from "~/hooks/biz/useReduceMotion"
+import { buildAppFontFamily } from "~/lib/font-family"
import type { TextSelectionEvent } from "~/lib/simple-text-selection"
import { addTextSelectionListener } from "~/lib/simple-text-selection"
@@ -120,7 +121,7 @@ export const ShadowDOM: FC<
({
- fontFamily: `${uiFont},"SN Pro", system-ui, sans-serif`,
+ fontFamily: buildAppFontFamily(uiFont),
"--pointer": usePointerCursor ? "pointer" : "default",
"--fo-a": hexToHslString(getAccentColorValue(accentColor)[dark ? "dark" : "light"]),
}),
diff --git a/apps/desktop/layer/renderer/src/constants/ui.ts b/apps/desktop/layer/renderer/src/constants/ui.ts
index b193af66a..d502dbf3e 100644
--- a/apps/desktop/layer/renderer/src/constants/ui.ts
+++ b/apps/desktop/layer/renderer/src/constants/ui.ts
@@ -1,4 +1,5 @@
export const ElECTRON_CUSTOM_TITLEBAR_HEIGHT = 30
// export const ELECTRON_WINDOWS_RADIUS = 12
-export const readableContentMaxWidthClassName = "max-w-[clamp(45ch,60vw,65ch)]"
+export const readableContentMaxWidthClassName =
+ "max-w-[clamp(45ch,60vw,65ch)] print:max-w-[calc(100vw-2rem)]"
diff --git a/apps/desktop/layer/renderer/src/lib/__tests__/font-family.test.ts b/apps/desktop/layer/renderer/src/lib/__tests__/font-family.test.ts
new file mode 100644
index 000000000..5b36c7a48
--- /dev/null
+++ b/apps/desktop/layer/renderer/src/lib/__tests__/font-family.test.ts
@@ -0,0 +1,17 @@
+import { describe, expect, it } from "vitest"
+
+import { buildAppFontFamily } from "../font-family"
+
+describe("buildAppFontFamily", () => {
+ it("keeps generic families unquoted and adds CJK fallbacks", () => {
+ expect(buildAppFontFamily("system-ui")).toBe(
+ 'system-ui, "SN Pro", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif',
+ )
+ })
+
+ it("deduplicates preferred fonts that already exist in the fallback stack", () => {
+ expect(buildAppFontFamily("PingFang SC")).toBe(
+ '"PingFang SC", "SN Pro", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif',
+ )
+ })
+})
diff --git a/apps/desktop/layer/renderer/src/lib/font-family.ts b/apps/desktop/layer/renderer/src/lib/font-family.ts
new file mode 100644
index 000000000..b78868ea7
--- /dev/null
+++ b/apps/desktop/layer/renderer/src/lib/font-family.ts
@@ -0,0 +1,61 @@
+const GENERIC_FONT_FAMILIES = new Set([
+ "cursive",
+ "emoji",
+ "fangsong",
+ "fantasy",
+ "math",
+ "monospace",
+ "sans-serif",
+ "serif",
+ "system-ui",
+ "ui-monospace",
+ "ui-rounded",
+ "ui-sans-serif",
+ "ui-serif",
+])
+
+const CJK_FONT_FALLBACKS = [
+ "PingFang SC",
+ "Hiragino Sans GB",
+ "Microsoft YaHei",
+ "Noto Sans CJK SC",
+]
+
+const APP_FONT_FALLBACKS = ["SN Pro", ...CJK_FONT_FALLBACKS, "system-ui", "sans-serif"]
+
+const normalizeFontFamily = (value: string) => {
+ return value.trim().replaceAll(/^['"]|['"]$/g, "")
+}
+
+const serializeFontFamily = (value: string) => {
+ const normalizedValue = normalizeFontFamily(value)
+
+ if (GENERIC_FONT_FAMILIES.has(normalizedValue)) {
+ return normalizedValue
+ }
+
+ return `"${normalizedValue.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`
+}
+
+export const buildAppFontFamily = (preferred?: string) => {
+ const families = [preferred, ...APP_FONT_FALLBACKS]
+ const seen = new Set
()
+
+ return families
+ .map((family) => family?.trim() ?? "")
+ .filter(Boolean)
+ .filter((family) => {
+ const normalizedValue = normalizeFontFamily(family).toLowerCase()
+
+ if (seen.has(normalizedValue)) {
+ return false
+ }
+
+ seen.add(normalizedValue)
+ return true
+ })
+ .map(serializeFontFamily)
+ .join(", ")
+}
+
+export const DEFAULT_APP_FONT_FAMILY = buildAppFontFamily("system-ui")
diff --git a/apps/desktop/layer/renderer/src/modules/app-layout/ai-enhanced-timeline/AIEnhancedTimelineLayout.tsx b/apps/desktop/layer/renderer/src/modules/app-layout/ai-enhanced-timeline/AIEnhancedTimelineLayout.tsx
index 551a39307..08e173f2a 100644
--- a/apps/desktop/layer/renderer/src/modules/app-layout/ai-enhanced-timeline/AIEnhancedTimelineLayout.tsx
+++ b/apps/desktop/layer/renderer/src/modules/app-layout/ai-enhanced-timeline/AIEnhancedTimelineLayout.tsx
@@ -218,6 +218,7 @@ const AIEnhancedTimelineLayoutImpl = () => {
{
{splitter}
diff --git a/apps/desktop/layer/renderer/src/modules/app-layout/ai/AISplineButton.tsx b/apps/desktop/layer/renderer/src/modules/app-layout/ai/AISplineButton.tsx
index 73f4c7880..eb1788870 100644
--- a/apps/desktop/layer/renderer/src/modules/app-layout/ai/AISplineButton.tsx
+++ b/apps/desktop/layer/renderer/src/modules/app-layout/ai/AISplineButton.tsx
@@ -25,9 +25,14 @@ export const AIIndicator: FC = () => {
return (
<>
- {shouldShow && !showSplineButton && }
+ {shouldShow && !showSplineButton && (
+
+ )}
{shouldShow && showSplineButton && (
= ({
title: entryTranslation.title ?? undefined,
}
: undefined,
- [entryTranslation?.content, entryTranslation?.title],
+ [entryTranslation],
)
return (
@@ -212,9 +213,10 @@ const EntryContentImpl: Component
= ({
+
{!content && !isInReadabilityMode ? (
diff --git a/apps/desktop/layer/renderer/src/modules/entry-content/components/EntryPrintHeader.tsx b/apps/desktop/layer/renderer/src/modules/entry-content/components/EntryPrintHeader.tsx
new file mode 100644
index 000000000..924e589e0
--- /dev/null
+++ b/apps/desktop/layer/renderer/src/modules/entry-content/components/EntryPrintHeader.tsx
@@ -0,0 +1,53 @@
+import { Folo } from "@follow/components/icons/folo.js"
+import { Logo } from "@follow/components/icons/logo.jsx"
+import { useEntry } from "@follow/store/entry/hooks"
+import { useFeedById } from "@follow/store/feed/hooks"
+import { useInboxById } from "@follow/store/inbox/hooks"
+import { cn } from "@follow/utils/utils"
+
+import { readableContentMaxWidthClassName } from "~/constants/ui"
+
+const PRINT_HOMEPAGE = "https://folo.is"
+const PRINT_HOMEPAGE_LABEL = "folo.is"
+
+export const EntryPrintHeader = ({ entryId }: { entryId: string }) => {
+ const entry = useEntry(entryId, (state) => ({
+ feedId: state.feedId,
+ inboxId: state.inboxHandle,
+ }))
+
+ const feed = useFeedById(entry?.feedId)
+ const inbox = useInboxById(entry?.inboxId)
+ const sourceTitle = feed?.title || inbox?.title
+
+ return (
+
+
+
+
+
+
+ The AI Reader that reads the internet for you
+
+ {sourceTitle ? (
+
Source: {sourceTitle}
+ ) : null}
+
+
+
+ )
+}
diff --git a/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx b/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx
index 23e6139ee..1f64c588c 100644
--- a/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx
+++ b/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx
@@ -58,7 +58,7 @@ export const ArticleLayout: React.FC
= ({
return (
-
+
diff --git a/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/SocialMediaLayout.tsx b/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/SocialMediaLayout.tsx
index af2b26a5c..1746c1589 100644
--- a/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/SocialMediaLayout.tsx
+++ b/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/SocialMediaLayout.tsx
@@ -21,7 +21,7 @@ export const SocialMediaLayout: React.FC
= ({
if (!entry || !feed) return null
return (
-
+
{/* Single Author header without avatar */}
diff --git a/apps/desktop/layer/renderer/src/providers/setting-sync.tsx b/apps/desktop/layer/renderer/src/providers/setting-sync.tsx
index 42fb30fad..618a32126 100644
--- a/apps/desktop/layer/renderer/src/providers/setting-sync.tsx
+++ b/apps/desktop/layer/renderer/src/providers/setting-sync.tsx
@@ -15,6 +15,7 @@ import { useReduceMotion } from "~/hooks/biz/useReduceMotion"
import { useSyncTheme } from "~/hooks/common"
import { langChain } from "~/i18n"
import { ipcServices } from "~/lib/client"
+import { buildAppFontFamily } from "~/lib/font-family"
import { loadLanguageAndApply } from "~/lib/load-language"
const useUpdateDockBadge = (setting: UISettings) => {
@@ -66,8 +67,7 @@ const useUISettingSync = () => {
useInsertionEffect(() => {
const root = document.documentElement
- // https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#valid_family_names
- const fontCss = `"${setting.uiFontFamily}", system-ui, sans-serif`
+ const fontCss = buildAppFontFamily(setting.uiFontFamily)
Object.assign(root.style, {
fontFamily: fontCss,
diff --git a/apps/desktop/layer/renderer/src/styles/base.css b/apps/desktop/layer/renderer/src/styles/base.css
index 517fcd1ae..9fb2196a3 100644
--- a/apps/desktop/layer/renderer/src/styles/base.css
+++ b/apps/desktop/layer/renderer/src/styles/base.css
@@ -1,6 +1,8 @@
html,
#shadow-html {
- --fo-font-family: "SN Pro", system-ui, sans-serif;
+ --fo-font-family:
+ "SN Pro", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
+ sans-serif;
}
html {
diff --git a/packages/internal/components/src/ui/auto-resize-height/index.tsx b/packages/internal/components/src/ui/auto-resize-height/index.tsx
index 2ac8bdeaf..cedabe2da 100644
--- a/packages/internal/components/src/ui/auto-resize-height/index.tsx
+++ b/packages/internal/components/src/ui/auto-resize-height/index.tsx
@@ -46,12 +46,15 @@ export const AutoResizeHeight: React.FC
= ({
return (
-