Skip to content

Fix font fallbacks to prevent horrible font rendering on some computers#1141

Merged
0xeye merged 7 commits intorelease/04-01-26from
fix-bad-font-fallback
Apr 1, 2026
Merged

Fix font fallbacks to prevent horrible font rendering on some computers#1141
0xeye merged 7 commits intorelease/04-01-26from
fix-bad-font-fallback

Conversation

@rossgalloway
Copy link
Copy Markdown
Collaborator

@rossgalloway rossgalloway commented Mar 26, 2026

Summary

Some users have posted screenshots of the Yearn website with fonts that are wildly different from the expected Aeonik fonts. This PR attempts to prevent that by setting better fallback options for font choices by browser

What it looked like on some computers:
image

This was downloading and using source-code-pro and the font fallbacks were also behaving poorly.

This change should improve this and provide reasonable sans serif fallbacks when users have disabled font downloads.

To Test:

This PR includes a new route at /font-fallbacks that shows the possible fonts for you to review.

To simulate users who have font downloads disabled, block font file requests and then reload the page:

Chrome / Brave / other Chromium browsers

  1. Open DevTools.
  2. Open More tools -> Request blocking.
  3. Enable request blocking and add these patterns:
    • *.woff
    • *.woff2
    • *.ttf
    • *.otf
  4. Hard refresh /font-fallbacks.

Firefox

  1. Open about:config.
  2. Set browser.display.use_document_fonts to 0.
  3. Reload /font-fallbacks.

What to verify

  • The page should still render with reasonable sans-serif fallbacks for body/UI text.
  • Numeric/mono samples should fall back to a normal monospace font.
  • The Likely Rendered labels on the page should show expected fallback families instead of something unexpected.
  • The app should no longer fall through to Source Code Pro for normal UI text when Aeonik is unavailable.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

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

Project Deployment Actions Updated (UTC)
yearnfi Ready Ready Preview, Comment Mar 31, 2026 1:29pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 32f2bd9.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

  • package.json

@rossgalloway rossgalloway marked this pull request as draft March 26, 2026 22:48
@rossgalloway rossgalloway changed the title Add font fallback preview page Fix font fallbacks to prevent horrible font rendering on some computers Mar 26, 2026
@rossgalloway rossgalloway changed the base branch from main to release/04-01-26 March 26, 2026 22:49
@rossgalloway rossgalloway force-pushed the fix-bad-font-fallback branch from b4d55d9 to 5e71403 Compare March 26, 2026 22:55
@0xeye 0xeye force-pushed the release/04-01-26 branch from b5a0516 to 35c4c3e Compare March 27, 2026 13:27
@rossgalloway rossgalloway marked this pull request as ready for review March 30, 2026 19:32
Ross and others added 7 commits March 31, 2026 09:26
Improve the /font-fallbacks detector so rendered-font matching uses\nthe full canvas pixel data instead of alpha-only hashes.\n\n- Hash every image-data channel when fingerprinting probe output\n- Recompute likely rendered fonts when webfonts finish loading\n- Keep the label in sync with swap-based font loading on cold loads
@0xeye 0xeye merged commit 1281916 into release/04-01-26 Apr 1, 2026
7 checks passed
@0xeye 0xeye deleted the fix-bad-font-fallback branch April 1, 2026 19:47
0xeye pushed a commit that referenced this pull request Apr 1, 2026
0xeye pushed a commit that referenced this pull request Apr 1, 2026
rossgalloway added a commit that referenced this pull request Apr 3, 2026
* feat: reduce useEffect usage (#1120)

* feat: initial

* feat: round two

* feat: round three

* chore: update CLAUDE.md

* fix: price impact confirmation resets (#1124)

Replace remembered confirmation keys with keyed resettable state in the deposit and withdraw widgets.

This preserves the high-price-impact warning behavior without reintroducing a reset effect, so a user returning from quote B back to quote A must acknowledge the warning again.

---------

Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>

* feat: add Tenderly virtual testnet workflow (#1135)

* fix warning not showing correctly (#1117)

* fix TVL chart (#1118)

* update strategy APY fallback behavior (#1119)

* update modals for TGE (#1122)

* update modals for TGE

* update messaging

* update modal language

* Fix vault chain selection (#1123)

Keep the vault list aligned with the selected chain filter and\nmake chain switching behave consistently across the page.\n\n- apply selected-chain filtering to holdings in both V2 and V3\n  vault filters so other-chain rows do not leak into the list\n- reuse a single-chain selection helper for the top selector and\n  row chips so switching chains cannot drift into mixed states\n- add focused tests for selected-chain matching and single-chain\n  selection behavior

* Fix reflected XSS in /api/vault/meta endpoint (#1129)

Add strict allowlist validation for chainId and address query parameters
before they are interpolated into HTML. chainId must be numeric and
address must match the 0x-prefixed 40-char hex pattern, otherwise the
request is rejected with a 400. This prevents attackers from breaking
out of meta tag attribute contexts to inject arbitrary HTML/scripts.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add strategy-level KAT rewards APR display (#1128)

* Add strategy-level KAT rewards APR display

- Schema: make estimated apr/apy optional (Kong hydration may set
  only apr for strategy-addressed rows), add katRewardsAPR component
- Selector: fall back to estimated.apr for katana strategies when
  estimated.apy is missing, extract katRewardsAPR from estimated type
- Strategy UI: show sword emoji indicator when strategy has KAT rewards
- Tests: cover katana strategy APR fallback and non-katana isolation

* fix: make KAT rewards additive on top of oracle APY with tooltip breakdown

- Selector: estimatedAPY now always falls through to oracle.apy for
  Katana strategies instead of using estimated.apr (which is KAT rewards)
- UI: strategy row shows combined APY (oracle + KAT rewards)
- UI: hover tooltip breaks down Base APY and KAT Rewards APR
- Tooltip follows existing pattern (rounded-lg border surface-secondary)
- Tests updated to reflect additive behavior

* fix: remove sword emoji from KAT rewards tooltip

* style: fix biome formatting

* fix kong selector

---------

Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi>
Co-authored-by: Ross <therossgalloway@gmail.com>
Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>

* init tenderly testnets

* add tenderly control panel

* create tenderly script

* refine tenderly vnet script defaults

* refine tenderly control panel state

* simplify tenderly control panel

* harden tenderly vnet script

* fix simulate wrapper typing

* fix cooldown to use block time

* gate tenderly admin routes and validate config

* use request IP for tenderly admin access

* fix tenderly approval and ens config

* fix tenderly loopback and env bootstrap

* treat failed tenderly reverts as errors

* fix tenderly chain identity mapping

* fix tenderly snapshot reset and localhost forks

* keep codex agent log local

* update gitignore

* separate canonical and execution chain lists

* fix localhost aliasing and explorer defaults

* keep canonical chains in wagmi config

* preserve mainnet wagmi transport

* fix tenderly execution boundary leaks

* Fix locked yvUSD historical PPS and APY normalization (#1133)

* update locked APY and PPS timeseries values to reflect actual conditions

* review fix

* Fix yvUSD historical PPS handling

Preserve missing historical PPS values instead of collapsing them to zero.\n\n- Keep weekly and monthly PPS lookbacks nullable in Kong vault APR data\n- Reuse yvUSD chart-derived historical APY in portfolio blending\n- Align portfolio and chart history so partial snapshot PPS data does\n  not produce bogus locked APY values

* fix tenderly wagmi chain exposure

* fix biome import ordering

* update env.example

---------

Co-authored-by: murderteeth <89237203+murderteeth@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: juniordevbot[bot] <170848020+juniordevbot[bot]@users.noreply.github.com>
Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi>

* chore: init

* Add vault docs links and yvUSD API row to More Info (#1111)

* add link to API

* add docs link to more info

* chore(deps): bump the minor-updates group across 1 directory with 7 updates (#1132)

Bumps the minor-updates group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.90.21` | `5.95.0` |
| [framer-motion](https://github.com/motiondivision/motion) | `12.34.0` | `12.38.0` |
| [graphql](https://github.com/graphql/graphql-js) | `16.12.0` | `16.13.1` |
| [viem](https://github.com/wevm/viem) | `2.46.1` | `2.47.6` |
| [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.1.18` | `4.2.2` |
| [lint-staged](https://github.com/lint-staged/lint-staged) | `16.2.7` | `16.4.0` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.1.18` | `4.2.2` |



Updates `@tanstack/react-query` from 5.90.21 to 5.95.0
- [Release notes](https://github.com/TanStack/query/releases)
- [Changelog](https://github.com/TanStack/query/blob/main/packages/react-query/CHANGELOG.md)
- [Commits](https://github.com/TanStack/query/commits/@tanstack/react-query@5.95.0/packages/react-query)

Updates `framer-motion` from 12.34.0 to 12.38.0
- [Changelog](https://github.com/motiondivision/motion/blob/main/CHANGELOG.md)
- [Commits](motiondivision/motion@v12.34.0...v12.38.0)

Updates `graphql` from 16.12.0 to 16.13.1
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](graphql/graphql-js@v16.12.0...v16.13.1)

Updates `viem` from 2.46.1 to 2.47.6
- [Release notes](https://github.com/wevm/viem/releases)
- [Commits](https://github.com/wevm/viem/compare/viem@2.46.1...viem@2.47.6)

Updates `@tailwindcss/postcss` from 4.1.18 to 4.2.2
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.2/packages/@tailwindcss-postcss)

Updates `lint-staged` from 16.2.7 to 16.4.0
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v16.2.7...v16.4.0)

Updates `tailwindcss` from 4.1.18 to 4.2.2
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.2/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: "@tanstack/react-query"
  dependency-version: 5.95.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: framer-motion
  dependency-version: 12.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: graphql
  dependency-version: 16.13.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: viem
  dependency-version: 2.47.6
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.2.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: lint-staged
  dependency-version: 16.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: tailwindcss
  dependency-version: 4.2.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/node from 20.19.10 to 25.3.0 (#1081)

* chore(deps-dev): bump @types/node from 20.19.10 to 25.3.0

* chore(deps-dev): update bun.lock for @types/node bump

---------

Co-authored-by: Ross <therossgalloway@gmail.com>

* feat: partial dedupe in deposit/withdraw (#1121)

* chore: fix font fallbacks to prevent horrible font rendering on some computers (#1141)

* chore: update tenderly scripts (#1145)

* chore: rebase merge (#1152)

* Update deposit success v2 (#1155)

* Start wallet balance refresh before deposit success screen shows

The balance refresh (refreshWalletBalances + refetchVaultUserData) now
fires via onStepSuccess when the deposit tx is confirmed on-chain, before
the success screen and confetti appear.

Previously, with deferSuccessEffectsUntilConfettiEnd=true (the default),
onAllComplete fired only after the confetti animation ended (~2-3s after
the tx confirmed). The async RPC balance fetch therefore started late,
and the resulting re-renders hit the user just as they were interacting
with the UI after dismissing the overlay.

With this change, the RPC fetch starts at tx confirmation. By the time
confetti ends and the user dismisses the overlay, the balances are
already updated or the re-renders are well underway in the background.

Cross-chain deposits are handled separately in onAllComplete (as before)
since the TransactionOverlay does not emit onStepSuccess for the
cross-chain path — the source-chain tokens change immediately, so a
refresh there is still appropriate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* confetti after fetch

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: remove font fallback debug route (#1156)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>
Co-authored-by: murderteeth <89237203+murderteeth@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: juniordevbot[bot] <170848020+juniordevbot[bot]@users.noreply.github.com>
Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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