In CSS, it is a rule that specifies a custom font. This allows us to expand our scope beyond the web-safe fonts.
In this rule, @font-face must be first defined and then webpage elements can be made to refer to it as required.
To define multiple font files under the same font name.
Framing this in a more understandable way, what we are trying to do here is that if we want to display a specific font in multiple other ways like bold, italics, etc. traditionally we must define them separately. But, here we will look at a way to combine these font files in a single font name.
The following example shows how different font files with the same are usually employed:
In the above program for each font file of the same font, we had to define multiple files with different names and then refer them accordingly.
The piece of code depicts how just by using a single font name multiple files can be used.
These changes need to be done in the extracted CSS file of a specific font file.
- How to select and upload multiple files with HTML and PHP, using HTTP POST?
- SASS | Use variables across multiple files
- How to Select Multiple Files using HTML Input Tag ?
- How to Add Apple's new San Francisco font on a Webpage using CSS ?
- How to Add and Remove multiple classes in jQuery ?
- How to Add Dynamic Options for Multiple Selects Inside ng-repeat Directive ?
- How to open a PDF files in web browser using PHP?
- Creating a dataframe using Excel files
- Deleting all files from a folder using PHP
- How to include() all PHP files from a directory ?
- Perl | Creating Excel Files
- How to recursively delete a directory and its entire contents (files + sub dirs) in PHP?
- HTML | DOM Input FileUpload files Property
- How to upload files asynchronously using jQuery?
- Perl | Reading Excel Files
- Minification of CSS files
- How to count files in a directory using PHP?
- Writing CSV files in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.