From 2a3ad26eb9c9ffa53d9242b62e651350c1c45b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 2 Apr 2026 11:42:19 +0400 Subject: [PATCH] Prevent OL from loading webfonts for our default font * Fixes flash of bold text on app launch * Fixes Noto Sans being used instead of system font where not available --- app/components/map.gjs | 4 +++- app/components/user-menu.gjs | 4 ++-- app/styles/app.css | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/components/map.gjs b/app/components/map.gjs index 2ec439a..370761a 100644 --- a/app/components/map.gjs +++ b/app/components/map.gjs @@ -284,7 +284,9 @@ export default class MapComponent extends Component { const initialCenter = toLonLat(view.getCenter()); this.mapUi.updateCenter(initialCenter[1], initialCenter[0]); - apply(this.mapInstance, 'https://tiles.openfreemap.org/styles/liberty'); + apply(this.mapInstance, 'https://tiles.openfreemap.org/styles/liberty', { + webfonts: 'data:text/css,', + }); this.searchOverlayElement = document.createElement('div'); this.searchOverlayElement.className = 'search-pulse'; diff --git a/app/components/user-menu.gjs b/app/components/user-menu.gjs index 7abacd9..9b44a00 100644 --- a/app/components/user-menu.gjs +++ b/app/components/user-menu.gjs @@ -55,7 +55,7 @@ export default class UserMenuComponent extends Component {
{{#if @storage.connected}} - {{@storage.userAddress}} + {{@storage.userAddress}} {{else}} Not connected {{/if}} @@ -84,7 +84,7 @@ export default class UserMenuComponent extends Component {
{{#if this.osmAuth.isConnected}} - {{this.osmAuth.userDisplayName}} + {{this.osmAuth.userDisplayName}} {{else}} Not connected {{/if}} diff --git a/app/styles/app.css b/app/styles/app.css index cde9263..79abc7a 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -14,6 +14,8 @@ html, body { height: 100%; overscroll-behavior: none; /* Prevent pull-to-refresh on mobile */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; } @@ -26,6 +28,7 @@ body { margin: 0; font-family: 'Noto Sans', sans-serif; font-size: 16px; + font-weight: normal; color: #333; } @@ -246,7 +249,6 @@ body { .account-status { font-size: 0.85rem; - font-weight: bold; color: #898989; margin-top: 0.35rem; margin-left: calc(18px + 0.75rem);