diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png index 0dbe6cff8..38ec02220 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-chromium-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-chromium-linux.png index 0dbe6cff8..38ec02220 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-chromium-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-leading-line-breaks-in-dark-mode-1-chromium-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png index f8f2d0481..23e89f85a 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-Mobile-Chrome-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-chromium-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-chromium-linux.png index f8f2d0481..23e89f85a 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-chromium-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-Exports-geo-text-with-trailing-line-breaks-in-dark-mode-1-chromium-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png index 5c29132d2..e6a1aef5a 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-chromium-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-chromium-linux.png index 5c29132d2..e6a1aef5a 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-chromium-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-arrow-font-draw-in-dark-mode-1-chromium-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png index 75543da84..c67e2db5b 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-chromium-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-chromium-linux.png index 75543da84..c67e2db5b 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-chromium-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-geo-font-draw-in-dark-mode-1-chromium-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png index 6d8a8fbc0..e6cc8756f 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-Mobile-Chrome-linux.png differ diff --git a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-chromium-linux.png b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-chromium-linux.png index 6d8a8fbc0..e6cc8756f 100644 Binary files a/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-chromium-linux.png and b/apps/examples/e2e/tests/export-snapshots.spec.ts-snapshots/Export-snapshots-Exports-with-text-font-draw-in-dark-mode-1-chromium-linux.png differ diff --git a/apps/examples/e2e/tests/test-text.spec.ts b/apps/examples/e2e/tests/test-text.spec.ts index 82c4e73d8..1b19449f4 100644 --- a/apps/examples/e2e/tests/test-text.spec.ts +++ b/apps/examples/e2e/tests/test-text.spec.ts @@ -67,7 +67,7 @@ test.describe('text measurement', () => { measureTextOptions ) - expect(w).toBeCloseTo(85.828125, 0) + expect(w).toBeCloseTo(87, 0) expect(h).toBeCloseTo(32.3984375, 0) }) @@ -104,7 +104,7 @@ test.describe('text measurement', () => { measureTextSpansOptions ) - expect(formatLines(spans)).toEqual([['test'], ['ing']]) + expect(formatLines(spans)).toEqual([['tes'], ['ting']]) }) test('should preserve whitespace at line breaks', async () => { @@ -202,11 +202,11 @@ test.describe('text measurement', () => { expect(formatLines(spans)).toEqual([ ['testingt'], - ['estingte'], - ['stingtes'], - ['tingtest'], - ['ingtesti'], - ['ng'], + ['estingt'], + ['estingt'], + ['estingt'], + ['estingt'], + ['esting'], ]) }) diff --git a/assets/fonts/Shantell_Sans-Normal-SemiBold.woff2 b/assets/fonts/Shantell_Sans-Normal-SemiBold.woff2 deleted file mode 100644 index b2f3c4793..000000000 Binary files a/assets/fonts/Shantell_Sans-Normal-SemiBold.woff2 and /dev/null differ diff --git a/assets/fonts/Shantell_Sans-Tldrawish.woff2 b/assets/fonts/Shantell_Sans-Tldrawish.woff2 new file mode 100644 index 000000000..7a50fc98d Binary files /dev/null and b/assets/fonts/Shantell_Sans-Tldrawish.woff2 differ diff --git a/packages/assets/imports.js b/packages/assets/imports.js index b01ea379b..f295efd85 100644 --- a/packages/assets/imports.js +++ b/packages/assets/imports.js @@ -25,7 +25,7 @@ import embedIconsYoutube from './embed-icons/youtube.png' import fontsMonospace from './fonts/IBMPlexMono-Medium.woff2' import fontsSansSerif from './fonts/IBMPlexSans-Medium.woff2' import fontsSerif from './fonts/IBMPlexSerif-Medium.woff2' -import fontsDraw from './fonts/Shantell_Sans-Normal-SemiBold.woff2' +import fontsDraw from './fonts/Shantell_Sans-Tldrawish.woff2' import iconsAlignBottomCenter from './icons/icon/align-bottom-center.svg' import iconsAlignBottomLeft from './icons/icon/align-bottom-left.svg' import iconsAlignBottomRight from './icons/icon/align-bottom-right.svg' diff --git a/packages/assets/selfHosted.js b/packages/assets/selfHosted.js index 2d4710cb9..e5bd52ef6 100644 --- a/packages/assets/selfHosted.js +++ b/packages/assets/selfHosted.js @@ -15,7 +15,7 @@ export function getAssetUrls(opts) { monospace: formatAssetUrl('./fonts/IBMPlexMono-Medium.woff2', opts), sansSerif: formatAssetUrl('./fonts/IBMPlexSans-Medium.woff2', opts), serif: formatAssetUrl('./fonts/IBMPlexSerif-Medium.woff2', opts), - draw: formatAssetUrl('./fonts/Shantell_Sans-Normal-SemiBold.woff2', opts), + draw: formatAssetUrl('./fonts/Shantell_Sans-Tldrawish.woff2', opts), }, icons: { 'align-bottom-center': formatAssetUrl('./icons/icon/align-bottom-center.svg', opts), diff --git a/packages/assets/urls.js b/packages/assets/urls.js index 3b2b35bb7..1c0ff9529 100644 --- a/packages/assets/urls.js +++ b/packages/assets/urls.js @@ -25,7 +25,7 @@ export function getAssetUrlsByMetaUrl(opts) { opts ), draw: formatAssetUrl( - new URL('./fonts/Shantell_Sans-Normal-SemiBold.woff2', import.meta.url).href, + new URL('./fonts/Shantell_Sans-Tldrawish.woff2', import.meta.url).href, opts ), }, diff --git a/packages/tldraw/src/lib/utils/static-assets/assetUrls.ts b/packages/tldraw/src/lib/utils/static-assets/assetUrls.ts index bf6d4c35a..e45582aa5 100644 --- a/packages/tldraw/src/lib/utils/static-assets/assetUrls.ts +++ b/packages/tldraw/src/lib/utils/static-assets/assetUrls.ts @@ -15,7 +15,7 @@ export type TLEditorAssetUrls = { /** @public */ export let defaultEditorAssetUrls: TLEditorAssetUrls = { fonts: { - draw: `https://unpkg.com/@tldraw/assets@${version}/fonts/Shantell_Sans-Normal-SemiBold.woff2`, + draw: `https://unpkg.com/@tldraw/assets@${version}/fonts/Shantell_Sans-Tldrawish.woff2`, serif: `https://unpkg.com/@tldraw/assets@${version}/fonts/IBMPlexSerif-Medium.woff2`, sansSerif: `https://unpkg.com/@tldraw/assets@${version}/fonts/IBMPlexSans-Medium.woff2`, monospace: `https://unpkg.com/@tldraw/assets@${version}/fonts/IBMPlexMono-Medium.woff2`, diff --git a/scripts/refresh-assets.ts b/scripts/refresh-assets.ts index c30a576ac..7323069db 100644 --- a/scripts/refresh-assets.ts +++ b/scripts/refresh-assets.ts @@ -18,7 +18,7 @@ const FONT_MAPPING: Record = { 'IBMPlexMono-Medium': 'monospace', 'IBMPlexSerif-Medium': 'serif', 'IBMPlexSans-Medium': 'sansSerif', - 'Shantell_Sans-Normal-SemiBold': 'draw', + 'Shantell_Sans-Tldrawish': 'draw', } const ASSETS_FOLDER_PATH = join(BUBLIC_ROOT, 'assets')