what the best way to add a custom font in HTML page Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
2 posters

    what the best way to add a custom font in HTML page

    Michael_vx
    Michael_vx
    Forumember


    Male Posts : 664
    Reputation : 29
    Language : Arabic and some English
    Location : Egypt

    Solved what the best way to add a custom font in HTML page

    Post by Michael_vx July 27th 2015, 11:12 am

    what the best way to add a custom font in HTML page to work even if the user dose not have the font installed on his OS
    and to force the font i want to be in the page
    with any way
    thanks
    Hello


    Last edited by Michael_vx on July 27th 2015, 12:52 pm; edited 1 time in total (Reason for editing : Solved)
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: what the best way to add a custom font in HTML page

    Post by Ange Tuteur July 27th 2015, 11:56 am

    You can usually import a font with CSS, such as Font Awesome or Google Fonts for example. The domain the fonts are hosted on however, needs to be cross domain. Otherwise, the font cannot be imported to your forum from another website.
    Michael_vx
    Michael_vx
    Forumember


    Male Posts : 664
    Reputation : 29
    Language : Arabic and some English
    Location : Egypt

    Solved Re: what the best way to add a custom font in HTML page

    Post by Michael_vx July 27th 2015, 11:58 am

    i want to custom a HTML page
    and do you mind Explain a bit more
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: what the best way to add a custom font in HTML page

    Post by Ange Tuteur July 27th 2015, 12:08 pm

    Using google fonts for example, click "quick use" and it'll take you to a page with three codes. Since it's an HTML page you're using grab the standard link code and paste it in your head section.

    Example :
    Code:
    <!DOCTYPE html>
    <html>
      <head>
        <title>Page Title</title>
        <meta charset="UTF-8"/>
        <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
      </head>

      <body>

      </body>
    </html>

    Then you can use the font in a inline <style> tag.
    Code:
    <style type="text/css">
    body {
      font-family:'Open Sans', sans-serif;
    }
    </style>
    Michael_vx
    Michael_vx
    Forumember


    Male Posts : 664
    Reputation : 29
    Language : Arabic and some English
    Location : Egypt

    Solved Re: what the best way to add a custom font in HTML page

    Post by Michael_vx July 27th 2015, 12:34 pm

    i understand now Smile
    thanks a lot
    thanks words are not Enough
    i still have much a lot to learn
    thank you again
    this topic is solved
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: what the best way to add a custom font in HTML page

    Post by Ange Tuteur July 27th 2015, 1:10 pm

    You're welcome ^^

    Topic locked

    Google fonts would be the best font serving site that I know of, but I'm sure there may be more if you look. Have a great day ! Smile