I am in the process of creating a new website that offers SMS services through clickatell. This website includes various font families that may not be defined on the client's computer. For instance, if the site is accessed from a different computer, the font may default to a standard option. I have familiarity with using the font-face
property in CSS
, but it does not seem to be functioning correctly. Below is a sample test code I have been working with:
<html>
<head></head>
<style>
@font-face {
font-family: 'oswald_stencilregular';
src: url('/protected/extensions/Fonts/oswald/Oswald-Light.otf');
font-weight: normal;
font-style: normal;
}
</style>
<body>
<div style='font-family:oswald_stencilregular'>
give me my font
</div>
</body>
</html>
As you can see, this code appears straightforward, yet the text "give me my font" does not display in the specified font. I have properly installed the font and set the correct file path in the code. Even after thorough research and testing, the font declaration seems to be ineffective. Are there alternative methods to declare a font on the server side so that clients do not need the specific font installed on their machines to view it as intended?