skip to Main Content

change this text :

𝙵𝚘𝚛 𝚊𝚕𝚕 𝚝𝚑𝚎 𝚐𝚘𝚘𝚍 𝚝𝚒𝚖𝚎𝚜

to

For all the good times

i try with font family but not working

.custom-font{
font-family: 'SF Pro Display', sans-serif !important;
}
<div class="custom-font">𝙵𝚘𝚛 𝚊𝚕𝚕 𝚝𝚑𝚎 𝚐𝚘𝚘𝚍 𝚝𝚒𝚖𝚎𝚜</div>

4

Answers


  1. To change the font, you have to set the "font-family" CSS property of the element.
    If it’s a paragraph, set it to the paragraph. If it’s an anchor tag in the paragraph, set it to it.

    If you’re trying to set a font that is usually available, this method should be enough: https://www.w3schools.com/cssref/pr_font_font-family.php

    If you’re trying to add a custom font, this method is required:
    https://www.w3schools.com/cssref/css3_pr_font-face_rule.php

    You have to have in mind the font formats, a list and description can be found here:
    https://www.w3schools.com/css/css3_fonts.asp

    Login or Signup to reply.
  2. Best to use @font-face i think, importing the font of your choice if you wish

    Login or Signup to reply.
  3. Have you loaded your font using <link> or is it local?
    If it’s local – add @font face to your css like this:

    @font-face {
    font-family:’your font name’;
    src:url(../path to font) format("font format"),url(../path to font) format("font format");
    }

    Change name, paths and format accordingly.

    Login or Signup to reply.
  4. It appears Apple fonts don’t work exactly like Google fonts. This article explains the issue and a potential workaround.
    https://www.geeksforgeeks.org/how-to-add-apples-new-san-francisco-font-on-a-webpage-using-css/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search