CSS Typography Fonts & Formatting
Total Page:16
File Type:pdf, Size:1020Kb
CSS Typography Fonts & Formatting Group to whom I’m speaking ! R. Scott Granneman © 2007 R. Scott Granneman Last updated 20140320 You are free to use this work, with certain restrictions. For full licensing information, please see the last slide/page. 1 Basics 2 Types 3 Most basic: ! Serif Sans-serif Monospaced/Monospaced 4 Adobe Type Classifications www.adobe.com/type/browser/classifications.html 5 Adobe Originals Greek Sans Serif: Grotesque, ! ! Neo-Grotesque, Blackletter Hand-tooled, Inline, Geometric and Humanist ! Outline, Stencil ! Capitals ! Script ! Japanese ! Computer Related ! Slab Serif ! Mathematical ! Cyrillic ! Small Caps & Old Style ! Monospaced Figures Decorative & Display ! ! ! OpenType Pro Swash Didone (Modern) ! ! ! Opticals Symbol Expert Collection Ornamentals ! ! ! Transitional Garalde Oldstyle Phonetic ! ! ! Venetian Oldstyle Glyphic 6 Serif font Serif font with serifs in red Sans-serif font commons.wikimedia.org/wiki/File:Serif_and_sans-serif_02.svg en.wikipedia.org/wiki/File:Serif_and_sans-serif_03.svg 7 en.wikipedia.org/wiki/File:Typography_Line_Terms.svg 8 1 x-height 11 counter 2 ascender line 12 collar 3 apex 13 loop 4 baseline 14 ear 5 ascender 15 tie 6 crossbar 16 horizontal bar 7 stem 17 arm 8 serif 18 vertical bar 9 leg 19 cap height 10 bowl 20 descender line en.wikipedia.org/wiki/File:Typoghaphia.svg en.wikipedia.org/wiki/Typeface_anatomy 9 Measure 10 Measure ! Length of a line of text ! Measure should be pleasing to the eye & facilitate reading 11 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 12 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 13 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 14 Shoot for between 40-80 characters, including spaces ! ~ 65 characters is ideal 15 Leading 16 Leading Space between lines of type ! Very important for readability 17 The longer the measure, the more leading is needed ! The larger the font, the less leading is needed 18 Leading of 0.8 ! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 19 Leading of 1.7 ! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut. 20 Leading of 1.3 ! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 21 Rough rule of thumb: set leading 1.3 times your font size 22 * { font-family: Helvetica, sans-serif; font-size: 1em; line-height: 1.3; }" ! Same as: ! * {! font: 1em/1.3 Helvetica, sans-serif;! } 23 Scale 24 Don’t size text arbitrarily ! Use a scale for your fonts 25 The Classical Scale ! 6 7 8 9 10 11 12 14 16 18 21 24 36 48 60 72 26 Fibonacci sequence scale ! 8 13 21 34 55 89 27 The W3 provides a very usable, standard scale 28 <absolute-size> Scaling Factor HTML hx xx-large 2/1 h1 x-large 3/2 h2 large 6/5 h3 medium 1 h4 small 8/9 h5 x-small 3/4 xx-small 3/5 h6 29 body {font: 1em/1.3 "Lucida Grande";}" h1, h2, h3, h4, h5, h6 {font-family: Georgia;}" h1 {font-size: 200%;}" h2 {font-size: 150%;}" h3 {font-size: 120%;}" h4 {font-size: 100%;}" h5 {font-size: 89%;}" h6 {font-size: 60%;} 30 31 Typography & the Web 32 Operating System Defaults 33 WINDOWS95 WINDOWS98 WINDOWS2000 WINDOWSXP WINDOWSVista WINDOWS7 Fonts New Fonts New Fonts New Fonts New Fonts New Fonts Arial Abadi MT Condensed Light Comic Sans MS Estrangelo Edessa Cambria Gabriola Arial Bold Aharoni Bold Comic Sans MS Bold Franklin Gothic Medium Calibri Segoe Print Arial Bold Italic Arial Black Georgia Franklin Gothic Med. Italic Candara Segoe Print Bold Georgia Bold Arial Italic Book Antiqua Gautami Consolas Segoe Script Georgia Bold Italic Courier Calisto MT Kartika Constantina Segoe Script Bold Georgia Italic Courier New Century Gothic Impact Latha Corbel Segoe UI Light Courier New Bold Century Gothic Bold Mangal Lucida Console Nyala Segoe UI Semibold Courier New Bold Italic Century Gothic Bold Italic Microsof Sans Serif Lucida Sans Demibold Segoe UI Segoe UI Symbol Courier New Italic Century Gothic Italic Palatino Linotype Lucida Sans Demibold Italic Modern Comic San MS Palatino Linotype Bold Lucida Sans Unicode MS Sans Serif Comic San MS Bold Palatino Linotype Bld Italic Modern MS Serif Copperplate Gothic Bold Palatino Linotype Italic Mv Boli Roman Small Fonts Copperplate Gothic Light Plantagenet Cherokee Script Symbol Impact Raavi NOTE: Trebuchet MS Te new Vista fonts are the Times New Roman Lucida Console Trebuchet MS Bold Script newer cleartype format Times New Roman Bold Lucida Handwriting Italic Trebuchet MS Bold Italic Shruti designed for the new Vista Times New Roman Italic Lucida Sans Italic Trebuchet MS Italic Sylfaen display technology. Microsof Times New Roman Bld Italic Lucida Sans Unicode Wingdings Tunga designed these to become Wingdings Marlett Vrinda replacements for: Matisse ITC WST_Czec News Gothic MT WST_Engl Cambria = Georga and News Gothic MT Bold WST_Fren Times New Roman News Gothic MT Italic WST_Germ Calibri = Arial OCR A Extended WST_Ital Candara = Trebuchet MS and Tahoma WST_Span Helvetica Tahoma Bold WST_Swed Tempus Sans ITC Consolas = Lucidia Console Verdana and Courier New Verdana Bold Constantia = Georga and Verdana Bold Italic Palatino Verdana Italic Corbel = Verdana Webdings Provided by: Westminster www.tlccreative.com/samples/OS_Fonts_by_TLC.pdf 34 XP 133 Vista 191 7 235 8 278 35 10.5 Leopard 160 10.6 Snow Leopard 248 10.7 Lion 225 10.8 Mountain Lion 242 10.9 Mavericks 247 36 iPhone iPad 3 44 — 4 41 67 5 57 57 6 61 61 7 71 71 37 1-3 3 4 6 38 7 25 8 37 39 Web Browser Defaults 40 OS Browser Sans-serif Serif Mono Times New Arial Courier New Roman Times New Arial Courier New Roman Helvetica Times Courier sans-serif serif monospace 41 OS Browser Standard Fixed-Width Times New Courier New Roman Times Courier 42 OS Browser Sans-serif Serif Mono Times New Arial Courier New Roman Helvetica times-roman Courier sans serif monospace 43 Microsoft’s Core Fonts for the Web 44 Provided by Microsoft royalty-free 1996-2002 ! Still legally available all over the Web & on all Macs 45 Not included in Windows since Windows ME in 2000 ! Pretty good monospace font en.wikipedia.org/wiki/File:AndaleMono.svg 46 Still included on Windows ! Inferior knock-off of Helvetica en.wikipedia.org/wiki/File:ArialMTsp.svg 47 Still included in Windows (why?!?) ! Never use Comic Sans en.wikipedia.org/wiki/File:ComicSansSpec3.svg 48 49 Actually Courier New ! Inferior version of Courier ! Still included in Windows en.wikipedia.org/wiki/File:Courier.svg 50 Still included with Windows ! Decent if over-used serif en.wikipedia.org/wiki/File:GeorgiaSpecimenAIB.svg 51 Still included with Windows 52 Still included in Windows ! OK for print; horrible for screens en.wikipedia.org/wiki/File:Times_New_Roman-sample.svg 53 54 Still included in Windows ! en.wikipedia.org/wiki/File:TrebuchetMS_SP.svg 55 Still included in Windows en.wikipedia.org/wiki/File:VerdanaSpecimen.svg 56 Still included in Windows en.wikipedia.org/wiki/File:Webdings-big.png 57 Microsoft ClearType Font Collection 58 Introduced with: ! » Windows Vista » Office 2007 for Windows » Office 2008 for Mac OS X 59 Default body type face in Word, Excel, PowerPoint, & Outlook since Office 2007 60 Default header type face in Word, Excel, PowerPoint, & Outlook since Office 2007 61 62 Monospaced font ! Licensed by Bare Bones as the default in BBEdit 63 64 65 Font Properties 66 font-size" ! line-height" ! font-style" ! font-variant" ! font-weight" ! font-family 67 font-size 68 Specify size using ! <absolute-size>" <relative-size>" <length>" <percentage> 69 <absolute-size> Scaling Factor HTML hx xx-large 2/1 h1 x-large 3/2 h2 large 6/5 h3 medium 1 h4 small 8/9 h5 x-small 3/4 xx-small 3/5 h6 70 <relative-size>" ! larger" smaller 71 <length>" Fixed size measured in units that are » Font-relative » Viewport-percentage » Absolute 72 Originally width of capital M em Now the point size of the font x-height of font ex 1ex ≈ 0.5em ch Width of 0 (zero) “root em” rem Font-size of root element 73 vh 1/100th of the viewport’s height vw 1/100th of the viewport’s width 1/100th of the minimum value vmin between the viewport’s height & width 1/100th of the maximum value vmax between the viewport’s height & width 74 px 96 pixels per inch mm 1 millimeter cm 1 centimeter = 10 mm in 1 inch = 2.54 cm pt 1 point = 1/72 in pc 1 pica = 12 pt 75 <percentage>" Relative to parent’s font size