wavefont
v3.1.1
Um tipo de letra para renderizar dados de barras verticais: formas de onda, espectros, diagramas, histogramas, colunas etc.

Playground • Fontes do Google • V-Fonts • Wavearea
Coloque o WaveFont [Rond, Yela, WGHT] .Woff2 no diretório do projeto e use este código:
< style >
@font-face {
font-family: wavefont;
font-display: block;
src: url(./Wavefont[ROND,YELA,wght].woff2) format('woff2');
}
.wavefont {
--wght: 400;
font-family: wavefont;
font-variation-settings: 'wght' var(--wght), 'ROND' 30, 'YELA' 0;
}
</ style >
<!-- Set values manually -->
< textarea id =" waveform " class =" wavefont " cols =" 100 " >
abcdefghijklmnopqrstuvwwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
</ textarea >
< script >
// Set values programmatically (more precise)
waveform . textContent = Array . from ( { length : 100 } , ( _ , i ) => String . fromCharCode ( 0x100 + i ) ) . join ( '' )
</ script > As barras de ondas correspondem a valores de 0 a 100, atribuídos a diferentes caracteres:
char = String.fromCharCode(0x100 + value) ). | Marcação | Faixa | Padrão | Significado |
|---|---|---|---|
wght | 1 - 1000 | 400 | Largura da barra, ou ousadia. |
ROND | 0 - 100 | 100 | Raio de fronteira, ou redondeza (porcentagem). |
YELA | -100 - 100 | -100 | Alinhamento: inferior, centro ou superior. |
Para ajustar os eixos via CSS:
. wavefont {
font-variation-settings : 'wght' var ( --wght , 40 ) , 'ROND' var ( --rond , 0 ) , 'YELA' var ( --align , 0 );
letter-spacing : 1 ch ; /* 1ch unit === 1 bar width */
} ou - são selecionáveis clique duas vezes. , t etc.-–._* mapear para 1 valor, | Mapas para o valor máximo, ▁▂▃▄▅▆▇█ mapa para barras correspondentes.u0101u0302u0302u0301u0301u0301 Deslocamentos 23 Passos para cima.u0101u030cu0300u0300u0300 Shifts 13 etapas abaixo.O pacote Opcional WaveFont expõe uma função que calcula a string dos valores para sua conveniência.
import wf from 'wavefont'
// get characters for values from 0..127 range
wf ( 0 , 1 , 50 , 99 , 127 , ... ) // ĀāIJţŤ... make build
?