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.

İlk yayın tarihi: 2 Tem 2026 · Son güncelleme: 8 Ağu 2026 · Advanced
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.

TL;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-display dır birincil lever (swap guarantees FOUT; optional verir bir ~100ms window ve o hâlde commits, killing later swap). Preloading düzeltmeler late font discovery; preload + font-display: optional dı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 (veya size-adjust/ascent-override overrides). None of bu 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-display

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-display value of anything other than auto or block, 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ğerBlock periodSwap period
autoBrowser-dependentBrowser-dependent
block2–3 secondsInfinite
swap0msInfinite
fallback100ms3 seconds
optional100msNone

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:

  1. seç bir metrically-benzer system fallback in sizin font-family stack, 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.
  2. Override web font’s metrikler ile size-adjust, ascent-override, descent-override, ve line-gap-override on @font-face kural, 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.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.