Loading font from external website

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.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
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Loading font from external website

Post by Arty »

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?

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 »

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
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Loading font from external website

Post by hanakin »

+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.
Donations welcome via Paypal Image

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 »

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
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Loading font from external website

Post by Arty »

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.

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

Re: Loading font from external website

Post by Un1matr1x »


User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Loading font from external website

Post by Arty »

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.

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

Re: Loading font from external website

Post by Frug »

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: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Loading font from external website

Post by Senky »

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: 129
Joined: Thu May 20, 2010 4:01 am
Location: Brazil
Contact:

Re: Loading font from external website

Post by Vinny »

+1

Post Reply