Promote Eve persona and typography state

This commit is contained in:
Meta Vens 2026-06-16 18:00:56 +01:00
commit 83dee183f7
13 changed files with 113 additions and 35 deletions

View file

@ -35,7 +35,7 @@
"node-bound command taps"
],
"losesUntilRendererParity": [
"Press Start 2P and VT323 font selection",
"GUI display/body font selection plus TUI Latin/kana raster font scale selection",
"Repixelizer shell frame, scanlines, pixel grid, corner accents, and chunky border widths",
"landing/app image assets; current Android lowerer prints asset refs when images are not explicitly implemented",
"upload picker, comparison canvas, pan/zoom inspection, eyedropper, and paint controls",
@ -43,7 +43,7 @@
],
"minimumParityCuts": [
"map surface.styles.tokens before toneColor/textColorFor/textSizeFor",
"add packaged pixel fonts or font download cache",
"add packaged GUI fonts plus TUI raster atlas cache",
"render image assetUri/assetRef as ImageView with pixelated sampling",
"lower command controls to Android upload/document picker and job route calls"
],
@ -1200,14 +1200,14 @@
"styles": {
"assets": {
"appUrl": "https://repixelizer.gamecult.org/app/",
"fontCss": "https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap",
"fontCss": "https://fonts.googleapis.com/css2?family=M+PLUS+1:wght@300;400;500;700&family=Montserrat:wght@100;300;400;500;700&family=Ubuntu+Sans:wght@300;400;500;700&family=Zen+Kaku+Gothic+New:wght@300;400;500;700&display=swap",
"landingInput": "https://repixelizer.gamecult.org/app/landing-assets/character-input.png",
"landingOutput": "https://repixelizer.gamecult.org/app/landing-assets/character-repixelized.png"
},
"loweringHints": {
"android-native": "Load packaged or downloadable Press Start 2P and VT323 fonts, map style tokens before hard-coded tones, and render asset images instead of asset labels.",
"android-native": "Load packaged or downloadable Montserrat, Zen Kaku Gothic New, M PLUS 1, and Ubuntu Sans fonts, map style tokens before hard-coded tones, and render asset images instead of asset labels.",
"css": "Use the tokens as CSS custom properties and retain scanline/pixel-grid overlays.",
"tui": "Preserve title/body font distinction as role metadata; canvas editing lowers to artifact refs and command intents only."
"tui": "Use fixed-cell raster atlases for tuiPixelDisplay/body/small; each advertised size must support Latin, hiragana, and katakana in the same cell grid."
},
"profile": "repixelizer.retro.pixel",
"tokens": {
@ -1233,17 +1233,21 @@
"colorTextBright": "#f7efd8",
"cornerAccentPx": 12,
"dashedInnerFrame": true,
"fontBody": "\"VT323\", \"Courier New\", monospace",
"fontMono": "\"VT323\", \"Courier New\", monospace",
"fontTitle": "\"Press Start 2P\", \"VT323\", monospace",
"fontBody": "\"M PLUS 1\", \"Ubuntu Sans\", Ubuntu, sans-serif",
"fontDisplay": "\"Montserrat\", \"Zen Kaku Gothic New\", \"M PLUS 1\", sans-serif",
"fontMono": "\"Ubuntu Sans Mono\", \"M PLUS 1 Code\", \"Cascadia Mono\", monospace",
"fontTitle": "\"Montserrat\", \"Zen Kaku Gothic New\", \"M PLUS 1\", sans-serif",
"imageRendering": "pixelated",
"scanlineOverlay": true
"scanlineOverlay": true,
"tuiPixelBody": "fixed-cell-raster-latin-kana-12",
"tuiPixelDisplay": "fixed-cell-raster-latin-kana-16",
"tuiPixelSmall": "fixed-cell-raster-latin-kana-10"
}
},
"title": "Repixelizer"
},
"title": "Repixelizer",
"type": "surface-state",
"updatedAt": "2026-06-05T00:00:00Z",
"updatedAt": "2026-06-04T00:00:00Z",
"version": 1
}

View file

@ -1,3 +1,5 @@
@import url("https://fonts.googleapis.com/css2?family=M+PLUS+1:wght@100;300;400;500;700&family=Montserrat:wght@100;300;400;500;700&family=Ubuntu+Sans:wght@300;400;500;700&family=Zen+Kaku+Gothic+New:wght@300;400;500;700&display=swap");
:root {
color-scheme: dark;
--bg: #020909;
@ -23,7 +25,9 @@
--border-width: 1px;
--border-bottom-width: var(--border-width);
--corner-accent-size: 0;
--font-mono: "Cascadia Mono", Consolas, monospace;
--font-body: "M PLUS 1", "Ubuntu Sans", Ubuntu, "Noto Sans JP", system-ui, sans-serif;
--font-title: "Montserrat", "Zen Kaku Gothic New", "M PLUS 1", "Ubuntu Sans", system-ui, sans-serif;
--font-mono: "Ubuntu Sans Mono", "M PLUS 1 Code", "Cascadia Mono", Consolas, monospace;
}
* {
@ -35,7 +39,7 @@ body {
min-height: 100vh;
background: linear-gradient(180deg, var(--bg-top), var(--bg-mid), var(--bg-bottom));
color: var(--text);
font-family: var(--font-body, Inter), "Segoe UI", system-ui, sans-serif;
font-family: var(--font-body);
}
.topbar {
@ -432,7 +436,7 @@ body[data-pixel-art="true"] .cultui-background {
.cultui-title {
color: var(--accent);
font: 700 16px "Cascadia Mono", Consolas, monospace;
font: 100 18px var(--font-title);
line-height: 1.35;
}

View file

@ -11,6 +11,7 @@ let socket;
let providers = [];
let currentProvider;
let currentSurfaceStyles = {};
let activeFontStylesheet;
const defaultStyleTokens = {
"--bg": "#020909",
@ -35,9 +36,9 @@ const defaultStyleTokens = {
"--border-width": "1px",
"--border-bottom-width": "1px",
"--corner-accent-size": "0",
"--font-body": "Inter, Segoe UI, system-ui, sans-serif",
"--font-title": "Cascadia Mono, Consolas, monospace",
"--font-mono": "Cascadia Mono, Consolas, monospace",
"--font-body": "\"M PLUS 1\", \"Ubuntu Sans\", Ubuntu, \"Noto Sans JP\", system-ui, sans-serif",
"--font-title": "\"Montserrat\", \"Zen Kaku Gothic New\", \"M PLUS 1\", \"Ubuntu Sans\", system-ui, sans-serif",
"--font-mono": "\"Ubuntu Sans Mono\", \"M PLUS 1 Code\", \"Cascadia Mono\", Consolas, monospace",
};
const localProviders = [
@ -212,6 +213,7 @@ function renderSurface(state, source) {
function applySurfaceStyles(styles) {
const tokens = styles?.tokens || {};
const root = document.documentElement.style;
loadFontStylesheet(styles?.assets?.fontCss);
for (const [variable, value] of Object.entries(defaultStyleTokens)) {
root.setProperty(variable, value);
}
@ -239,9 +241,10 @@ function applySurfaceStyles(styles) {
for (const [token, variable] of Object.entries(map)) {
if (tokens[token]) root.setProperty(variable, tokens[token]);
}
if (tokens.fontBody) root.setProperty("--font-body", tokens.fontBody);
if (tokens.fontTitle) root.setProperty("--font-title", tokens.fontTitle);
if (tokens.fontMono) root.setProperty("--font-mono", tokens.fontMono);
if (tokens.fontBody) root.setProperty("--font-body", withJapaneseGuiFallback(tokens.fontBody));
if (tokens.fontDisplay) root.setProperty("--font-title", withJapaneseGuiFallback(tokens.fontDisplay));
if (tokens.fontTitle) root.setProperty("--font-title", withJapaneseGuiFallback(tokens.fontTitle));
if (tokens.fontMono) root.setProperty("--font-mono", withJapaneseGuiFallback(tokens.fontMono));
if (tokens.borderWidthPx) root.setProperty("--border-width", `${tokens.borderWidthPx}px`);
if (tokens.borderBottomWidthPx) root.setProperty("--border-bottom-width", `${tokens.borderBottomWidthPx}px`);
if (tokens.cornerAccentPx) root.setProperty("--corner-accent-size", `${tokens.cornerAccentPx}px`);
@ -249,6 +252,31 @@ function applySurfaceStyles(styles) {
document.body.dataset.scanlines = tokens.scanlineOverlay ? "true" : "false";
}
function loadFontStylesheet(href) {
const normalized = typeof href === "string" ? href.trim() : "";
if (activeFontStylesheet?.dataset.href === normalized) return;
activeFontStylesheet?.remove();
activeFontStylesheet = undefined;
if (!normalized) return;
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = normalized;
link.dataset.href = normalized;
document.head.append(link);
activeFontStylesheet = link;
}
function withJapaneseGuiFallback(stack) {
if (typeof stack !== "string" || stack.includes("Zen Kaku Gothic New") || stack.includes("M PLUS 1")) return stack;
if (stack.includes("Montserrat")) {
return `${stack}, "Zen Kaku Gothic New", "M PLUS 1", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif`;
}
if (stack.includes("Ubuntu")) {
return `${stack}, "M PLUS 1", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif`;
}
return `${stack}, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif`;
}
function renderCultComponent(node) {
const kind = node.kind || "panel";
const props = node.props || {};