I use @ font-face mixin with Compass (0.11.b.1) and cannot determine my bold and italic fonts.
I can successfully download and use fonts with the following code:
@include font-face("PTSerif", font-files("/path/to/font/PTF55F_W.ttf", truetype), "/path/to/font/PTF55F_W.eot");
However, I cannot find a way to identify bold. The source says the style argument is out of date, and trying to use it does not affect the output .css file.
@mixin font-face($name, $font-files, $eot: false, $postscript: false, $style: false) {
@if $postscript or $style {
@warn "The $postscript and $style variables have been deprecated in favor of the Paul Irish smiley bulletproof technique."; }
@font-face {
font-family: quote($name);
@if $eot {
src: font-url($eot); }
src: local("☺"), $font-files; } }
I currently have two alternatives:
- Edit the .css files. Not suitable for maintainability.
Define different fonts for different styles (also not ideal, but mos are currently functional), for example.
@include font-face ("PTSerif")
@include font-face ("PTSerif-B")
Could not find examples of how to do this properly: the ability to use font-weight: bold;
.