XML technologies / ePUB / ePub für (In)Designer / Embedded fonts and special characters / Font styles and weights

(Excerpt from “ePub für (In)Designer — Mit InDesign Schritt für Schritt zum E-Book” by Sascha Heck & Yves Apel)

So far only font names were specified, showing Regular or Normal. Add two code lines for italic or bold text.

Italics use the code font-style: italic;. For font-style normal | italic | oblique | inherit (inherits the parent element’s font style) can be used.

Bold uses the code font-weight: bold;. For font-weight normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit can be used.

Combine both to specify bold italics.

p.Regular {      
     font-family: "Times New Roman", serif;
     font-weight: normal;
     font-style: normal;
  }
      
p.Bold {
     font-family: "Times New Roman", serif;
     font-weight: bold;
     font-style: normal;
  }
      
p.Italic {
     font-family: "Times New Roman", serif;
     font-weight: normal;
     font-style: italic;
  }
      
p.Bold-Italic {
     font-family: "Times New Roman", serif;
     font-weight: bold;
     font-style: italic;
  }

  

 

 

 

back to top