Forum How do I...?

Need to render Italic+bold font-face

pramodtiwari
I need to display Italic+bold font. I am using @font-face style but I'm not getting italic+bold. It return bold only.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<style>
.formatted_text.font_weight\:bold {
font-weight: bold;
}
@font-face {
font-family: arial;
font-style: normal;
font-weight: normal;
src: url("../fonts/arial-unicode-ms.ttf");
}
@font-face {
font-family: arial;
font-style: normal;
font-weight: bold;
src: url("../fonts/arial-unicode-ms.ttf");
}
@font-face {
font-family: arial;
font-style: italic;
font-weight: normal;
src: url("../fonts/arial-unicode-ms.ttf");
}
</style>
</head>
<body>
<span>In your response you should do the following:</span>
<div>
<span class="formatted_text">Italic bold</span>
</div>
</body>
</html>
howcome
Try adding this line to the style element:

span.formatted_text { font-weight: bold; font-style: italic }

You can learn more about the font properties from here:

https://www.w3schools.com/cssref/pr_font_font.asp

Edited by mikeday