Loading font from external website

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
Arty
Registered User
Posts: 971
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Loading font from external website

Post by Arty » Mon May 13, 2013 11:31 am

As you can see on this forum, phpBB 3.1 replaces image buttons like "Post Reply" with CSS buttons. Problem is, font doesn't look good.

There was a long debate on how to fix issue, best solution so far is to use Open Sans web font. You can see it here: http://tracker.phpbb.com/browse/PHPBB3- ... ment-39384 (scroll down to screenshots of Open Sans)

Pull request is here: https://github.com/phpbb/phpbb3/pull/1402 so you can test it yourself.

There is a problem with that solution: Open Sans font is released under Apache 2.0 license that is not compatible with GPL, so it cannot be included in phpBB. Selecting other font won't help because almost all web fonts are released under Apache 2.0 or SIL license, both licenses are not compatible with GPL.

One possible solution is to include font via external link to fonts.googleapis.com.

Upside is Google is serving slightly different code for different browsers, making sure font always works. Another upside is linking to external website might help load page faster because loading that font isn't affected by connections limit.

Downside is intranet forums without internet connection won't be able to use Open Sans. For them browsers will default to Verdana font instead, unless Open Sans is installed on computer.

What do you think? Is linking to third party website an acceptable solution or is there a better solution?
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
DarkBeing
Registered User
Posts: 83
Joined: Sun Jul 19, 2009 2:32 pm
Location: Currently Estonia
Contact:

Re: Loading font from external website

Post by DarkBeing » Mon May 13, 2013 12:12 pm

Just throwing in some thoughts.

I think we had once a discussion about a similar idea about including jQuery from an external source. People seemed partly not so happy with that. I think the problem is, users might not like the idea to have to rely on an external service which they have no control over to have the forum work/look like they want it to. There could be a chance that suddenly that look is changed because the external service goes down or is being blocked (Google & China comes to mind).

In general, I think I could live with this, as it seems only to be a "minor" thing; plus it has a fallback option in case Google goes down or can not be accessed (Intranet).

User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 822
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Loading font from external website

Post by hanakin » Mon May 13, 2013 12:33 pm

+1
however I would argue that if they are using it as an intranet option that they could go ahead and download and serve that font on their own as there would be no legality issues on an internal system as long as its an open source font.

The real concern would be those individuals that can not access google cdn as pointed out by DarkBeing

on the plus side this does open us up to server different fonts to the users of our forums if we wish from the google repository for our themes built into core.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: Loading font from external website

Post by nickvergessen » Mon May 13, 2013 1:04 pm

I don't really like including an external font, but I guess there are not very many fonts available under gpl?
Member of the Development-TeamNo Support via PM

User avatar
Arty
Registered User
Posts: 971
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Loading font from external website

Post by Arty » Mon May 13, 2013 2:27 pm

nickvergessen wrote:I guess there are not very many fonts available under gpl?
Unfortunately no. Fonts are ether available under Apache 2.0 or SIL, both are not compatible with GPL.
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
Un1matr1x
Registered User
Posts: 48
Joined: Mon Sep 07, 2009 10:18 pm

Re: Loading font from external website

Post by Un1matr1x » Mon May 13, 2013 3:32 pm


User avatar
Arty
Registered User
Posts: 971
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Loading font from external website

Post by Arty » Mon May 13, 2013 3:41 pm

Problem with those fonts is we don't know how reliable those fonts are. Fonts available on google web fonts page are the only ones that are properly tested. Fonts available on download websites are usually incomplete or low quality.

I wouldn't use any font that isn't available on google web fonts.
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

Frug
Registered User
Posts: 57
Joined: Thu Jul 02, 2009 3:33 am

Re: Loading font from external website

Post by Frug » Mon May 13, 2013 3:53 pm

I don't think this looks bad, and I believe a theme that ships with the product should value the simplest solution (using veranda in this case).

Senky
Extension Customisations
Extension Customisations
Posts: 298
Joined: Thu Jul 16, 2009 4:41 pm

Re: Loading font from external website

Post by Senky » Mon May 13, 2013 4:51 pm

I think it is ok to link to external file. If file cannot be loaded (what in fact is almost impossible when it is hosted on google servers), it will be replaced by Verdana - font used for now. So no problem.

User avatar
Vinny
Style Customisations
Style Customisations
Posts: 127
Joined: Thu May 20, 2010 4:01 am
Location: Brazil
Contact:

Re: Loading font from external website

Post by Vinny » Mon May 13, 2013 5:49 pm

+1

Post Reply