How to disable Google Fonts on your website

The problem check the source code by viewing your website.
Click “View Source”

Then click the link on any “.css” at the top or search for “googlefontapis.com”

In the .css file you can see this:

#before doing any of this backup your original .css

@import url(“https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,800”);

This is a problem and what stops your site from being viewed in China!  Since CSS files are usually called first before even displaying html this is why your users think the site is blocked or why you may falsely believe your site is blocked when it is simply the CSS font URL call that is causing it.

How to fix it:

For each Google Font Api download it as a file for example above manually entering this into your browser.
Or you can use this command in Linux:

wget https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,800
Save the file as “compevo-google-css.css” or whatever you like:

Inside the file you will see the following:

@font-face {
font-family: ‘Open Sans’;
font-style: italic;
font-weight: 400;
src: local(‘Open Sans Italic’), local(‘OpenSans-Italic’), url(https://fonts.gstatic.com/s/opensans/v15/xjAJXh38I15wypJXxuGMBp0EAVxt0G0biEntp43Qt6E.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 400;
src: local(‘Open Sans Regular’), local(‘OpenSans-Regular’), url(https://fonts.gstatic.com/s/opensans/v15/cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 700;
src: local(‘Open Sans Bold’), local(‘OpenSans-Bold’), url(https://fonts.gstatic.com/s/opensans/v15/k3k702ZOKiLJc3WVjuplzInF5uFdDttMLvmWuJdhhgs.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 800;
src: local(‘Open Sans ExtraBold’), local(‘OpenSans-ExtraBold’), url(https://fonts.gstatic.com/s/opensans/v15/EInbV5DfGHOiMmvb1Xr-honF5uFdDttMLvmWuJdhhgs.ttf) format(‘truetype’);
}

#########

for each url download the font manually:

Based on the above I made a quick script to help:

for font in `cat cssgoogle.css|grep “.ttf”|cut -d “,” -f 3|awk ‘{print $1}’|sed s#url\(##g|sed s#\)##g`; do
wget –no-check-certificate $font
done

#will download all the fonts like below

https://fonts.gstatic.com/s/opensans/v15/xjAJXh38I15wypJXxuGMBp0EAVxt0G0biEntp43Qt6E.ttf
https://fonts.gstatic.com/s/opensans/v15/cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf
https://fonts.gstatic.com/s/opensans/v15/k3k702ZOKiLJc3WVjuplzInF5uFdDttMLvmWuJdhhgs.ttf
https://fonts.gstatic.com/s/opensans/v15/EInbV5DfGHOiMmvb1Xr-honF5uFdDttMLvmWuJdhhgs.ttf

#comment out the original

@import url(“https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,800”);

#add the following modified code to the top of the original css file:
Change the paths to suit where you downloaded these .ttf files:
#in general you are going to be searching and replacing “https://fonts.gstatic.com/s/opensans/v15/” with “/some/to/your/ttffonts”

@font-face {
font-family: ‘Open Sans’;
font-style: italic;
font-weight: 400;
src: local(‘Open Sans Italic’), local(‘OpenSans-Italic’), url(/design-2017-zf/assets/css/xjAJXh38I15wypJXxuGMBp0EAVxt0G0biEntp43Qt6E.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 400;
src: local(‘Open Sans Regular’), local(‘OpenSans-Regular’), url(/design-2017-zf/assets/css/cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 700;
src: local(‘Open Sans Bold’), local(‘OpenSans-Bold’), url(/design-2017-zf/assets/css/k3k702ZOKiLJc3WVjuplzInF5uFdDttMLvmWuJdhhgs.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 800;
src: local(‘Open Sans ExtraBold’), local(‘OpenSans-ExtraBold’), url(/design-2017-zf/assets/css/EInbV5DfGHOiMmvb1Xr-honF5uFdDttMLvmWuJdhhgs.ttf) format(‘truetype’);
}

Losing Chinese Business Because of 2 Simple Mistakes

This is not an article about the market condition in China but more of a practical reality that I think most people and businesses have not considered. If you read the news you’ll feel the first impediment to business in China is going to be regulations or that your website may be blocked by the GFW (Great Firewall of China). However in practical terms this is something you’ll almost never encounter. There are however 2 simple but huge, crucial and critical mistakes that most businesses make when trying to attract prospective Chinese customers for overseas or cross-border e-Commerce.

#1 Common Mistake That Guarantees No Customers From China Will Ever Reach Your Site
Everyone knows Google has extensive reach in various online services and platforms including search but their reach goes farther in a very harmful way for anyone trying to get Chinese visitors to their website. This issue applies to almost any user in China whether they are a local or foreigner and whether you are hosting in China, Hong Kong or anywhere outside. This problem can only be resolved by an experienced web developer or team and is a mistake MOST developers unknowingly make.

This little mistake comes from the fonts specified in CSS (Cascading Style Sheets) that are used to style and/or layout all websites on the internet. CSS itself is not the problem, but what is the problem is that a lot of designers use “Google Font APIs” from googleapis.com. This is a bad idea in my opinion aside from the main reason which is that you rely on a third outside party to make sure your website loads. If the remotely hosted fonts cannot be loaded due to a change in location or the server goes down, your website will not load. In the case of China on virtually all consumer grade connections “googleapis.com” is blocked, this means the third party font server is as good as down and your website WILL not load in China because of it.

Essentially what this means is that any website using Google Font APIs will not work in China no matter where it is hosted. The solution is to edit your CSS code and use alternative fonts, or to manually download the .ttf and edit your .css files.

#2 Hosting your site outside of Mainland China or Hong Kong is too slow
For those who have ever visited China, loading sites abroad such as in the US or even worse in Europe is a very difficult hit and miss experience. While most sites are actually not blocked by the GFW, a good portion of sites and services are unusable due to poor connectivity between China and a lot of ISPs. This can be solved somewhat with premium bandwidth that we use in China but really the best solution is to host your site in Mainland China or Hong Kong.

For those familiar with China, you will know that you need an ICP license from the Ministry of IT. This is not a problem if you have a presence in China or a friend who can help. But really the only legal way is to get a proper ICP license which means based on your business and not a personal ICP (we have seen these revoked for misuse). To make it short, if you don’t have an ICP in China your site will not work and will be blocked. So hosting your website in China is only an option if you have an ICP license.

The next best thing is Premium bandwidth from Hong Kong with direct China connectivity which is almost as good as being in Mainland China. But note the “Premium Bandwidth” and “Direct China Connectivity” because only some providers have this. Bandwidth is very expensive in Hong Kong and the only way providers can save money is by buying non-premium bandwidth that routes all China traffic through the USA. For cost it makes sense for those providers, but for you the end user and business who wants to have Chinese customers it doesn’t make sense unless you have direct China peering/connectivity. If you have a good connection to China from Hong Kong then users can essentially expect your site to perform as if it’s in Mainland China, in fact most users will probably feel it is located in China because of the low latency and fast response. In Hong Kong there is no requirement for an ICP license so this is really the best method for those who can’t the ICP license in China.

Don’t Lose Out
For companies who have targeted the Chinese market and have attempted to drive traffic to their own website or third party portal if you haven’t received the response you’ve expected the above could very well be why you have no Chinese customers. In another blog post I will show a few technical examples of how to fix it and still use Google Font APIs although the easiest, quickest fix is to stop using them.