dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Can't Get Font-Family To Be Selected

  1. #1
    Join Date
    Apr 2017
    Posts
    1

    Can't Get Font-Family To Be Selected

    I have this code in my HTML:
    Code:
    <link rel="stylesheet" type="text/css" href="css/firstbigletter.css" />
    With this CSS, I correctly get the first font (TypoUpright BT) to be displayed as the first letter in this paragraph on this page:

    Code:
    .firstbigletter {
    font-family:"TypoUpright BT", "Times New Roman", serif;
    font-size:45px;
    font-weight:normal;
    line-height:80%;
    letter-spacing:-6px;
    }
    However, when trying other fonts, using this modified CSS code, I do not get the first font-family. I don't even get the TypoUprightBT anymore. It just defaults to something plain:

    Code:
    .firstbigletterT {
    font-family: "Palace Script MT", "TypoUpright BT", Gigi, Harrington;
    font-size:45px;
    font-weight:normal;
    line-height:80%;
    letter-spacing:-6px;
    }
    I have tried other variations - e.g.

    Code:
    font-family: Mistral, "TypoUpright BT", Gigi, Harrington;
    and

    Code:
    font-family:  Gigi, "TypoUpright BT", Harrington;
    all of which also fail to select any of the fonts, just defaulting to something plain.

    I would appreciate if someone would tell me what I am doing wrong in the latter examples and that only the very first code works.

    Note:
    I am trying this on my own machine using CSS to see the results. I am not trying to get these fonts to be loaded/displayed on a user's (reader's) machine with CSS3 (they would likely be blocked by users anyway).
    Control Program shows all of these fonts are installed on my machine (W7).

    Thank you

  2. #2
    Join Date
    Apr 2017
    Location
    Bangalore
    Posts
    33
    You have to either include webfonts or custom fonts.
    Webfonts in head part of HTML and for custom fonts, you need to import fonts family from fonts folder.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles