Font Usage on the Web. Used to be true that … Normally end users can only see the fonts that are already installed on their computers. Normally end users.

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

HTML Basics Customizing your site using the basics of HTML.
HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
CSS Basics Style and format your web site using CSS.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
CSS. CSS, or Cascading Styles Sheets, is a way to style HTML. Whereas the HTML is the content, the style sheet is the presentation of that document.
Cascading Style Sheets Basics. Why use Cascading Style Sheets? Allows you to set up a series of rules for all pages in a site. The series may be changed.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Week 7 Web Typography. 2 Understanding Type Design Principles.
Chapter Concepts Discuss Fonts Understand Fonts
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Introduction to HTML 2004 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 13: Working with Web Fonts.
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
Week 5 HTML5 and Video + Web Fonts. Video and HTML5 Until now, there has not been a standard for showing a video/movie on a web page. In the past most.
Art 368 WEB Design 1 Spring 2002 Type Two basic families:  Serif and Sans Serif Parts of all type Ascenders, descenders, baseline, etc. Leading= linespacing/paragraph.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Principles of Web Design 6 th Edition Chapter 5 – Web Typography.
Font Families by Anthony Asay. Font Family ●Font family or font face is the typeface that is applied to the text by a web browser. ●There are a lot of.
Neal Stublen Font Limitations  Browsers can only display the fonts installed on the device Arial, Verdana, Times, Georgia  Custom.
Understanding CSS Essentials: Content Flow, Positioning, and Styling
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
CIT 256 Dreamweaver Intro. Dr. Beryl Hoffman. Start Dreamweaver Start from Start Menu/Adobe Master Collection CS6/ Adobe Dreamweaver CS6 Choose Create.
XHTML Louise Soe updated September 2009.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
The Box Model in CSS Web Design – Sec 4-8
CS3220 Web and Internet Programming CSS Basics
Understanding and Applying Typography in CSS
Cascading Style Sheets Color and Font Properties
Formatting Text with CSS
Applying Typography in CSS
Using Cascading Style Sheets Module B: CSS Structure
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Understanding and Applying Typography in CSS
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets
CSS – Properties & Values
TYPEFACE TERMINOLOGY SERIF SANS-SERIF MONOSPACE Explain: names for different types of typeface (point out differences) Click: serif Click: sans-serif.
The Internet 10/13/11 The Box Model
CSS Style Sheets: Intro
Cascading Style Sheets Color and Font Properties
Web Design 3080 : Week 3 Introduction to Dreamweaver Lecture
Cascading Style Sheets
Cascading Style Sheets™ (CSS)
Web Development & Design Foundations with H T M L 5
CS3220 Web and Internet Programming CSS Basics
CSS Styles Fonts and Colors.
CS3220 Web and Internet Programming CSS Basics
Session IV Chapter 15 - How Work with Fonts and Printing
Cascading Style Sheets
ATLAS WEB Web Typography.
Presentation transcript:

Font Usage on the Web

Used to be true that … Normally end users can only see the fonts that are already installed on their computers. Normally end users can only see the fonts that are already installed on their computers. If not installed, browsers will show some other font that is on the user’s computer. If not installed, browsers will show some other font that is on the user’s computer. In CSS define a font for an element (such as ) by specifying multiple fonts so that if your preferred font is not available your CSS file should use the available alternatives. In CSS define a font for an element (such as ) by specifying multiple fonts so that if your preferred font is not available your CSS file should use the available alternatives. h1,h2,h3,h4,h5,h6{font-family: "Myriad Pro", Helvetica, Arial, Verdana, sans-serif;} h1,h2,h3,h4,h5,h6{font-family: "Myriad Pro", Helvetica, Arial, Verdana, sans-serif;} body{font-family: "Garamond Pro", "Times New Roman", Times, serif;} body{font-family: "Garamond Pro", "Times New Roman", Times, serif;}

But Now … Various methods for using custom fonts Not INSTALLED on end user’s computer Various methods for using custom fonts Not INSTALLED on end user’s computer Self-Hosted: Fonts installed on web server for your domain Self-Hosted: Fonts installed on web server for your domain Purchased from Font Foundry, downloaded to your domain, assembled into a kit” Purchased from Font Foundry, downloaded to your domain, assembled into a kit” If free fonts then you will need to use 3 rd party software to kit and be absolutely sure it is legal for you to use the font this way If free fonts then you will need to use 3 rd party software to kit and be absolutely sure it is legal for you to use the font this way Referenced declaration in CSS Referenced declaration in CSS Sometimes a JavaScript file must also be linked to HTML Sometimes a JavaScript file must also be linked to HTML Hosted: Fonts downloaded from 3 rd party servers Hosted: Fonts downloaded from 3 rd party servers Sometimes free but may include monthly fee for usage Sometimes free but may include monthly fee for usage Google Fonts, Adobe TypeKit Google Fonts, Adobe TypeKit Referenced using link tag in head of HTML Referenced using link tag in head of HTML

Self-Hosted Web Font Kit files Example from MyFonts.com

Self-Hosted, CSS example /*default version*//*default {font-family: ; src: {font-family: 'lovelyFont'; src: url('fonts/lovely_font.eot'); src:url('fonts/lovely_font.otf') format('opentype'); }src:url('fonts/lovely_font.otf') format('opentype'); } /*bold version*//*bold {font-family: ; src: {font-family: 'lovelyFont'; src: url('fonts/lovely_font_bold.eot'); src: url('fonts/lovely_font_bold.otf') format('opentype');src: url('fonts/lovely_font_bold.otf') format('opentype'); font-weight: bold; }font-weight: bold; } p{ font-family:, sans-serif; }p{ font-family: lovelyFont, sans-serif; } strong{font-family:, sans-serif; font-weight: bold; }strong{font-family: lovelyFont, sans-serif; font-weight: bold; }

Hosted Example, Google Open Sans HTML HEAD HTML HEAD CSS CSS P{font-family: 'Open Sans', sans-serif;}P{font-family: 'Open Sans', sans-serif;}

Modular Scale There should be thought given to the relative sizing of a font for a web site. There should be thought given to the relative sizing of a font for a web site. Modular scales add a consistent hierarchy to your typography by making your sizing decisions using numbers from the scale. Modular scales add a consistent hierarchy to your typography by making your sizing decisions using numbers from the scale Decide base font size  14px (default 1em) Decide base font size  14px (default 1em) For example, use the golden ratio of 1 to as your scale For example, use the golden ratio of 1 to as your scale H1 (default 2em, 28) = H1 (default 2em, 28) = H2 (default 1.5em, 21) = H2 (default 1.5em, 21) = H3 (default 1.17em, 16) = H3 (default 1.17em, 16) = H4 (default 1em, 14) = 14 H4 (default 1em, 14) = 14 H5 (default.83em, 11) = H5 (default.83em, 11) = H6 (default.67em, 9) = H6 (default.67em, 9) = 5.348

Fonts: Units of Measure pixel - non responsive absolute unit of measure pixel - non responsive absolute unit of measure Body{font-size:16px;} Body{font-size:16px;} percent - responsive absolute unit of measure dependent on context percent - responsive absolute unit of measure dependent on context Body{font-size:100%;} // correlates to default browser settings, usually 16px Body{font-size:100%;} // correlates to default browser settings, usually 16px em - responsive relative unit of measure dependent on context em - responsive relative unit of measure dependent on context Body{font-size:1em;} // same as size set in HTML font-size declaration or same as default Body{font-size:1em;} // same as size set in HTML font-size declaration or same as default rem – NEW CSS3 responsive relative unit of measure dependent only on root tag (HTML) (browser support got to  rem – NEW CSS3 responsive relative unit of measure dependent only on root tag (HTML) (browser support got to  Body{font-size:1rem;} // same as size set in HTML font-size declaration Body{font-size:1rem;} // same as size set in HTML font-size declaration

Context: em versus rem target pixels/context pixels=result em The em uses the context of parent containers and current container to set size, for example The em uses the context of parent containers and current container to set size, for examplebody{font-size:16px;} h1{font-size:1.5em; //context is body = 16 * 1.5 = 24px line-height:1.25em; //context is h1 = 24 * 1.25 = 30px margin:.5em 0 0 0; } //context is h1 = 24 *.5 = 12px h1{font-size:1.5em; //context is body = 16 * 1.5 = 24px line-height:1.25em; //context is h1 = 24 * 1.25 = 30px margin:.5em 0 0 0; } //context is h1 = 24 *.5 = 12px rem – only context is root tag of document (HTML) rem – only context is root tag of document (HTML) html{font-size:100%;} //default is usually 16pxhtml{font-size:100%;} //default is usually 16px h1{font-size:1.5rem; //context is body = 16 * 1.5 = 24px line-height:1.875rem; //context is h1 = 16 * = 30px margin:.75rem 0 0 0; } //context is h1 = 16 *.75 = 12px h1{font-size:1.5rem; //context is body = 16 * 1.5 = 24px line-height:1.875rem; //context is h1 = 16 * = 30px margin:.75rem 0 0 0; } //context is h1 = 16 *.75 = 12px

Effective Font Stacks Font Stacks are your fallback for a hosted web font that doesn’t load or for the end user not having the font you want to use Font Stacks are your fallback for a hosted web font that doesn’t load or for the end user not having the font you want to use Examples, Are these good font stacks? How can you know? Examples, Are these good font stacks? How can you know? font-family: "Noto Sans", "Myriad Pro", Helvetica, Arial, Verdana, sans-serif; font-family: "Noto Sans", "Myriad Pro", Helvetica, Arial, Verdana, sans-serif; font-family: "Garamond Pro", Georgia, "Times New Roman", Times, serif; font-family: "Garamond Pro", Georgia, "Times New Roman", Times, serif; FFFFallback.com – bookmarklet tool that will allow you to compare our preferred font to an alternate font FFFFallback.com – bookmarklet tool that will allow you to compare our preferred font to an alternate font

Effective Font Stacks: Parts of letterforms to compare for fonts in stack Letter height, x-height and cap height as well as height of crossbars Letter height, x-height and cap height as well as height of crossbars Height of ascenders and descenders Height of ascenders and descenders Letter width, width of counters and loop Letter width, width of counters and loop Tracking and Kerning: Space between letters Tracking and Kerning: Space between letters Line height: space between baselines Line height: space between baselines baseline

FFFFallback used to compare 2 fonts: font in use Verdana VerdanaArial overlay in magenta Trebuchet MS in magentaCalibri overlay in magenta Myriad Pro overlay in magenta Noto Sans overlay in magenta

Readable Line Length Line Length should be in the range of characters Line Length should be in the range of characters Chris Coyier of css-tricks.com has put together a handy bookmarklet that will actually highlight/colorize the 45th through 75 th character of any given line. Chris Coyier of css-tricks.com has put together a handy bookmarklet that will actually highlight/colorize the 45th through 75 th character of any given line. You drag the button up to your bookmarks bar, then click it on any site you want to use it on. You drag the button up to your bookmarks bar, then click it on any site you want to use it on. First you click it to activate it, then you click it on a body copy element (like a paragraph). First you click it to activate it, then you click it on a body copy element (like a paragraph). Then you can resize the window around to see where the line is breaking and try to get it close. Then you can resize the window around to see where the line is breaking and try to get it close.

Bookmarklet Colorizing Readable Line Length – characters 45 to 75 are red in selected content

Miscellaneous Style Rules Drop Cap for first letter of paragraph that follows an h1 Drop Cap for first letter of paragraph that follows an h1 h1+p::first-letter{font-family: “Trajan Pro”, serif; font-size: 4em, float: left; color:#800020; line-height: 0.65; padding: 0.085em 3px 0 0; First line all small caps First line all small caps h1+p::first-line{font-variant: small-caps; letter-spacing: 0.15em;h1+p::first-line{font-variant: small-caps; letter-spacing: 0.15em; Text Shadow Text Shadow h1 {text-shadow: 1px 1px 1px #000;} /* x offset, y offset, blur amount, color-can be expressed as rgba with alpha: rgba(255, 255, 255, 0.4) */

Example: Visually Interesting Use of Fonts H1 H2 H3 p:nth-of-type(1):first-letter

Code for Previous Example ( uses Modular Scale 1:1.618) HTML CSS

Identifying Quality Web Fonts Most fonts provide a font specimen page that we can use to perform browser testing. Most fonts provide a font specimen page that we can use to perform browser testing. Create your own type specimen page using the web font specimen template provided by Tim Brown ( Create your own type specimen page using the web font specimen template provided by Tim Brown ( Viewing these custom specimen pages in a variety of browsers will give you firsthand knowledge as to how the font performs. Viewing these custom specimen pages in a variety of browsers will give you firsthand knowledge as to how the font performs. If you happen to a font you find especially readable while your surfing the web, you can use (Chrome Extension) to identify what font that is, and make a little mental note for future use in your own projects. If you happen to a font you find especially readable while your surfing the web, you can use Whatfont (Chrome Extension) to identify what font that is, and make a little mental note for future use in your own projects. Use (Chrome Extension) to preview a font from the Google collection in use on your own page. Use Google Font Previewer (Chrome Extension) to preview a font from the Google collection in use on your own page.

WhatFont Chrome Extension Inspect and identify web fonts by just hovering on them. It also detects the services used for serving the web fonts. Supports Typekit and Google Font API.

Google Font Previewer Choose a font from the Google font directory and preview it in use on the current tab; includes a few styling options

Partial Example of Web Font Specimen