Dealing With Web Fonts

When starting a web project (especially from scratch), a font is one of the questions that can spill the project into red relatively fast.Understand the Typography evokes emotions and as such it effects how people perceive, relate, trust and make buying decisions about the product, company or servic...

? https://www.roastdev.com/post/....dealing-with-web-fon

#news #tech #development

Favicon 
www.roastdev.com

Dealing With Web Fonts

When starting a web project (especially from scratch), a font is one of the questions that can spill the project into red relatively fast.Understand the Typography evokes emotions and as such it effects how people perceive, relate, trust and make buying decisions about the product, company or service.As a developer you take care about performance, cross platform support and technical accessibility.
First, identify the typeface—and specific font styles—you need to implement (ask your designer if in doubt ?).
Deliver. Start with web-safe fonts, fonts already existing in your UI toolkit/CSS framework)
and fonts hosted on common font hosting platforms such as Google Fonts, Adobe Fonts, Monotype

If dependence on, or access to a 3rd party provider is a concern, self-host your fonts for total control.


High level points:

You need a license to self-host a downloaded type.
There are many font file formats (svg, otf, ttf, woff, woff2).
Modern web format is woff (Web Open Font Format) with ~97% browser support. Version 2 is using Brotli compression and is ~20% - 50% more efficient.



Cool links:

Pair fonts with AI on Fontjoy

Edit Glyphs in glyphr studio

Learn Glyphs on Glyphs




Sandbox Tests:

Fonts 101
Web save fonts
Generic fonts
Google web fonts
Enjoy selecting, managing and deploying fonts faster.
It used to be much harder..

Similar Posts

Similar

Building a Minimalist URL Shortener with Next.js, Tailwind, and MongoDB

## ? Why I Built Link-Trim.in
A few months ago, I needed a no-nonsense URL shortener for personal projects—something ad-free, lightweight, and easy to deploy. Existing tools felt bloated, so I built Link-Trim.in. Here’s how I went from a domain name to a live app, with some hard-earned lesson...

? https://www.roastdev.com/post/....building-a-minimalis

#news #tech #development

Favicon 
www.roastdev.com

Building a Minimalist URL Shortener with Next.js, Tailwind, and MongoDB

## ? Why I Built Link-Trim.in
A few months ago, I needed a no-nonsense URL shortener for personal projects—something ad-free, lightweight, and easy to deploy. Existing tools felt bloated, so I built Link-Trim.in. Here’s how I went from a domain name to a live app, with some hard-earned lessons along the way.


Step 1: Choosing Binding the Domain

Goal: A short, memorable name.
Went with Link-Trim.in (cheap TLD + clear purpose).
Registrar: Namecheap (for simplicity).
Challenge: DNS propagation delays (tip: test with dig + patience).



Step 2: The Stack

Frontend: Next.js (App Router) + TailwindCSS
Database: MongoDB (free tier)
Hosting: Vercel (with domain binding)
Docs: Single README.md to rule them all
No auth, no SSR, no unnecessary abstractions—just a fast, functional URL shortener.



Step 3: Domain Binding on Vercel

Bought link-trim.in (Namecheap).
Changed nameservers to Vercel’s (or added A/CNAME records).
SSL certs auto-provisioned (love this about Vercel).



Step 4: Try It Out
Link-Trim.in is live—use it, fork it, or roast it!
Similar

? JavaScript Arrays Explained with Practical Code Examples

If you're learning JavaScript, understanding arrays is non-negotiable. They’re everywhere — storing data, managing lists, or manipulating collections. In this guide, we're going full code-mode ? to explore how arrays work.No fluff, just code. Let’s go ?


? Creating Arrays
⛶co...

? https://www.roastdev.com/post/....javascript-arrays-ex

#news #tech #development

Favicon 
www.roastdev.com

? JavaScript Arrays Explained with Practical Code Examples

If you're learning JavaScript, understanding arrays is non-negotiable. They’re everywhere — storing data, managing lists, or manipulating collections. In this guide, we're going full code-mode ? to explore how arrays work.No fluff, just code. Let’s go ?


? Creating Arrays
⛶const fruits = ["apple", "banana", "mango"];
const numbers = [1, 2, 3, 4];
const colors = new Array("red", "green", "blue");
Arrays can hold any data type — strings, numbers, even objects or other arrays.? Accessing Elements
⛶console.log(fruits[0]); // "apple"
console.log(fruits[2]); // "mango"Arrays use zero-based indexing, meaning the first element is at index 0.
⛶fruits[1] = "orange";
console.log(fruits); // ["apple", "orange", "mango"]⚙️ Array Methods in Action
⛶fruits.push("grape"); // Add to end
fruits.pop(); // Remove from end
fruits.shift(); // Remove from start
fruits.unshift("kiwi"); // Add to start
fruits.splice(1, 0, "pineapple"); // Insert at index 1These methods help you add/remove elements from different positions in the array.? Looping Through Arrays
⛶for (let i = 0; i fruits.length; i++) {
console.log(fruits[i]);
}

fruits.forEach(fruit = {
console.log(fruit);
});Looping helps you perform actions on each element. forEach is cleaner and more modern.? Destructuring Arrays
⛶const [first, second] = fruits;
console.log(first); // "apple"
console.log(second); // "orange"Destructuring lets you pull out values easily without accessing them one-by-one.✅ Wrap Up
Arrays are powerful and versatile. Mastering just these few concepts can take you a long way. Practice these snippets, build your own mini-projects, and you’ll see arrays in a whole new light! ?Got a favorite array method or a cool trick? Share it in the comments!
Similar

val ou var, eis a questão

Em Kotlin, uma das primeiras decisões que você toma ao declarar uma variável é:
ela pode mudar ou deve permanecer imutável?A resposta está em duas palavrinhas simples — val e var.


? Qual a diferença entre val e var?



? val (value) → Imutável
Uma vez atribuída, não...

? https://www.roastdev.com/post/....val-ou-var-eis-a-que

#news #tech #development

Favicon 
www.roastdev.com

val ou var, eis a questão

Em Kotlin, uma das primeiras decisões que você toma ao declarar uma variável é:
ela pode mudar ou deve permanecer imutável?A resposta está em duas palavrinhas simples — val e var.


? Qual a diferença entre val e var?



? val (value) → Imutável
Uma vez atribuída, não pode ser alterada.
⛶val nome = "João"
// nome = "Maria" // Erro: Val cannot be reassignedUse val quando o valor não deve mudar. Isso torna seu código mais previsível e seguro.


? var (variable) → Mutável
Permite ser reatribuída.
⛶var idade = 30
idade = 31 // Tudo certo!Use var quando o valor precisar mudar ao longo do tempo.? Por que preferir val?
Imutabilidade é uma boa prática de programação funcional e ela:
Evita efeitos colaterais inesperados.
Facilita o teste e a depuração.
Ajuda a escrever código mais seguro e confiável.

⛶fun calcularDesconto(preco: Double): Double {
val desconto = 0.1
return preco - (preco * desconto)
}Mesmo dentro da função, usamos val porque o valor não muda.? Dica de ouro
Use val como padrão.
Só use var quando a lógica realmente exigir mudanças no valor.
Essa abordagem te ajuda a escrever código mais limpo, seguro e idiomático em Kotlin.
✅ Conclusão
A distinção entre val e var é simples, mas poderosa.
Ao optar por imutabilidade, você reduz bugs, melhora a legibilidade e adota um estilo de programação mais funcional.No próximo artigo, vamos explorar funções de extensão, um dos recursos mais elegantes do Kotlin.???