Semantic-ui: Google Fonts Causes Timeout in China

Created on 28 Nov 2014  ·  16Comments  ·  Source: Semantic-Org/Semantic-UI

The same problem as in #1296 with [1.0.0]
BTW, I used the file in "dist" folder directly, without compiling.
In IE11, when offline, it is slow, but the font is always nice than in google chrome in which the font is always not nice.

Discussion

Most helpful comment

The site useso.com closed long long time ago, and the solution above (and among other related issues) all not work, please reopen.

All 16 comments

I believe that #1299 is not related with #1296, as those are entirely different bugs.

1299 occurs during build, while #1296 happens when the css files are already built, but external service - namely google - is unavailable on site load.

I have tested it with disabled connection launching a localhost page, and normally browser is aware that internet connection is missing and drops the attempt immediately (Chrome, Windows).
I believe that the best solution to this bug is to provide the ability to specify different service to supply fonts and/or local. This way one could download the css file google supplies under that url and related fonts - and use them from local machine without net access (also allowing development in such environments).
Also playgithub, you might disable @importGoogleFonts before build (set true in themes/default/globals/site.variables, so override in site/globals/site.variables) and adding fonts from local.

Does this still occur when you set @importGoogleFonts: false? Are you developing on a machine without internet connection?

Not set @importGoogleFonts: false yet, I have to learn how to build first.
Cause in my country, google is forbiddened.

Ah yes 防火长城 that makes complete sense then

Yes, and you know chinese, please help about this. I still need the good font.

I've done some travelling through China, but it has been many years since i studied 简化字...

The Chinese firewall causes connections to Google Fonts to timeout.

Try @importGoogleFonts: false and then import fonts from Youziku Font Select which works well in China.
They also have english fonts

OK, the site can be opened now, but very slow, more than 1 minute.


Tried open http://www.youziku.com/, which redirect to http://www.youziku.com/Home/FontSelect, but it can't be opened.
BTW, where can I set @importGoogleFonts: false?

If you're using default gulp build paths, then you should override the value set in Semantic UI themes by placing @importGogleFonts: false; in src/globals/site.variables. This file should be almost empty. If you wish to see all the options that can be overriden there, check themes/default/globals/site.variables (or some other, non-default theme if you've changed it in theme.config)

Is it so important to have webfonts enabled by default? The are some use cases where only the compiled css is available and this causes problems & redundant requests when developing.

+1 @mutil

plz support local css/font.

also, @import will be slow

A quick work-around without customization and building:
modify the semantic.sss in dist folder, change the first line from

@importhttp://fonts.useso.com/css?family=Lato:400,700,400italic,700italic&subset=latin';

to

@importhttp://fonts.useso.com/css?family=Lato:400,700,400italic,700italic&subset=latin';

See: http://blog.minzhang.com/2015/02/change-google-font-cdn-url-to-speed-up-semantic-ui-page-loading/

@minzhang it seem from and to is same string.

@atian25 made a mistake doing copy&paste, should be:

modify the semantic.sss in 'dist' folder, change the first line from

@importhttps://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin';

to

@importhttp://fonts.useso.com/css?family=Lato:400,700,400italic,700italic&subset=latin';

Closing as this appears to be solved with useso replacement

This is still a critical issue if using semantic-ui from a cdn service.

The site useso.com closed long long time ago, and the solution above (and among other related issues) all not work, please reopen.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhaoyao91 picture zhaoyao91  ·  3Comments

ghost picture ghost  ·  3Comments

batata004 picture batata004  ·  3Comments

mixerp picture mixerp  ·  3Comments

playgithub picture playgithub  ·  3Comments