Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Comic Shanns issues, new fonts structure #8641

Merged
merged 4 commits into from
Oct 20, 2024

Conversation

Mrazator
Copy link
Member

@Mrazator Mrazator commented Oct 14, 2024

Fixes #8327

Adopted https://github.com/jesusmgg/comic-shanns-mono with few modifications:

Also done:

  • unified prod font paths across excalidraw-app, OSS package (host apps, examples, E+), and CDN into fonts/[FontFamilyName]/[FontFamilyName]-*.woff2
    • grouping into subfolders per font family ✅
    • unification of EXCALIDRAW_ASSET_PATH for OSS and E+ ✅ (instead of one relying on "/" while the other on "/fonts/")
    • unified and organized excalidraw-app/build & excalidraw/dist/prod/ into fonts/ folder ✅ (instead of having all on root)
      Screenshot 2024-10-15 at 23 30 11
    • host apps can just copy the whole "fonts" folder instead of all the woff2 files ✅
  • split all non-deprecated fonts into multiple chunks (atm only Excalifont and Comic Shanns left) and related:
    • stopped adding vite -[hash] suffix to fonts on excalidraw-app build (we have hashes thanks to the split)
    • optimized fetch during export to force cache
  • stopped preloading Virgil, as at this point it's unnecessary for new scenes, while old scenes will mostly get it from the cache or just fetch it on init if needed

Fixes:

Todo:

  • Update new font structure to the DO @dwelle

Sorry, something went wrong.

Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Oct 20, 2024 7:30pm
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Oct 20, 2024 7:30pm
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Oct 20, 2024 7:30pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Oct 20, 2024 7:30pm

Copy link

github-actions bot commented Oct 14, 2024

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 67.35% (🎯 60%) 65224 / 96840
🟢 Statements 67.35% (🎯 60%) 65224 / 96840
🟢 Functions 63.93% (🎯 63%) 1899 / 2970
🟢 Branches 80.01% (🎯 70%) 7779 / 9722
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/excalidraw/index.tsx 81.22% 89.47% 80% 81.22% 94-98, 155-204
packages/excalidraw/workers.ts 6.53% 0% 0% 6.53% 4-15, 23-153
packages/excalidraw/components/App.tsx 70.82% 77.57% 71.13% 70.82% 490-491, 602-611, 711-712, 730-731, 752-812, 815-821, 834-837, 840-916, 919-938, 941-946, 954-964, 966-967, 972-973, 977-979, 993, 1000-1262, 1322-1323, 1355-1357, 1364-1409, 1435, 1445, 1452-1455, 1464-1468, 1499-1500, 1578-1588, 1593-1608, 1612-1659, 1755-1760, 1789-1794, 1797-1827, 1835-1860, 1873-1964, 1967-1975, 1978-2037, 2040-2081, 2084-2089, 2126-2127, 2150-2151, 2183-2184, 2188-2189, 2209-2217, 2222-2235, 2241-2242, 2246, 2251-2259, 2261-2269, 2281, 2326-2327, 2349-2350, 2357, 2378-2380, 2440-2442, 2445-2450, 2455-2456, 2496-2504, 2509-2518, 2556-2557, 2649-2650, 2654, 2657-2658, 2666-2669, 2678-2691, 2697-2700, 2703, 2705-2706, 2713-2714, 2720-2721, 2724-2725, 2733-2734, 2737-2738, 2749-2757, 2762-2763, 2814-2815, 2829-2835, 2841-2849, 2853-2861, 2865-2866, 2869-2902, 2905-2917, 2928-2929, 2940-2941, 2958-2962, 2966-2969, 2976-2978, 2996-3003, 3006, 3008-3013, 3017-3019, 3065-3066, 3073-3075, 3077-3100, 3117-3149, 3164, 3170, 3226-3227, 3244-3246, 3268-3269, 3275-3279, 3285-3366, 3420, 3424, 3459-3460, 3519, 3529-3547, 3550-3556, 3559-3560, 3566-3582, 3695-3696, 3719-3733, 3738-3749, 3801-3802, 3874-3884, 3920, 4047-4048, 4050-4057, 4091-4095, 4097-4098, 4100-4103, 4128-4129, 4151-4161, 4171-4173, 4175, 4256-4259, 4281-4289, 4293-4295, 4305-4306, 4308-4328, 4335-4358, 4361-4367, 4384-4387, 4399-4406, 4502-4506, 4510, 4515-4516, 4521-4525, 4558-4559, 4562-4563, 4575-4579, 4584-4585, 4591-4601, 4606-4633, 4638-4649, 4749-4750, 4834, 4859, 4885-4887, 4954-4955, 4973-4974, 5149-5150, 5153-5154, 5162-5163, 5213-5217, 5271-5278, 5284-5354, 5398, 5455, 5482, 5489-5490, 5503-5506, 5537, 5590-5593, 5596-5600, 5602-5609, 5626-5635, 5638-5639, 5769-5770, 5773, 5775-5780, 5786-5788, 5790, 5799, 5821-5826, 5828-5831, 5835-5836, 5846-5942, 5946-5947, 5962-5963, 5999-6005, 6032-6033, 6045-6046, 6074, 6076-6103, 6110-6111, 6133-6134, 6153, 6155-6198, 6203-6204, 6206-6207, 6223-6224, 6230-6231, 6235-6238, 6241-6242, 6256-6282, 6290-6291, 6295-6298, 6300-6304, 6322-6326, 6373-6378, 6380-6382, 6398, 6400-6413, 6438-6441, 6496, 6513-6514, 6516-6539, 6554-6555, 6669-6697, 6803-6804, 6824-6825, 6919, 6925-6926, 6949-6968, 6983, 7131-7169, 7173-7223, 7238, 7247, 7281-7287, 7314-7316, 7482-7485, 7507-7537, 7550, 7552-7560, 7574, 7576-7584, 7591-7594, 7602-7607, 7634-7635, 7640-7642, 7645-7646, 7669-7670, 7701-7702, 7785-7786, 7833-7846, 7923-7926, 7952-7953, 8009, 8032-8038, 8049-8068, 8096-8102, 8134, 8176, 8182, 8197-8204, 8207-8214, 8264, 8342-8343, 8364-8366, 8369, 8383-8407, 8516-8529, 8552-8576, 8585-8624, 8637-8638, 8647-8654, 8672-8679, 8733-8757, 8759-8760, 8834-8835, 8842, 8844-8880, 8909, 8968, 9002-9004, 9029-9034, 9036-9037, 9042-9044, 9047-9067, 9081-9082, 9088-9097, 9102, 9106-9110, 9119-9123, 9126-9131, 9135-9142, 9172, 9174-9178, 9180-9190, 9206-9208, 9219-9227, 9231-9275, 9278-9349, 9357, 9375-9382, 9384-9400, 9415-9437, 9456-9458, 9504-9505, 9616-9620, 9622-9638, 9640-9644, 9656-9657, 9667-9683, 9702-9721, 9723-9724, 9751-9752, 9756-9757, 9767, 9769-9772, 9774-9775, 9815, 9856-9857, 9867, 9909, 9927-9935, 9956-9957, 9989-9992, 10085-10092, 10118-10119, 10162-10233, 10281-10282, 10291-10294, 10299-10300, 10321-10323, 10325-10329, 10367
packages/excalidraw/fonts/ExcalidrawFontFace.ts 69.85% 58.62% 90% 69.85% 13, 40-41, 74-86, 91-112, 125-126, 135-137, 145-147, 160-164, 174-176, 182-183, 187-188, 198-202
packages/excalidraw/fonts/Fonts.ts 82.8% 84.21% 83.33% 82.8% 55-61, 67-68, 91-98, 103-125, 142-144, 182-195, 298-299, 325
packages/excalidraw/fonts/index.ts 100% 100% 100% 100%
packages/excalidraw/fonts/ComicShanns/index.ts 100% 100% 100% 100%
packages/excalidraw/fonts/Emoji/index.ts 100% 100% 100% 100%
packages/excalidraw/fonts/Excalifont/index.ts 100% 100% 100% 100%
packages/excalidraw/fonts/Helvetica/index.ts 100% 100% 100% 100%
packages/excalidraw/scene/export.ts 88.12% 82.89% 84.61% 88.12% 60-85, 108, 157-158, 182-186, 331-332, 422-426, 447-456, 525-530, 533-535, 544-545, 553-557
scripts/buildPackage.js 0% 0% 0% 0% 1-162
scripts/woff2/woff2-vite-plugins.js 0% 0% 0% 0% 1-105
Generated in workflow #3641 for commit e5d62cc by the Vitest Coverage Report Action

@Mrazator Mrazator force-pushed the mrazator/fonts-split-comic-shanns-fixes branch from 1c021f0 to 8b8e73e Compare October 14, 2024 18:19
@Mrazator Mrazator force-pushed the mrazator/fonts-split-comic-shanns-fixes branch from 8b8e73e to edbe689 Compare October 14, 2024 18:35
@Mrazator Mrazator changed the title feat: Introduce Comic Shanns 3, split fonts feat: Fix Comic Shanns issues, split fonts Oct 14, 2024
@Mrazator Mrazator changed the base branch from master to mrazator/first-class-support-chinese October 14, 2024 18:37
@Mrazator Mrazator changed the title feat: Fix Comic Shanns issues, split fonts fix: Comic Shanns issues Oct 14, 2024
@Mrazator Mrazator force-pushed the mrazator/fonts-split-comic-shanns-fixes branch from d429207 to c1c5900 Compare October 14, 2024 19:24
@dwelle
Copy link
Member

dwelle commented Oct 20, 2024

Thanks, we're good to go!

@dwelle dwelle merged commit 61623bb into master Oct 20, 2024
10 checks passed
@dwelle dwelle deleted the mrazator/fonts-split-comic-shanns-fixes branch October 20, 2024 22:11
Copy link

sentry-io bot commented Oct 23, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Function.from(<anonymous>) View Issue

Did you find this useful? React with a 👍 or 👎

Jauhen pushed a commit to Jauhen/excalidraw that referenced this pull request Nov 12, 2024
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.

Comic Shanns related issues
2 participants