Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Iconfont or svg?
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Justin Slack
August 23, 2015
Design
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Iconfont or svg?
Lightning talk at CTEDs workshop - august 2015.
Justin Slack
August 23, 2015
Other Decks in Design
See All in Design
AI時代に求められるUXデザインのアプローチ
xtone
1
5.6k
Drawing_for_Anim_Final_PDF.pdf
lynteo
2
160
空間アプリ開発のフィードバックをCodexにするための抽象的なデザインツールの模索
karad
0
150
Rethinking IFUs: What Board Game Rulebooks Contribute to IFU Usability
deadlinepoet
0
320
From the Visible Crossroads: Turning Outputs into Outcomes
takaikanako
2
1.4k
結びながら、ひらく - にじむ境界のデザイン
hilokifigma
4
1.7k
CULTURE DECK/Marketing Director
mhand01
0
1.3k
保育現場にAIを 〜人と技術に橋を架けるデザインで考えてきたこと〜 uiuxcamp2026-hoiku-ai-design
hiro93n
1
300
コンテンツ作成者の体験を設計する
chiilog
0
180
2026年、デザイナーはなにに賭ける?
0b1tk
0
570
社長の宿題への回答 「新卒×AI」が生み出す価値
saki822
2
160
Connpass-Xperia_Camera_App_by_HCD.pdf
sony
1
660
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Writing Fast Ruby
sferik
630
63k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Curious Case for Waylosing
cassininazir
1
390
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Designing for humans not robots
tammielis
254
26k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Leo the Paperboy
mayatellez
7
1.8k
Prompt Engineering for Job Search
mfonobong
0
340
The untapped power of vector embeddings
frankvandijk
2
1.8k
Transcript
Iconfonts versus inline svg
Icon systems • pngs
Icon systems • pngs • png sprites
Icon systems • pngs • png sprites • Weird javascript
to make transparency work in IE6
Icon systems • pngs • png sprites • Weird javascript
to make transparency work in IE6 • Retina problems
Iconfonts • Vectors • Can be created online via apps
such as Icomoon or Fontello
Iconfonts • Can be hosted locally
Iconfonts • Can be inlined in CSS
Iconfonts • Multiple ways to display based on how the
font is encoded
Iconfonts • Treated as text by browsers (good and bad)
Iconfonts • You can control the size (via font-size), color,
shadows, rotation, etc. via CSS.
SVG • Can be displayed through the use of CSS
Backgrounds, <object> tags, <img> tags, or inlined directly into your HTML
SVG • Inline SVG is right in the document. If
the browser supports it, it displays it.
<svg class="iconsvg"> <g> <polygon fill="#ad3429" points="217.14,14.856 169.039,14.856 235.993,147.185 260.045,99.649"></polygon> <polygon
fill="#ad3429" points="131.014,184.747 63.991,52.276 39.937,99.813 82.908,184.747"></polygon> <polygon fill="#f2723d" points="216.984,14.856 168.882,14.856 82.927,184.747 131.029,184.747"></polygon> <polygon fill="#f2723d" points="169.039,184.747 217.14,184.747 260.045,99.945 235.993,52.414"></polygon> <polygon fill="#f2723d" points="131.014,14.856 82.908,14.856 39.937,99.784 63.991,147.319"></polygon> </g> </svg>
SVG • semantics of <svg> suit icons which are essentially
images
SVG • accessible via <title>, <desc> and <aria-labelledby>
SVG • Can use build tools
Iconfonts - the bad • May not show up (private
unicode area)
Iconfonts - the bad • Very hard to align as
they depend on pseudo-elements (usually ::before), and things like line-height, vertical-align, letter-spacing, word-spacing and kerning.
Iconfonts - the bad • Cross origin resource
Iconfonts - the bad • Fails to load
Iconfonts - the bad • Chrome bug
Iconfonts - the bad • Android bugs
Iconfonts - the bad • No @font-face support
Iconfonts - the bad • One colour
Iconfonts - the bad • Dyslexia
SVG - the bad • Support. Fallbacks very hard.
Conclusion • Icon font if you have limited number and
low support requirements
Conclusion • Icon font if you have limited number and
low support requirements • svg for more versatility and large icon set
None