top of page
Search
cassyxlcmus

[CSS] HowTo: Make Your Own WebFont Package in 5 Easy Steps



Inside the Font Awesome Download or package, you'll find the files you need. The /css folder contains the core styling and utilities for all of Font Awesome's families (Classic, Sharp, and Brands) as well as style options (Solid, Regular, Light, Duotone, and Thin). The /webfonts folder contains all of the typeface files that the CSS files depend on.




[ CSS] HowTo: Create a WebFont package




You get a total number of pageviews that can be used per month. This means that you will pay for a number of monthly pageviews, then you'll have to come back to purchase more after your site has been viewed that number of times in a single month. For example, if you purchase 250,000 pageviews per month, when your webpages using the webfonts have been viewed 250,000 times in a single month, you will need to buy the webfont package again for a higher tier of pageviews per month.


You get a total number of prepaid pageviews that can be used over time. This means that you will pre-pay for a number of pageviews, then you'll have to come back to purchase more after your site has been viewed that number of times. For example, if you purchase 250,000 page views, when your webpages using the webfonts have been viewed 250,000 times, you will need to buy the webfont package again for an additional number of prepaid pageviews. Pageviews are valid for 4 years.


Starting a new React project used to be a complicated multi-step process that involved setting up a build system, a code transpiler to convert modern syntax to code that is readable by all browsers, and a base directory structure. But now, Create React App includes all the JavaScript packages you need to run a React project, including code transpiling, basic linting, testing, and build systems. It also includes a server with hot reloading that will refresh your page as you make code changes. Finally, it will create a structure for your directories and components so you can jump in and start coding in just a few minutes.


The executable package will run the installation of create-react-app into the directory that you specify. It will start by making a new project in a directory, which in this tutorial will be called digital-ocean-tutorial. Again, this directory does not need to exist beforehand; the executable package will create it for you. The script will also run npm install inside the project directory, which will download any additional dependencies.


The last two files are used by your package manager. When you ran the initial npx command, you created the base project, but you also installed the additional dependencies. When you installed the dependencies, you created a package-lock.json file. This file is used by npm to ensure that the packages match exact versions. This way if someone else installs your project, you can ensure they have identical dependencies. Since this file is created automatically, you will rarely edit this file directly.


To have full control over our font files, loading, and CSS properties, we can self-host our Google Fonts. Luckily, Mario Ranftl created google-webfonts-helper which helps us do exactly that! It is an amazing tool for giving us font files and font-face declarations based on the fonts, charsets, styles, and browser support you select.


Using your favourite FTP client, create a folder in /wp-content/themes/[CHILD THEME]/ and name it fonts. Then unzip the webfont package, and upload the following files to fonts folder: 2ff7e9595c


0 views0 comments

Recent Posts

See All

Comments


bottom of page