Search code examples
htmlcssfont-face

error in digital fonts


@font-face {
    font-family: "digital",digital sans ef medium;
     /* Saf3+, Chrome4+, FF3.5, Opera 10+ */
}

@font-face {
    font-family: "digital",Caviar Dreams Bold;
     /* Saf3+, Chrome4+, FF3.5, Opera 10+ */
}
h1 { font-family: "digital",Helvetica,Arial,sans-serif; font-size:43px; line-height:37px; font-weight:normal;}

h2 { font-family: "digital",Helvetica,Arial,sans-serif; font-size:16px;line-height:14px; font-weight:normal;}

h3 { font-family: "digital",Helvetica,Arial,sans-serif; font-size:16px;line-height:14px; font-weight:normal; color:#c4161c; margin:6px 0 6px 0;}

I have used this css and installed true type fonts through control panel -> fonts, but still these fonts are not working.


Solution

  • I think you have to include the source and format of the font as well. For example:

    @font-face {
    font-family: digital;
    src: url("path-to-the-font-file/digital.otf") format("opentype");
    }