Sometimes the design team sends you an awesome mockup for a brand new – great looking app, so you need to put all your coding skills to work to make this idea become reality. You know the ins and outs of HTML5 and CSS3, but…
Do you know how to do it the right way?
There was this time I was helping a team of developers to get up and running a bunch of sites, we had the designer’s work done, the application was running smoothly on my computer, but then when I started building those pages, I noticed there were a lot of different font-family values which didn’t make any sense to me because it was about the same font just with different variations in weight and style. I realized we maybe had made a mess in our CSS, so we needed to fix it out the right way.
How to import fonts the right way?
First of all, we need to learn that the way of importing a font into a website is through CSS, this allows us to load fonts to the webpage. Once added to a stylesheet, the rule instructs the browser to download the font from where it is hosted, then it displays the font as specified in the CSS.
Without the rule, our designs are limited to the fonts that are already loaded on the user’s computer, which may vary depending on the system we are using.