The editor ships its own font, Source Sans 3 and Code Pro (#202)
Theme named Inter and JetBrains Mono, but neither was ever shipped, so every machine drew the editor in whatever it had installed. The e2e runs measured text in a different face than the user saw. - Five Latin woff2 faces live in src/ui/fonts/ next to their OFL licences: Source Sans 3 400/500/600/700 and Source Code Pro 400. - fonts.ts loads them through FontFace, and main.ts waits for them before the first widget exists, so Pixi measures the real face. - A face that fails to load is reported in the console and the system fallback in Theme takes over. - Theme is retuned by hand: 12 px body, 22 px rows, smaller gaps and padding, radius 8, and weight 500 for bold and headings. - The scene background default follows Theme.colors.graphBackground. This makes core import from ui for the first time. Findings: - The 500 file is in the folder but fonts.ts does not register it yet, so weight 500 currently falls back to the 400 face. Tests: - ./check.sh: 141 files, 2080 tests, exit 0. - e2e not run. Checks that measure widths or row positions are expected to need updating for the new metrics. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
28b1afa7af
commit
940a78e8ee
12 files changed
+231
-13
No files matched your search
@@ -64,6 +64,7 @@ import {
|
||||
} from './particles';
|
||||
import { SHADER_KEY, shaderOf, shaderParamDefs } from './shaders';
|
||||
import { LOOP_KEY as SOUND_LOOP_KEY, VOLUME_KEY as SOUND_VOLUME_KEY } from './sounds';
|
||||
import { Theme } from '../../ui';
|
||||
|
||||
/**
|
||||
* What a kind's definition carries beyond key, label and default. `decimals` belongs only on
|
||||
@@ -250,7 +251,7 @@ export function isValidVariableName(name: string): boolean {
|
||||
/** Position is deliberately absent: it belongs to scene objects, not to asset types. */
|
||||
const ASSET_SCHEMAS: Record<AssetType, PropertySchema> = {
|
||||
scene: [
|
||||
{ key: 'backgroundColor', label: 'Background', kind: 'color', default: 0x2a2d34 },
|
||||
{ key: 'backgroundColor', label: 'Background', kind: 'color', default: Theme.colors.graphBackground },
|
||||
// Pulls on every dynamic rigidbody, in world units per second squared: 980 is Earth at 100 px = 1 m.
|
||||
{ key: 'gravityX', label: 'Gravity X', kind: 'number', default: 0, step: 10 },
|
||||
{ key: 'gravityY', label: 'Gravity Y', kind: 'number', default: 980, step: 10 },
|
||||
|
||||
Reference in new issue
Block a user