Css font-face failed to load ttf font file

css font-face failed to load ttf font file

OTS parsing error: OS/2: Failed to parse table

the code is as follows:

@font-face{
    font-family: "PlainWhite";
    src: url("res/font/PlainWhite.ttf") format("truetype")
}

errors are as follows:

Mar.10,2021

1. Post the code related to the error

  1. post an error message
  2. post your font and other referenced configuration information

No one can answer such a question


stackoverflow has the answer;
https://stackoverflow.com/que..
font formats need to be compatible, and you need multiple fonts to cope with multiple locations. Use https://transfonter.org/ this . Css plus these

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?-sharpiefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg-sharpsvgFontName') format('svg'); /* Legacy iOS */
}
Menu