Hammersmith One
import { useRef, useState, useEffect, Fragment } from 'react' import { Canvas, useFrame, useThree } from '@react-three/fiber' import { Stage } from '@react-three/drei' import * as THREE from 'three' import typefaceData from '@compai/font-hammersmith-one/data/typefaces/normal-400.json' const font = new THREE.FontLoader().parse(typefaceData) export const HammersmithOneText = ({ bevelEnabled, bevelOffset, bevelSegments bevelSize, bevelThickness, clearcoat, clearcoatRoughness, color, curveSegments, font, fontSize, height, metalness, reflectivity, roughness, position, text, wireframe, ...props }) => { const mesh = useRef() return ( <mesh {...props} position={position} ref={mesh}> <textGeometry args={[ text, { bevelEnabled, bevelOffset, bevelSize, bevelSegments, bevelThickness, curveSegments, font, height, size: fontSize, }]} /> <meshPhysicalMaterial color={color} clearcoat={clearcoat} clearcoatRoughness={clearcoatRoughness} metalness={metalness} reflectivity={reflectivity} roughness={roughness} wireframe={wireframe} /> </mesh> ) } const Component = () => { return ( <Canvas> <Stage contactShadow={true } contactShadowOpacity={0.2} contactShadowBlur={1.5} environment="city" intensity={1} preset="rembrandt" > <HammersmithOneText bevelEnabled={true} bevelOffset={0} bevelSegments={32} bevelSize={1} bevelThickness={4} clearcoat={0.2} clearcoatRoughness={0.2} color="#fa286d" curveSegments={32} font="HammersmithOne" fontSize={16} height={0.2} metalness={0.2} reflectivity={0.5} roughness={1} position={[0,0,0]} text="Hammersmith One" wireframe={false} /> </Stage> </Canvas> ) } export default Component
Typeface data
Installation
yarn add @compai/font-hammersmith-one
Category
sans-serif
Font stack CSS
body { fontFamily: "hammersmith-one", sans-serif; }
Variants
Font source
Source code
/docs/typefaces/tree/main/packages/font-hammersmith-oneAPI endpoint
/api/v1/typefaces/hammersmith-oneCopyright
{
"font": {
"name": "Hammersmith One",
"category": "sans-serif",
"lastModified": "2022-04-21",
"subsets": [
"latin",
"latin-ext"
],
"unicodeRange": {
"latin": "U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",
"latin-ext": "U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF"
},
"version": "v17",
"fontStack": "\"hammersmith-one\", sans-serif",
"source": "google"
},
"variants": {
"normal": {
"400": {
"local": [],
"url": {
"eot": "https://fonts.gstatic.com/s/hammersmithone/v17/qWcyB624q4L_C4jGQ9IK0O_dFlnruxEh.eot",
"svg": "https://fonts.gstatic.com/l/font?kit=qWcyB624q4L_C4jGQ9IK0O_dFlnruxEi&skey=5f94f25a102337d5&v=v17#HammersmithOne",
"ttf": "https://fonts.gstatic.com/s/hammersmithone/v17/qWcyB624q4L_C4jGQ9IK0O_dFlnruxEg.ttf",
"woff": "https://fonts.gstatic.com/s/hammersmithone/v17/qWcyB624q4L_C4jGQ9IK0O_dFlnruxEj.woff",
"woff2": "https://fonts.gstatic.com/s/hammersmithone/v17/qWcyB624q4L_C4jGQ9IK0O_dFlnrtREl.woff2",
"json": "https://components.ai/api/v1/typefaces/hammersmith-one/normal/400"
}
}
}
}
}