@font-face not working on chrome but works on other browsers
Simplest supported loading of a font on the web today. Only need one font file and it needs to be used.
Two CSS rules and a HTML tag.
Microsoft was the holdout for TTF although they were part of building the TTF. All systems have the license to use TTF and caniuse reports all browsers supporting it.
Note this does not mean you can use anybodies licenced font. It means you can use TTF to display the font.
OTF is open license so no license is required and supported by all systems including Microsoft edge.
Not sure of the status of Woff and SVG is not supported by Chrome.
@font-face {
font-family: "Logo";
src: url("/fonts/logo.ttf"); /* or url("/fonts/logo.otf") */
}
.logo {
font-family: Logo;
font-size: 80px;
font-weight: normal;
}
<h1 class="logo">
Browsers don't download the font until they need to use the font. But the font can be downloaded with Javascript if one does not like the normal behavior.
Font Face is not working except on Chrome
Try having to format as opentype
. Your using an Open Type font so you need to specify which format to use.
@font-face{
font-family: 'Lufga';
src: url("../styles/Lufga-Regular.otf") format("opentype");
font-style: normal;
font-weight: normal;
}
Font-Face is not working with Chrome
Just a little syntax change. This will work for you:
@font-face {
font-family: 'headline';
src: url('../fonts/headline.eot');
src: url('../fonts/headline.eot?#iefix') format('embedded-opentype'),
url('../fonts/headline.woff') format('woff'),
url('../fonts/headline.ttf') format('truetype'),
url('../fonts/headline.svg#open_sanslight') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face not working on Chrome or Safari
Try it without the single quotes:
@font-face{
font-family: playtime;
src: url('../fonts/font-1.otf') format('opentype');
}
p.playtime-font {
font-family: playtime;
font-size: 3em;
}
If this doesn't work, is your console saying anything?
Related Topics
How Do Browsers Parse/Render CSS
CSS Selector to Check That Attribute Does Not Contain Both Values
Custom Font Sometimes Renders in Italics in Ie8/Ie7
Gulp-Sass Work Around for Load_Path Support
Remove Dotted Border/Outline of Focused Dropdown Menu
CSS Rules for Webkit Based Browsers
CSS Transform Square into Thinner Rhombus
How to Capitalize First Letter Only Using CSS in Each Case
How to Change Active Link Color in Bootstrap CSS
Diamond Menu Items Using CSS and Svg
How to Align Input and Label from Collection_Check_Boxes
How to "Hack" The Thunderbird Lightning Extension to Fully Color Categories
How Necessary Are CSS3 Vendor Prefixes Right Now