How to use “Wedding text ” in Css font family?

2019-09-05 17:52发布

问题:

i am going to print one student certificate . but according to customer requirement they want "wedding text". can i use wedding text for my font ? how to use it in css ?

I have downloaded one package and used it in text editor .

<p style="font-family:'A Dark Wedding';">Akila H Joshef </p>

回答1:

  • Step 1:
    Convert you font to the uni format here.

  • Step 2:
    Upload your new fonts to the folder of your web.

  • Step 3:
    Use CSS @font-face. Manual here.

  • Step 4:
    Use CSS font-family: 'MyNewWeddingFont';.



回答2:

Try this

@font-face {
     font-family: myFont;
     src: url(font_name.extenstion);
    }

div {
  font-family: myFont;
    }


回答3:

Convert your font to all cross browser font formats using Font Squirrel

You can convert fonts and download @font-face css too.
Example @font-face CSS:

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') 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#svgFontName') format('svg'); /* Legacy iOS */
}