mirror of
https://github.com/hanzoai/brand.git
synced 2026-10-23 03:05:28 +00:00
Stop naming Inter in the brand package
Three surfaces still asked for a face this brand does not own. `loadFonts` injected a Google Fonts stylesheet for Inter at runtime — a third-party fetch for a family nothing here declares, and dead in the estate besides; @hanzo/font is where a face comes from. The showcase page labelled its own type specimens "Inter Bold" and "Inter Regular", and the hero card led its stack with Inter. The comments in typography.ts narrated the old defect instead of describing the code.
This commit is contained in:
+4
-4
@@ -1,9 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640" viewBox="0 0 1280 640" role="img" aria-label="brand">
|
||||
<rect width="1280" height="640" fill="#0A0A0A"/>
|
||||
<svg x="96" y="215" width="210" height="210" viewBox="0 0 67 67"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#fff"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#fff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#fff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#fff"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#fff"/></svg>
|
||||
<text x="378" y="276" font-family="Inter,system-ui,-apple-system,sans-serif" font-size="78" font-weight="800" letter-spacing="-2" fill="#ffffff">brand</text>
|
||||
<text x="378" y="322" font-family="Inter,system-ui,sans-serif" font-size="30" fill="#ffffff" opacity=".66">Official brand assets and design system for Hanzo AI</text>
|
||||
<text x="378" y="276" font-family="Zen,system-ui,-apple-system,sans-serif" font-size="78" font-weight="800" letter-spacing="-2" fill="#ffffff">brand</text>
|
||||
<text x="378" y="322" font-family="Zen,system-ui,sans-serif" font-size="30" fill="#ffffff" opacity=".66">Official brand assets and design system for Hanzo AI</text>
|
||||
<rect x="378" y="338" width="806" height="3" rx="1.5" fill="#ffffff" opacity=".9"/>
|
||||
<text x="378" y="390" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">github.com/hanzoai</text>
|
||||
<text x="1184" y="390" text-anchor="end" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">hanzo.ai</text>
|
||||
<text x="378" y="390" font-family="Zen,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">github.com/hanzoai</text>
|
||||
<text x="1184" y="390" text-anchor="end" font-family="Zen,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">hanzo.ai</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
+2
-2
@@ -135,11 +135,11 @@
|
||||
<section>
|
||||
<h2>Typography</h2>
|
||||
<div class="type-sample">
|
||||
<h3 style="font-weight: 700;">Inter Bold</h3>
|
||||
<h3 style="font-weight: 700;">Zen Bold</h3>
|
||||
<p>Used for headings and emphasis</p>
|
||||
</div>
|
||||
<div class="type-sample">
|
||||
<h3 style="font-weight: 400;">Inter Regular</h3>
|
||||
<h3 style="font-weight: 400;">Zen Regular</h3>
|
||||
<p>Used for body text and general content</p>
|
||||
</div>
|
||||
<div class="type-sample" style="font-family: 'JetBrains Mono', monospace;">
|
||||
|
||||
+3
-7
@@ -151,20 +151,16 @@ export const typography = {
|
||||
|
||||
/**
|
||||
* The stack the SVG card renderers ask for, as a CSS value rather than an array.
|
||||
* It lived twice — `cards.ts` and `hero.ts` each declared the same string, both
|
||||
* leading with Inter, which is not a face this brand has ever owned.
|
||||
* `cards.ts` and `hero.ts` both read it from here.
|
||||
*
|
||||
* Zen leads. @hanzo/font ships the woff2, so a rasterizer resolves it by being
|
||||
* pointed at that package (resvg-js takes `fontFiles`/`fontDirs`); a host that
|
||||
* cannot falls through the tail exactly as it did before, so naming Zen here
|
||||
* cannot render worse than the string it replaced.
|
||||
* cannot falls through the tail.
|
||||
*/
|
||||
export const svgFontStack = `Zen,'SF Pro Display','Helvetica Neue',Arial,sans-serif`
|
||||
|
||||
// The FACES are @hanzo/font's — it ships Zen, Zen Mono and the five Zen Pixel
|
||||
// variants as woff2 with the @font-face rules to match. This package names the
|
||||
// family a surface should ask for; it does not declare one, and it used to:
|
||||
// `fontFaces` pointed two @font-face rules at /fonts/geist-*-var.woff2, files
|
||||
// this package has never shipped, so it could only ever paint the fallback.
|
||||
// family a surface should ask for; it does not declare one.
|
||||
|
||||
export default typography
|
||||
@@ -141,29 +141,6 @@ export function getOgImageUrl(params: {
|
||||
return `${baseUrl}?${searchParams.toString()}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Load brand fonts
|
||||
*/
|
||||
export function loadFonts() {
|
||||
if (typeof window === 'undefined') return
|
||||
|
||||
const link = document.createElement('link')
|
||||
link.rel = 'preconnect'
|
||||
link.href = 'https://fonts.googleapis.com'
|
||||
document.head.appendChild(link)
|
||||
|
||||
const link2 = document.createElement('link')
|
||||
link2.rel = 'preconnect'
|
||||
link2.href = 'https://fonts.gstatic.com'
|
||||
link2.crossOrigin = 'anonymous'
|
||||
document.head.appendChild(link2)
|
||||
|
||||
const fontLink = document.createElement('link')
|
||||
fontLink.rel = 'stylesheet'
|
||||
fontLink.href = 'https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap'
|
||||
document.head.appendChild(fontLink)
|
||||
}
|
||||
|
||||
export default {
|
||||
hexToRgb,
|
||||
rgbToHex,
|
||||
@@ -176,5 +153,4 @@ export default {
|
||||
shadow,
|
||||
cn,
|
||||
getOgImageUrl,
|
||||
loadFonts,
|
||||
}
|
||||
Reference in New Issue
Block a user