Skip to content

Commit 7f40e8e

Browse files
committed
TEMPORARY, DO NOT MERGE: measure each PR of the font stack refactor
1 parent d50ad8b commit 7f40e8e

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎.github/tmp-font-probe/probe.mjs‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ const [label, browserList, locale = 'en-US'] = process.argv.slice(2);
88

99
const EMOJI = `'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'`;
1010
const MONO = `SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace`;
11-
const BEFORE_BASE = `system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, ${EMOJI}`;
12-
const BEFORE_MONO = MONO;
13-
const AFTER_BASE = `system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, ${EMOJI}`;
14-
const AFTER_MONO = MONO;
11+
const PR3 = `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Ubuntu Sans', Ubuntu, 'Adwaita Sans', Cantarell, 'Noto Sans', sans-serif, ${EMOJI}`;
12+
const PR5 = `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Ubuntu Sans', Ubuntu, 'Adwaita Sans', Cantarell, 'Noto Sans', Roboto, sans-serif, ${EMOJI}`;
1513

1614
const css = (base, mono) =>
1715
`:root { --ifm-font-family-base: ${base} !important; --ifm-font-family-monospace: ${mono} !important; }`;
16+
// Each PR of the stack adds one change to the previous one
1817
const VARIANTS = {
19-
before: css(BEFORE_BASE, BEFORE_MONO),
20-
after: css(AFTER_BASE, AFTER_MONO),
18+
pr3: css(PR3, MONO),
19+
pr4: css(PR3, `ui-monospace, ${MONO}`),
20+
pr5: css(PR5, `ui-monospace, ${MONO}`),
21+
pr6: css(`${PR5}, 'Noto Color Emoji'`, `ui-monospace, ${MONO}`),
2122
};
2223

2324
const PAGES = [

‎.github/workflows/tmp-font-screenshots.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TEMPORARY, DO NOT MERGE: screenshots of the font stacks of main without the fonts after sans-serif
1+
# TEMPORARY, DO NOT MERGE: screenshots of the font stacks of each PR of the font stack refactor
22
name: TMP font screenshots
33

44
on:

0 commit comments

Comments
 (0)