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
Justin Slack
August 23, 2015
Design
0
130
Iconfont or svg?
Lightning talk at CTEDs workshop - august 2015.
Justin Slack
August 23, 2015
Tweet
Share
Other Decks in Design
See All in Design
モビリティプラットフォームの未来を築くクラウド基盤
kossykinto
0
210
Correspondence:共に生成していく過程
akiramotomura
0
190
TUNAG BOOK 2024
stmn
PRO
0
1.4k
新卒2年目デザイナーが、UX検定基礎にチャレンジした話
designer_no_pon
0
1.2k
kintone_aroma
kintone
0
1.4k
逆向きUIの世界 〜iOSアプリのRTL言語対応〜
akatsuki174
1
500
不確実性の時代にみんなで試したFigma × MCP × Cursor ハンズオン
techtekt
PRO
7
1.8k
Connpass-Xperia_Camera_App_by_HCD.pdf
sony
0
490
株式会社ログラス - 会社説明資料【デザイナー】/ Loglass Designer
loglass2019
1
7k
デザイナーが主導権を握る、AI協業の本音と実践
satosio
7
2.8k
Storyboard Assignment: Storyboard from Comic Strip
lynteo
3
180
「ツール」から「パートナー」へ。AI伴走時代のUXデザインとは?~操作を減らし、成果を最大にするための設計~
ncdc
0
110
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
83
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
210
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
650
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
Building an army of robots
kneath
306
46k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
We Are The Robots
honzajavorek
0
160
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