In Less, it seems almost impossible to use @font-face selector. Less gives errors when I try to use
font-family: my_font
Here is how I try to use it:
@font-face {
font-family: my_font;
src: url('http://contest-bg.net/lg.ttf');
}
p {
font-family: my_font, "Lucida Grande", sans-serif;
}
There is simple escape in Less using ~"..." but can’t come up with working code.
Had someone used it successfully?
Have you tried putting the font family name in single quotes? The following works just fine for me.
To use font as a mixin, try:
then within a style declaration: