Türkçe çeviri: Font Loading
nasıl web font loading affects temel Web Vitals like CLS ve LCP, font-display strategies, preloading fonts, ve reducing layout shift -den font swaps.
Diller
Custom web fonts dır external files şu sahip -e download önce text -ebilir render in them, bu nedenle browser gerektirir bir plan bençin ne -e göster in meantime. şu plan — ayarla mainly tarafından CSS font-display property — moves two temel Web Vitals: LCP (ne zaman bir render-blocking font delays sizin largest text) ve CLS (ne zaman swapping fallback bençin web font shifts layout). two default behaviors, FOIT ve FOUT, her sahip bir başarısızlık mode. reliable düzeltmeler: preload critical fonts, kullan font-display: optional veya swap deliberately, match sizin fallback font's metrikler, veya skip custom fonts entirely. o's değil bir direct sıralama faktörü — o feeds CLS/LCP, hangi dır sayfa experience sinyaller.
Evidence for this claim The CSS Font Loading API exposes font loading state and control to documents. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: CSS Font Loading API Evidence for this claim font-display controls how a font face is displayed while it downloads and when fallback is used. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: font-displayTL;DR — bir custom web font dır bir file browser sahiptir -e download önce o -ebilir göster sizin text in o. -iken o waits, o either hides text veya shows bir backup font ve swaps later — ve either choice -ebilir slow down veya visually jump sizin sayfa. siz control şu behavior ile bir CSS line (
font-display), ve siz -ebilir speed font up tarafından preloading o. -erseniz yapmayın ihtiyaç duy bir custom font, bir system font sahiptir nothing -e load ve nothing -e shift.
ne font loading dır
-dığınızda kullan bir custom font — bir brand font, bir Google Font, anything şu değildir zaten on ziyaretçben’s device — browser sahiptir -e go fetch şu font file önce o -ebilir paint sizin text in o. şu download takes time, ve browser sahiptir -e decide ne -e göster in meantime.
o sahiptir two basic options, ve her ikisi sahip annoying names:
- FOIT (Flash of Invisible Text): hide text until custom font arrives. sayfa görünür blank nerede text -meli olmak, o hâlde o pops in.
- FOUT (Flash of Unstyled Text): göster bir olağbir backup font yapğru away, o hâlde swap -e custom font once o loads. siz see text immediately, ama o -ebilir visibly “jump” ne zaman swap olur eğer two fonts değildir aynı size.
neden önemli olduğu bençin SEO
Neither of şunlar dır free. FOIT -ebilir delay ne zaman sizin main text görünür, hangi hurts Largest Contentful Paint (LCP). FOUT -ebilir neden ol bir layout shift ne zaman font swaps in, hangi hurts Cumulative Layout Shift (CLS). her ikisi LCP ve CLS dır temel Web Vitals — gerçek-kullanıcı metrikler Google kullanır olarak part of sayfa experience. bu nedenle font loading değildir sadece bir design detail; o’s bir teknik SEO lever.
simple düzeltmeler
- kullan bir system font eğer -ebilirsiniz. orada’s nothing -e download, bu nedenle orada’s no delay ve no shift. bu en çok reliable düzelt, full durdur.
- -erseniz ihtiyaç duy bir custom font, ayarla
font-display. Addingfont-display: swap(veyaoptional) -e sizin font söyler browser değil -e leave text invisible -iken o waits. - Preload önemli font. bir
<link rel="preload">tag söyler browser -e grab font early yerine stumbling on o later.
iste tam sürüm — font-display değer table, preload + optional
combo, matching sizin fallback font’s metrikler, ve Google vs. self-hosting? Switch
-e Advanced tab.
Evidence for this claim The CSS Font Loading API exposes font loading state and control to documents. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: CSS Font Loading API Evidence for this claim font-display controls how a font face is displayed while it downloads and when fallback is used. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: font-displayTL;DR — Custom web fonts dır render-affecting external kaynaklar. onlar hit LCP ne zaman bir render-blocking font delays sizin largest text element, ve CLS ne zaman fallback—e-web-font swap reflows layout. two default behaviors — FOIT (invisible until loaded) ve FOUT (fallback o hâlde swap) — her başarısız ol differently.
font-displaydır birincil lever (swapguarantees FOUT;optionalverir bir ~100ms window ve o hâlde commits, killing later swap). Preloading düzeltmeler late font discovery; preload +font-display: optionaldır combo Google’ın kendi engineering singled out bençin eliminating layout jank. ama passing Lighthouse font-display kontrol et yapmaz düzelt CLS — şu gerektirir bir metrically-matched fallback (veyasize-adjust/ascent-overrideoverrides). None of bu bir direct sıralama faktörü; o feeds CLS/LCP, hangi dır sayfa experience sinyaller.
neden fonts dır bir special durum
en çok performance problems dır hakkında bytes — bir image dır de big, bir script blocks main thread. Fonts dır worse -den şu in bir specific way: onlar’re bir external kaynak ve onlar change metrikler of sizin text. bu nedenle bir font -ebilir hurt siz two farklı ways at once. o -ebilir delay ne zaman text paints (bir LCP sorun), ve o -ebilir change size ve shape of şu text sonra o’s zaten on screen (bir CLS sorun).
two default browser behaviors dır worth naming çünkü whole topic hangs off them:
- FOIT (Flash of Invisible Text): text in custom font dır rendered invisible until font loads veya bir timeout dır hit — historically up -e bir ~3-ikinci block in en çok browsers.
- FOUT (Flash of Unstyled Text): fallback font shows immediately, o hâlde alır swapped bençin web font once o loads.
FOIT feels “cleaner” (no jump) ama risks bir rendering delay. FOUT feels faster (text now) ama risks bir layout shift on swap. Neither dır automatically safe — şu’s temel idea -e hold üzerine.
o ayrıca yardımcı olur -e separate pipeline -e distinct stages, çünkü success at bir
stage yapmaz guarantee success at sonraki. bir @font-face kural yalnızca declares bir
face — browser fetches gerçek font file yalnızca once matching styled text on
sayfa requires o (declaration ve matching dır separate adımlar -den fetch).
şu fetch dır subject -e CORS eğer font dır sunulan cross-origin, bu nedenle bir stylesheet
şu loads cleanly yapmaz guarantee font response itself carries yapğru
cross-origin permission — bir missing header orada fails silently olarak bir font şu
never renders. ve bir successful fetch hâlâ yapmaz guarantee bir stable-looking sayfa:
cold-cache, warm-cache, ve zaten-cached font states -ebilir produce farklı
discovery ve swap timing, bu nedenle testing bir repeat sayfa load in DevTools yapmaz söyle
siz ne bir ilk-time ziyaretçben aslında sees.
nasıl fonts affect LCP
eğer largest visible element on sizin sayfa dır text — bir big headline, bir hero paragraph — o hâlde font şu text kullanır -ebilir ol part of sizin LCP path. Per web.dev’s LCP rehberlik, LCP kaynak of bir sayfa, eğer o sahiptir bir, -ecek olmak either bir image veya bir web font. bir render-blocking font şu leaves şu text invisible (FOIT) pushes sizin LCP out until font arrives.
düzelt burada dır straightforward ve comes straight -den Google. On web.dev’s Optimize Largest Contentful Paint rehber:
“If you set a
font-displayvalue of anything other thanautoorblock, then text will always be visible during load, and LCP won’t be blocked on an additional network request.” — web.dev
In diğer words: swap, fallback, veya optional tümü koru text visible during load,
bu nedenle sizin LCP değildir hostage -e font istek.
nasıl fonts affect CLS
CLS comes -den swap. sizin fallback font ve sizin web font almost never sahip identical character widths ve line heights, bu nedenle ne zaman browser replaces bir ile diğer, text reflows — ve everything below o moves. şu’s bir layout shift.
counterintuitive part, ve thing en çok kişiler miss: FOIT nedenler CLS de. hatta invisible text dır hâlâ laid out kullanarak fallback font’s metrikler, bu nedenle swap hâlâ moves things. -den web.dev’s Optimize Cumulative Layout Shift rehber:
“Both approaches can cause layout shifts. Even if the text is invisible, it’s still laid out using the fallback font, so when the web font loads, the text block and the surrounding content shift” — web.dev
aynı sayfa frames two behaviors plainly:
“The fallback font is swapped with the web font, incurring a Flash of Unstyled Text (FOUT). ‘Invisible’ text is displayed using the fallback font until a web font is available and the text is made visible (FOIT—flash of invisible text).” — web.dev
ben’ve said aynı thing in plainer terms in benim Ahrefs yaz-up on Cumulative Layout Shift: ne zaman bir font loads veya changes, siz end up ile bir noticeable shift — bir FOIT veya bir FOUT. o’s bir of en çok yaygın gerçek-world CLS nedenler, yapğru alongside images olmadan dimensions ve bençerik injected sonra load.
font-display property
font-display dır bir @font-face descriptor şu controls two Windows: block
period (nasıl uzun browser hides text waiting bençin font) ve swap
period (nasıl uzun, sonra block period, o -ecek hâlâ swap in web font once
o arrives). Per web.dev’s en iyi Practices bençin Fonts:
| değer | Block period | Swap period |
|---|---|---|
auto | Browser-dependent | Browser-dependent |
block | 2–3 seconds | Infinite |
swap | 0ms | Infinite |
fallback | 100ms | 3 seconds |
optional | 100ms | None |
MDN’s font-display reference,
hangi Google’ın kendi docs bağlantı -e olarak spec kaynak, describes them tersely: swap
verir bir extremely küçük block period ve bir infinite swap period; optional verir
bir extremely küçük block period ve no swap period. şu “no swap period” dır
whole benşaret et of optional — sonra block period window closes, whatever font dır
in kullan stays, bu nedenle orada’s no later swap -e shift layout.
bir caution on numbers in şu table: CSS specification itself yalnızca defines block/swap period categories — kısa, extremely küçük, infinite, none — ve leaves exact duration -e browser. millisecond/ikinci figures above dır web.dev’s documented Chromium behavior, değil bir cross-browser guarantee. ele al them olarak illustrative yerine bir spec promise, ve kontrol et güncel numbers bençin whichever browser/sürüm siz’re aslında testing karşı.
hangi değer bençin hangi bençerik? web.dev’s kendi advice dır şu bunlar -ebilir olmak mixed:
kullan swap bençin branding ve diğer visually distinctive elements (nerede seeing
brand font önem taşır ve bir brief shift dır acceptable), ve optional bençin body text
(nerede CLS-sensitivity wins ve siz’d rather değil shift). şu’s bir genuinely yararlı
kural of thumb — yapmayın uygula bir değer site-wide tarafından reflex.
Yazı tiplerini önceden yükleme
Font istekler dır discovered late. browser yapmaz know o gerektirir bir font until
o sahiptir parsed sizin CSS, matched bir @font-face kural -e bir element on sayfa, ve
decided şu element dır visible. yalnızca o hâlde yapar o başla download. bir
<link rel="preload"> kısa-circuits şu:
<link rel="preload" href="/fonts/brand.woff2" as="font" type="font/woff2" crossorigin>şu söyler browser -e başla fetching font immediately, in parallel ile
everything else, yerine waiting -e discover o. Bing’s engineering ekip
describes tam olarak bu mechanism on onların kendi arama sayfalar (daha in Quotes tab):
preload tags in <head> kick off font downloads yapğru away, whereas
olmadan them browser wouldn’t fetch fonts until o sahipti parsed CSS ve
found matching elements.
** strongest combination** per Google’ın kendi writeup dır preload +
font-display: optional. web.dev’s
Prevent layout shifting ve FOIT tarafından preloading optional fonts
çbirğrılar combining <link rel="preload"> ile font-display: optional en çok
effective way -e guarantee no layout jank ne zaman rendering custom fonts, ve notes
şu Chrome (-den sürüm 83) eliminated layout shifting şu kullanılan -e gerçekleş ne zaman
preloading optional fonts. preload verir font onun en iyi shot at arriving
bençinde ~100ms window; optional guarantees şu eğer o yapmaz, siz yapmayın pay bençin
o ile bir shift.
ne zaman değil -e preload. Preloading değildir free. web.dev warns şu preload dır
highly effective at making fonts discoverable early, ama o comes at maliyet of
taking browser kaynaklar away -den loading diğer kaynaklar. Preload bir veya two
fonts siz aslında ihtiyaç duy above fold — preloading her font weight siz kendi -ebilir
starve daha önemli kaynaklar ve yap sayfa slower overall.
emin olun preload aslında alır reused. bir preload yalnızca yardımcı olur eğer browser
-ebilir match o -e gerçek font istek — href, as="font", type, ve
crossorigin mode tümü sahip -e line up ile ne CSS @font-face kural ends up
requesting, veya siz’ll al bir “unused preload” warning ve bir wasted ikinci download
yerine bir faster bir. Preloading -ebilir ayrıca bypass unicode-range selection,
pulling down bir subset siz didn’t aslında ihtiyaç duy bençin şu sayfa. yapğrula match in
DevTools’ Network panel: siz iste -e see bir istek bençin şu font, kicked off tarafından
preload, değil two.
düzeltme shift itself: fallback metric matching
burada’s trap: passing Lighthouse font-display kontrol et yapar değil düzelt CLS.
Google’s Lighthouse docs dır explicit şu FOIT ve FOUT sahip aynı impact on CLS
once custom font replaces temporary system font. bu nedenle swap yapar sizin text
visible (good bençin LCP ve bençin “invisible text” denetim) ama leaves swap shift
in place.
-e kill shift ne zaman bir swap yapar gerçekleş, siz sahip -e yap fallback font ve web font take up aynı space. Two levers:
- seç bir metrically-benzer system fallback in sizin
font-familystack, rather -den bir tek custom font name ile nothing sensible behind o. closer fallback’s character widths ve line height dır -e web font, smaller shift. - Override web font’s metrikler ile
size-adjust,ascent-override,descent-override, veline-gap-overrideon@font-facekural, bu nedenle web font dır forced -e match fallback’s box. web.dev listeler bunlar descriptors, ve Smashing Magazine’s deep dive on CSS font descriptors walks aracılığıyla them in detail -erseniz iste -e go tümü way.
her of şunlar four descriptors adjusts bir farklı metric, ve güncel browser support varies tarafından descriptor — kontrol et compatibility önce leaning on herhangi bir tek bir. Validate karşı gerçek weights, styles, ve scripts siz ship, de: bir düzelt yapğrulanmış on sizin regular-weight Latin text yapmaz guarantee bold, italic, veya bir non-Latin script behave aynı way.
DebugBear’s
düzeltme Layout Shifts neden oldu tarafından Web Fonts
dır bir good end—e-end walkthrough of bu: measure impact, identify sorun
font, uygula font-display, seç bir daha iyi fallback, o hâlde adjust font metrikler.
Google Fonts ve kendi sunucunda barındırma karşılaştırması
siz yapmayın sahip -e self-ana makine -e control font-display.
Google Fonts CSS2 API accepts bir
display sorgu parameter — https://fonts.googleapis.com/css2?family=Roboto&display=swap
sets font-display yapğrudan on sunulan @font-face kurallar. Addy Osmani’s
post on shipping font-display -e Google Fonts
kapsar change: previously yalnızca way -e specify font-display bençin Google
Fonts idi -e self-ana makine them, ve bu removed şu ihtiyaç duy.
Self-hosting hâlâ wins on bir thing: o eliminates extra DNS lookup ve
connection -e fonts.googleapis.com ve fonts.gstatic.com. şu’s bir gerçek latency
maliyet, ve bir of nedenler bir
preconnect kaynak hint -e şunlar
origins yardımcı olur -erseniz yap kullan Google Fonts. Weigh connection overhead karşı
convenience — ve yapmayın assume “it’s from Google, so it’s fine.” bir kopya-pasted Google
Fonts embed dır hâlâ bir render-blocking stylesheet istek plus bir font istek, ve
older embeds -ebilir değil carry bir display değer at tümü.
orada’s no universal winner arasında two options — o comes down -e hangi scripts ve weights siz aslında ship, sizin caching setup, ve font’s license terms. çalıştır comparison karşı sizin kendi sayfalar yerine defaulting -e whichever bir bir tutorial recommended.
Variable fonts
bir variable font packs çok söyleıda weights ve styles (regular, bold, condensed, italic) -e bir tek file ile adjustable axes. şu -ebilir olmak bir net win — bir istek instead of six — -erseniz aslında kullan several of şunlar varyantlar. ama bir full variable font dır bir bigger tek file -den bir static weight, bu nedenle -erseniz yalnızca ever render bir weight, shipping whole variable font -ebilir olmak slower, değil faster. Subset o -e axes ve characters siz kullan, sun o olarak WOFF2 bu nedenle o’s compressed, ve kontrol et font’s license — değil her foundry permits subsetting veya self-hosting.
Reducing file in ilk place
Everything above manages ne zaman font loads. -ebilirsiniz ayrıca shrink ne loads.
Font subsetting strips out glyphs siz yapmayın kullan (bir tümü-Latin site yapmaz ihtiyaç duy
Cyrillic ve CJK ranges), ve WOFF2 dır well-compressed format -e sun. bir
smaller font file dır daha muhtemel -e arrive bençinde optional’s window ve daha az muhtemel
-e block LCP — subsetting ve compression dır complementary lever -e
font-display ve preload, değil bir alternative -e them.
orada’s no tek “correct” subset veya universal byte-savings percentage burada, gerçben — o depends on scripts, characters, ve weights sizin specific audience aslında gerektirir. bir number siz saw in someone else’s durum study veya benchmark değildir bir promise bençin sizin sayfalar; measure sizin kendi font istekler önce ve sonra.
dır bu bir sıralama faktörü?
olmak precise burada. Font loading dır değil bir direct sıralama faktörü. ne o affects dır
CLS ve LCP, hangi dır temel Web Vitals ve part of Google’s sayfa experience
sinyaller. ve sayfa experience dır bir lightweight, tiebreaker-style sinyal — relevance
ve quality dominate; o yardımcı olur decide arasında otherwise comparable sonuçlar, değil
arasında bir great sayfa ve bir poor bir. bu nedenle honest framing dır: düzelt sizin font loading
çünkü o’s bir genuine kullanıcı-experience sorun şu olur -e feed two sıralama
inputs — değil çünkü bir font-display değer -ecek move siz up sonuçlar kendi başına.
benim kendi take
genelinde benim Ahrefs
CLS ve
LCP guides ben’ve landed on
aynı priority sıra, ve o hâlâ holds. eğer -ebilirsiniz kullan bir system font, yap şu —
orada’s nothing -e load, bu nedenle vardır no delays veya changes şu neden ol bir shift. -erseniz
sahip -e kullan bir custom font, güncel en iyi yöntem bençin minimizing CLS dır -e combine
<link rel="preload"> (grab font olarak soon olarak olası) ile font-display: optional (ver o bir küçük window -e load); eğer o yapmaz yap o in time, sayfa
sadece shows bir default font, ve sizin custom font alır cached ve shows up on
subsequent loads. Preload, o hâlde optional, o hâlde — en iyi of tümü — sadece yapmayın kullan bir
custom font. şu’s whole ladder.
AI özet
bir condensed take on Advanced sürüm:
- Font loading = ne browser shows -iken bir custom font downloads. o’s bir special durum çünkü fonts dır her ikisi bir external kaynak ve onlar change text metrikler — bu nedenle onlar -ebilir hurt two temel Web Vitals at once.
- LCP: bir render-blocking font şu hides sizin largest text element (FOIT) delays
LCP. herhangi bir
font-displaydeğer diğer -denauto/blockkeeps text visible bu nedenle LCP değildir blocked on font. - CLS: fallback—e-web-font swap reflows layout. FOIT nedenler CLS de — invisible text dır hâlâ laid out in fallback’s metrikler, bu nedenle swap hâlâ shifts.
font-displaydır main lever:swap= FOUT (fast text, hâlâ swaps);optional= ~100ms window o hâlde commits, bu nedenle no later swap ve no swap-related shift. web.dev suggests mixing them:swapbençin branding,optionalbençin body.- Preload düzeltmeler late font discovery. Preload +
font-display: optionaldır Google’s singled-out combo bençin eliminating layout jank (Chrome 83+). yapmayın üzerinde-preload — o steals kaynaklar -den diğer loads. - Passing Lighthouse font-display denetim ≠ düzeltme CLS. swap shift dır bir
separate düzelt: bir metrically-matched fallback, veya
size-adjust/ascent-override/descent-override/line-gap-override. - Google Fonts -ebilir ayarla
font-displayvia&display=URL parameter (no self-hosting gerekli); self-hosting hâlâ removes extra connection hop. - değil bir direct sıralama faktörü — o feeds CLS/LCP, hangi dır sayfa experience sinyaller (bir tiebreaker). en iyi düzelt of tümü: kullan bir system font.
resmî dokümantasyon
birincil-kaynak dokümantasyon -den Google ve Bing.
- en iyi Practices bençin Fonts (web.dev) —
font-displaydeğer table (block/swap periods) ve mix-strategy advice. - Optimize Cumulative Layout Shift (web.dev) — FOIT/FOUT explanation ve neden her ikisi neden ol layout shift.
- Optimize Largest Contentful Paint (web.dev) — ne zaman bir web font dır LCP kaynak ve nasıl
font-displaykeeps text visible. - Prevent layout shifting ve FOIT tarafından preloading optional fonts (web.dev) — preload +
font-display: optionalcombo ve Chrome 83 düzelt. - Optimize WebFont loading ve rendering (web.dev) — broader font-loading performance rehber.
- öğren: Optimize web fonts (web.dev) — structured lesson sürüm.
- Ensure text kalır visible during webfont load (Chrome bençin Developers) — Lighthouse font-display denetim. Note: olarak of Lighthouse 13 bu moved -den bir standalone denetim -e bir broader “Font display insight” panel, bu nedenle older screenshots ve guides kullan eski naming.
- Google Fonts CSS2 API —
displayparameter — ayarlamafont-displayvia URL olmadan self-hosting. - MDN —
font-display— CSS spec reference Google’ın kendi docs bağlantı -e bençin değer definitions.
Bing / Microsoft
- Fast Front-End Performance bençin Microsoft Bing (Bing arama Quality Insights, Aug 2022) — belgeler font preloading olarak bir production technique on Bing’s kendi sonuçlar sayfalar. Note: bu post confirms preload mechanism yalnızca; o yapmaz kapsa
font-display, FOIT/FOUT, CLS, veya LCP tarafından name.
Quotes -den kaynak
On—record statements -den Google’s Chrome/web.dev docs ve Bing engineering. Font
loading lives in rendering/performance spec area, bu nedenle birincil kaynaklar burada dır
Chrome ve web.dev ekipler (değil arama Relations) — yoktur on-record arama
ekip quote calling font-display bir sıralama topic, ve ben’m değil going -e invent bir.
Google — web.dev (Chrome ekip)
- “Both approaches can cause layout shifts. Even if the text is invisible, it’s still laid out using the fallback font, so when the web font loads, the text block and the surrounding content shift” — web.dev, Optimize Cumulative Layout Shift. Jump -e quote
- “The fallback font is swapped with the web font, incurring a Flash of Unstyled Text (FOUT). ‘Invisible’ text is displayed using the fallback font until a web font is available and the text is made visible (FOIT—flash of invisible text).” — web.dev, Optimize Cumulative Layout Shift. Jump -e quote
- “If you set a
font-displayvalue of anything other thanautoorblock, then text will always be visible during load, and LCP won’t be blocked on an additional network request.” — web.dev, Optimize Largest Contentful Paint. Jump -e quote
Bing — üretimde yazı tiplerini önceden yükleme
- Bing’s engineering ekip describes preload tags in
<head>şu söyle browser -e başla downloading onun custom web fonts immediately; olmadan şunlar tags, browser wouldn’t fetch fonts until o sahipti parsed CSS ve encountered matching elements — bu nedenle preloading yapar them mevcut in time bençin text rendering. okuyun post
#:~:text= deep bağlantılar jump straight -e quoted passage on live sayfa. Yazı tipi yükleme kontrol listesi
bir quick geç -e emin olun fonts değildir quietly wrecking sizin temel Web Vitals:
- her custom
@font-face(veya Google Fonts URL) sets bir deliberatefont-displaydeğer — değil browser default. - Body text kullanır
font-display: optional(veya bir metrically-matchedswap) -e kaçın bir swap-driven layout shift. - bir veya two fonts kullanılan above fold dır preloaded ile
<link rel="preload" as="font" type="font/woff2" crossorigin>. - siz’re değil preloading her weight — yalnızca ne’s gerekli bençin initial render.
- preload’s
href,as="font",type, vecrossoriginmatch gerçek@font-faceistek (checked in Network panel) — no unused preload, no yinelenen download. - sizin
font-familystack names bir sensible system fallback, değil sadece custom font. - eğer bir swap hâlâ shifts, fallback metrikler dır matched (
size-adjust,ascent-override,descent-override,line-gap-override). - Fonts dır sunulan olarak WOFF2 ve subset -e characters/weights siz aslında kullan.
- Google Fonts embeds bençer bir
displayparameter ve birpreconnect-efonts.gstatic.com. - Variable fonts dır yalnızca kullanılan -dığınızda render birden çok varyantlar — otherwise bir tek static weight -ebilir olmak lighter.
- siz’ve yapğrulanmış ile PageSpeed Insights / Lighthouse şu fonts değildir LCP element veya bir CLS culprit.
mental models
1. Fonts hit two vitals aracılığıyla two mechanisms.
LCP: bir render-blocking font hides sizin largest text element until o loads. CLS:
fallback→web-font swap changes text metrikler ve reflows. düzelt them olarak two separate
problems, çünkü bir düzelt (swap) yardımcı olur LCP ama leaves CLS untouched.
2. FOIT vs. FOUT — her ikisi başarısız ol, differently. FOIT (invisible until loaded) risks bir rendering delay → LCP. FOUT (fallback o hâlde swap) risks bir layout shift → CLS. yoktur “safe default”; siz sahip -e seç ve mitigate.
3. font-display decision.
optional = bir ~100ms window, o hâlde commit ile no later swap (en iyi bençin CLS-sensitive
body text). swap = göster text now, guarantee brand font eventually (en iyi bençin
branding, accept bir küçük shift). Mix them per element yerine bir değer
everywhere.
4. Discovery vs. render.
Preload düzeltmeler discovery ( browser learns hakkında font early). font-display
düzeltmeler render behavior (ne shows -iken o loads). Fallback-metric matching düzeltmeler
- shift itself*. onlar’re three farklı levers — siz çoğu zaman iste tümü three.
5. good / daha iyi / en iyi ladder.
Good: preload sizin fonts (daha iyi hâlâ, aynı-origin, -e drop extra connection).
daha iyi: font-display: optional, paired ile preload, bu nedenle bir slow font sadece shows bir
default ve caches bençin sonraki time. en iyi: kullan bir system font — nothing loads, bu nedenle no
delay ve no shift.
Yazı tipi yükleme — kısa başvuru
font-display values (block / swap periods, per web.dev):
| değer | Block | Swap | Good bençin |
|---|---|---|---|
auto | Browser-dependent | Browser-dependent | Nothing — o’s unmanaged default |
block | 2–3s | Infinite | Rarely — nedenler FOIT, risks LCP |
swap | 0ms | Infinite | Branding/headlines (fast text, ama swaps → -ebilir shift) |
fallback | 100ms | 3s | bir compromise: brief block, limited swap window |
optional | 100ms | None | Body text (no swap → no swap-driven CLS) |
Figures above dır web.dev’s documented Chromium behavior. CSS spec itself yalnızca defines block/swap period categories (kısa, extremely küçük, infinite, none) ve leaves exact timing -e browser — verify güncel numbers bençin browser siz’re testing.
** two başarısızlık modes**
- FOIT = invisible until loaded → risks delaying LCP.
- FOUT = fallback o hâlde swap → risks bir layout shift → CLS.
- her ikisi neden ol CLS once swap olur; yalnızca fallback-metric matching veya
optionalprevents o.
** düzeltmeler, in priority sıra**
- kullan bir system font (nothing loads).
- Preload critical font (
as="font" type="font/woff2" crossorigin). - ayarla
font-display(optionalbençin body,swapbençin branding). - Match fallback’s metrikler (
size-adjust,ascent-override,descent-override,line-gap-override). - Subset + WOFF2 -e shrink file itself.
Google Fonts fast facts
- ekle
&display=swap(veyaoptional/fallback) -e CSS2 URL -e ayarlafont-displayolmadan self-hosting. - hâlâ bir render-blocking stylesheet + bir separate font istek — ekle
preconnect-efonts.gstatic.com. - Self-hosting removes extra DNS/connection hop.
Diagnose
- PageSpeed Insights / Lighthouse “Font display insight” (idi standalone “Ensure text kalır visible during webfont load” denetim önce Lighthouse 13).
- Chrome DevTools Performance + Network panels — see ne zaman fonts load relative -e ilk paint ve shifts.
Font-loading myths ve mistakes
her of bunlar dır bir gerçek, yaygın denetim bulma — ile neden o’s yanlış ve ne yapılacağı instead.
“font-display: swap fully solves my CLS problem.”
neden o’s yanlış: swap düzeltmeler FOIT (text dır visible immediately, good bençin LCP ve
Lighthouse denetim) ama o guarantees FOUT — ve eğer fallback ve web font
differ in size, swap hâlâ shifts layout. Google’s Lighthouse docs note FOIT
ve FOUT sahip aynı impact on CLS once swap olur.
yap instead: pair o ile bir metrically-matched fallback (veya kullan optional), bu nedenle
swap yapmaz move anything.
“Preloading a font always speeds up my page.” neden o’s yanlış: web.dev dır explicit şu preload comes at maliyet of taking browser kaynaklar away -den loading diğer kaynaklar. Preloading fonts siz yapmayın ihtiyaç duy above fold delays daha önemli çalışır. yap instead: preload yalnızca bir veya two fonts gerekli bençin initial render.
“font-display: optional means the custom font never loads.”
neden o’s yanlış: o loads ve dır cached — o’s sadece değil kullanılan on şu specific sayfa
load eğer o misses ~100ms window. Once cached, later sayfa views typically göster o
immediately.
yap instead: kullan optional bençin CLS-sensitive body text olmadan worrying şu
returning visitors miss brand font.
“herhangi bir font-display değer düzeltmeler Lighthouse ‘invisible text’ warning, bu nedenle ben’m
done.”
neden o’s yanlış: passing şu denetim dır necessary ama değil sufficient — swap
layout shift dır bir separate, related-ama-distinct sorun.
yap instead: sonra clearing denetim, kontrol et CLS ve düzelt fallback metrikler eğer
swap hâlâ shifts.
“Google Fonts are auto-optimized and can’t cause CWV problems.”
neden o’s yanlış: bir kopya-pasted Google Fonts embed dır hâlâ bir render-blocking
stylesheet istek plus bir separate font istek unless display ve
preconnect/preload dır configured. “It’s from Google so it’s fine” dır bir yaygın
gerçek-world denetim miss.
yap instead: ekle &display=, preconnect -e fonts.gstatic.com, ve preload
critical weight.
“Font loading is a UX-only concern with no SEO relevance.” neden o’s yanlış: CLS ve LCP dır temel Web Vitals ve part of Google’s sayfa experience sinyaller. Font choices sit yapğrudan in bir teknik SEO’s remit. yap instead: ele al font loading olarak part of sizin CWV çalışır — -iken tutma o in proportion (sayfa experience dır bir tiebreaker, değil bir birincil factor).
bul fonts loading on bir sayfa
bir quick DevTools Console snippet -e liste her font face browser aslında loaded, ve whether her dır done — yararlı bençin spotting bir heavy veya slow font.
Chrome DevTools Console
// List loaded font faces and their status
[...document.fonts].map(f => ({
family: f.family,
weight: f.weight,
style: f.style,
status: f.status, // "loaded", "loading", "unloaded", "error"
display: f.display, // the font-display value in effect
}));
// When did fonts finish loading? (relative to navigation start)
document.fonts.ready.then(() =>
console.log("All fonts ready at", performance.now().toFixed(0), "ms")
);Watch bençin font-driven layout shifts
Paste bu in Console -e log CLS entries olarak onlar gerçekleş, dahil elements şu moved — handy bençin confirming bir font swap dır culprit.
Chrome DevTools Console
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
if (!entry.hadRecentInput) {
console.log("Layout shift", entry.value.toFixed(4),
entry.sources?.map(s => s.node));
}
}
}).observe({ type: "layout-shift", buffered: true });kontrol et şu bir font file dır WOFF2 ve reasonably sized
Fonts -meli olmak WOFF2 ve subset. benşaret et bunlar at bir font URL -e kontrol et onun size ve type.
macOS / Linux
curl -sI https://example.com/fonts/brand.woff2 \
| grep -iE "content-type|content-length"Windows / PowerShell
$r = Invoke-WebRequest -Method Head https://example.com/fonts/brand.woff2
$r.Headers["Content-Type"]; $r.Headers["Content-Length"]bir büyük content-length (well -e hundreds of KB bençin bir tek weight) dır bir
subsetting/compression opportunity.
hangi font-loading strategy fits sayfa?
How should the critical text font load?
Prove bir font-loading change worked
Critical-font preload test et
test et -e çalıştır: reload ile cache disabled ve inspect font istek’s initiator ve başla time in Network panel. beklenen sonuç: intended critical font starts early ve dır reused tarafından CSS olmadan bir yinelenen download. başarısızlık interpretation: preload attributes yapmayın match CSS istek veya font değildir aslında critical. izleme window: immediate. Rollback trigger: yinelenen istekler, console errors, veya contention şu delays daha önemli kaynaklar.
Font-swap stability test et
test et -e çalıştır: throttle load -iken recording Performance panel Layout Shifts izle. beklenen sonuç: fallback text kalır visible ve final font yapmaz oluştur bir measurable shift. başarısızlık interpretation: fallback metrikler hâlâ differ veya swap olur de late. izleme window: immediate genelinde supported breakpoints. Rollback trigger: hidden text, clipped text, veya worse CLS.
Field-vitals test et
test et -e çalıştır: compare post-release LCP ve CLS bençin changed template ile prior RUM baseline. beklenen sonuç: targeted metric improves olmadan degrading diğer. başarısızlık interpretation: font idi değil bottleneck veya strategy traded loading speed bençin instability. izleme window: RUM olarak trafik arrives; CrUX üzerinde onun rolling window. Rollback trigger: either field metric worsens consistently.
kaynaklar worth sizin time
benim related yazma
- ne dır Cumulative Layout Shift (CLS) & nasıl -e Improve o (Ahrefs) — benim CLS rehber, dahil preload +
font-display: optionaldüzelt bençin font-driven shifts. - ne dır Largest Contentful Paint (LCP) & nasıl -e Improve o (Ahrefs) — good/daha iyi/en iyi font ladder bençin LCP.
- ne dır temel Web Vitals (CWVs) & nasıl -e Improve Them (Ahrefs) — nerede CLS ve LCP fit in bigger CWV picture.
- Patrick Stox on Ahrefs blog — rest of benim teknik SEO yazma.
-den yaklaşık industry
- düzeltme Layout Shifts neden oldu tarafından Web Fonts (DebugBear, Umar Hansa) — end—e-end: measure → bul font →
font-display→ daha iyi fallback → adjust metrikler. - Ensure text kalır visible during webfont load (DebugBear) — Lighthouse-denetim-specific troubleshooting angle.
- nasıl -e kaçın layout shifts neden oldu tarafından web fonts (Simon Hearne) — bir practitioner-level deep dive.
- FOUT, FOIT, FOFT (CSS-Tricks) — canonical explainer bençin terminology.
- bir yeni Way -e Reduce Font Loading Impact: CSS Font Descriptors (Smashing Magazine) —
size-adjust/ascent-override/descent-override/line-gap-overridetechnique in depth. - nasıl -e Reduce Layout Reflow ne zaman kullanarak Web Fonts (Material Design) — bir practical CSS-descriptor walkthrough -den Google’s Material ekip.
- biz shipped font-display -e Google Fonts (Addy Osmani) —
displayURL parameter ve neden o removed ihtiyaç duy -e self-ana makine bençinfont-displaycontrol.
test et yourself: Font Loading
Five quick questions on nasıl web fonts affect temel Web Vitals. seç bir yanıt her biri bençin, o hâlde kontrol et.
Değişiklik günlüğü
8 Ağu 2026 tarihinde güncellendi.
Editoryal özet ve kaydedilen değişiklik ayrıntıları.Değişiklik ayrıntıları
-
Ayrıntılı değişiklik notları şu anda İngilizce olarak mevcut.
Tam karşılaştırma kullanılamıyor — bu sürüm için önceki anlık görüntü arşivlenmemiş.
17 Tem 2026 tarihinde güncellendi.
Editoryal özet ve kaydedilen değişiklik ayrıntıları.Değişiklik ayrıntıları
-
Ayrıntılı değişiklik notları şu anda İngilizce olarak mevcut.
-
Ayrıntılı değişiklik notları şu anda İngilizce olarak mevcut.
-
Ayrıntılı değişiklik notları şu anda İngilizce olarak mevcut.
Tam karşılaştırma kullanılamıyor — bu sürüm için önceki anlık görüntü arşivlenmemiş.