Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Webfont font family avoiding faux-bold/italics

Webfont font family avoiding faux-bold/italics

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 641 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • daniD Offline
    daniD Offline
    dani
    wrote on last edited by
    #1

    Hi Forum,

    I Want to use the font family Garamond (included on Mac).
    The webfont is a backup for those who don’t have Garamond on the system (the mac default version).
    So I converted and uploaded the files.

    garamond.woff
    garamond-italic.woff
    garamond-bold.woff

    PROBLEM: faux italics, faux bold

    I want Garamond to act as a font-family with specific character sets for italic and bold.

    I found this article that proposes a fix:

    http://www.metaltoad.com/blog/how-use-font-face-avoid-faux-italic-and-bold-browser-styles

    And here is my CSS

    • {
      font-family: ‘Garamond’;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      }

    @font-face {
    font-family: ‘Garamond’;
    src: url('http://www.anneslacik.com/wp-content/uploads/Garamond.woff');
    font-weight: normal;
    font-style: normal;
    }
    @font-face {
    font-family: Garamond;
    src: url('http://www.anneslacik.com/wp-content/uploads/Garamond-Italic.woff');
    font-weight: normal;
    font-style: italic;
    }
    @font-face {
    font-family: Garamond;
    src: url('http://www.anneslacik.com/wp-content/uploads/Garamond-Bold.woff');
    font-weight: bold;
    font-style: normal;
    }

    I left the Text Format font feild blank.

    So my questions:

    1. Is there a way to do this within the text formats?
    2. is this going to cause any conflicts?

    Thanks,
    Daniel

    https://danielcampbell.ca

    1 Reply Last reply
    1
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by arminunruh
      #2

      Hey Daniel!

      When you create a textformat, for each textformat it says: "HTML Class _NAMEOFFORMAT"
      The html class is basically always the name with an underscore _ before it. So if you want to add extra css to a textformat:

      ._Default{
      font-weight: normal;
      font-style: normal;
      }

      Not sure if that helps with your problem as I haven't read the article that you linked.
      Italic and font-weight is setable with textformats too.

      1 Reply Last reply
      0
      • daniD Offline
        daniD Offline
        dani
        wrote on last edited by
        #3

        Hi Armin,
        Yes, that helps. I'll add to existing CSS instead of trying to override it with universal selector.
        Have a good day!

        https://danielcampbell.ca

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        I also code custom websites or custom Lay features.
        💿 Email me here: 💿
        info@laytheme.com

        Before you post:
        1. When using a WordPress Cache plugin, disable it or clear your cache.
        2. Update Lay Theme and all Lay Theme Addons
        3. Disable all Plugins
        4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

        This often solves issues you might run into

        When you post:
        1. Post a link to where the problem is
        2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
        3. If the problem is difficult to explain, post screenshots / link to a video to explain it
        Online Users
        A
        alasdair17
        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
        laytheme.com
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Search