Modify a reference to Google fonts in the Semantic UI

Source: Internet
Author: User

After the first attempt to Semantic the UI, the first line in its CSS was found, referencing the font in the fonts.googleapis.com.

Do not know why to do so, perhaps in foreign countries, Google's services are a kind of internet infrastructure?

But in China, all understand, this will greatly slow down the loading speed of the site, and even loading error.

In fact, there is a situation, is completely offline website, and the Internet disconnected, always can not connect to Google to download fonts Bar ~

To find a solution to this problem in the process, found a website (https://google-webfonts-helper.herokuapp.com/fonts), you can easily download Google's fonts, do not need their own strenuous to pick up.

But fortunately, the Semantic UI provides a switch to this feature.

In the Themes\default\globals\site.variables file in the SRC folder

You can find such a line of configuration:

@importGoogleFonts: true;

Well, change this to false.

By the way, there is a line configuration on it:

@fontName          : ' Lato ';

This is the original from Google to refer to the name of the font, you can change it to the name of the font you want to use (in fact, there is almost nothing in Chinese font optional, is not the YA-black Arial boldface in italics these few ...) )

About the way to customize font files, have not studied, Chinese fonts generally do not consider this kind of thing, the font file is too large, encounter special situation to study it again.

Yes, after the modification, remember Gulp build to get the latest compilation files. (This change only affects the CSS file and does not affect the JS file)

Modify a reference to Google fonts in the Semantic UI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.