![]() |
VOOZH | about |
OpenType Font (.otf) is a font format that was developed by Microsoft and Adobe. It is an extended version of the TrueType font format and it supports advanced typographic features like ligatures, small caps, and many more.
It is more widely preferred over another font format because it is over better cross-platform compactness and includes a wider range of typographic features. OTF can be created using various software tools, including font editors like FontForge. It is widely used in graphic design web design and desktop publishing applications.
Syntax:
@font-face {
font-family: 'MyFont';
src: url('path/to/MyFont.otf') format('opentype');
font-weight: normal;
font-style: normal;
}
Approach:
Example 1: This example describes the basic usage of the .otf fonts on web browsers.
Output:
Example 2: This is another example that describes the use of the .otf fonts on web browsers.
Output:
Note: In order to see the different font formats in the output, you need to download it on your local machine, & then locate & set the path for the downloaded font file in the URL.