Permlink Replies: 26 - Pages: 2 [ 1 2 | Next ] - Last Post: 14-Jun-2013 13:20 Last Post By: Laza
jGromit

Posts: 7,815
Registered: 31-Jan-2006
Web Open Font Format
Posted: 01-Jun-2013 16:11
  Click to reply to this thread Reply
Something that had escaped my notice, until I stumbled on a user incorporating it into a Turtle album - thought I'd pass on what I've learned to other skin developers:

Web Open Font Format (WOFF) file support is now almost universal. Among current browsers, there are only three that don't support WOFF:

  • IE8 (it's "current" in that a WinXP user can't get any newer version of IE) ignores it, and just falls back to the normal font stack.
  • Opera Mini does the same (I believe).
  • Ditto for the Android browser. Note, however, that Chrome and Firefox for Android do support WOFF.

See: http://caniuse.com/woff

In short, this provides a solution to the long-standing problem of using unusual fonts in web pages. I've built WOFF support into the latest version of Gromit, and will soon do the same for Matrix (with more granularity). The Gromit manual write-up on the subject:

http://gromit.earlyout.org/manual/#gromit_woff-files

And a couple of demo albums... In both cases, the titles are using a font that it's safe to assume you don't have installed on your PC:

http://earlyout.jalbum.net/fontDemo/ - uses "Dubtronic Solid" for the title, regular web-safe "Trebuchet" font stack for other text.

http://gromit.earlyout.org/demo2/ - uses "Alex Brush Regular" for the title, regular web-safe "Comic Sans" font stack for the other text.

The trickiest aspect of it is getting the WOFF file into the album project. I'm using the same routines I developed for adding background images and music tracks. If anyone's really interested, let me know, and I can probably put together a stripped-down demo skin to show how it's done (I'm using a compiled user interface - I'm not sure the way I'm doing it is possible with a regular BeanShell onload.bsh).

It is possible to link to WOFF files from external sources like Google, but I'm not a big fan of producing albums that crash to the ground when someone else's server is having a nervous breakdown, or when "the cloud" is stormy. I want the files that constitute my pages sitting on my own server, if at all possible.
davidekholm

Posts: 3,515
Registered: 18-Oct-2002
Re: Web Open Font Format
Posted: 04-Jun-2013 14:01   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
Cool. I didn't know about WOFF until this reading.
jGromit

Posts: 7,815
Registered: 31-Jan-2006
Re: Web Open Font Format
Posted: 04-Jun-2013 14:07   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
Cool. I didn't know about WOFF until this reading.

It snuck up on me. I knew that people were trying to find a way around the problem, but I didn't know things had gotten this far. I've now incorporated it into Matrix, too. The text on the index page on this album is something called "Kelly Slab," and the text on the slide images is regular web-safe Georgia:

http://matrix.earlyout.org/custom1/
davidekholm

Posts: 3,515
Registered: 18-Oct-2002
Re: Web Open Font Format
Posted: 04-Jun-2013 15:56   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
It's really cool. I wonder if one can open such fonts from within Java too and display such text in the UI...
jGromit

Posts: 7,815
Registered: 31-Jan-2006
Re: Web Open Font Format
Posted: 04-Jun-2013 17:24   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
I wonder if one can open such fonts from within Java too and display such text in the UI...

Maybe, but that would defeat the purpose. Remember, the problem is that fonts are almost always copyrighted. WOFF provides a way of displaying them in a browser, while not actually making them available on the visitor's computer.

A lot of the fonts that are available in WOFF format are free of copyright anyway. In those cases, you can just download the TTF version and install it on your PC, like any other installed font.
davidekholm

Posts: 3,515
Registered: 18-Oct-2002
Re: Web Open Font Format
Posted: 05-Jun-2013 22:01   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
Ok, thanks for explaining.
Dschuwi

Posts: 442
Registered: 12-Nov-2003
Re: Web Open Font Format
Posted: 12-Jun-2013 16:23   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
EarlyOut wrote:
Remember, the problem is that fonts are almost always copyrighted. WOFF provides a way of displaying them in a browser, while not actually making them available on the visitor's computer.

If I understand this right, when a web page makes use of WOFF, it needs to access the *.woff files on the server, thus they need to be downloaded and made available on the visitor's computer. Furthermore, if a skin wants to use WOFF, it needs to bundle the *.woff files, so this might raise licensing issues anyway.
jGromit

Posts: 7,815
Registered: 31-Jan-2006
Re: Web Open Font Format
Posted: 12-Jun-2013 16:31   in response to: Dschuwi in response to: Dschuwi
  Click to reply to this thread Reply
But you're not actually installing the font on your computer. I think that's the crucial distinction. If a font developer has made his font available in WOFF format, he's saying, "you may use this on web pages. Nowhere else." And that's all a .woff file is good for - styling text on a web page.

I'll wager, however, that there are hackers out there who could reverse-engineer the format to yield an installable font file. As with images, protecting intellectual properly rights on the 'net is damn near impossible.
Dschuwi

Posts: 442
Registered: 12-Nov-2003
Re: Web Open Font Format
Posted: 12-Jun-2013 16:51   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
We as skin developers donot only use a font on web pages, we rather distribute it. This might all be fine, as long as it is covered by the font's license. I'm only meaning to be careful.
jGromit

Posts: 7,815
Registered: 31-Jan-2006
Re: Web Open Font Format
Posted: 12-Jun-2013 17:02   in response to: Dschuwi in response to: Dschuwi
  Click to reply to this thread Reply
Dschuwi wrote:
We as skin developers donot only use a font on web pages, we rather distribute it.

But that's exactly what the WOFF format is for - it's a way to provide a font on a web page that isn't installed on the visitor's PC. It is intended for distribution - that's the only way it can work. Other than using images of text, there's no other way of using non-web-safe fonts on a page. That's why it's called Web Open Font Format.

Now if you take a copyrighted font, produce your own WOFF file for it, and then use it, you're into "infringement" territory. You should use only WOFF files that are being provided by the font developer, or that you create from fonts that are clearly labeled "free."
Dschuwi

Posts: 442
Registered: 12-Nov-2003
Re: Web Open Font Format
Posted: 13-Jun-2013 09:40   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
EarlyOut wrote:
davidekholm wrote:
I wonder if one can open such fonts from within Java too and display such text in the UI...

Maybe, but that would defeat the purpose. Remember, the problem is that fonts are almost always copyrighted. WOFF provides a way of displaying them in a browser, while not actually making them available on the visitor's computer.


EO, if there is a copyright isssue for jAlbum when using WOFF for the UI, then there is most probably the same issue for skins, too.

As you mentioned, the safest way is to use copyright free fonts, which could then be used in the UI as well, if technically possible.
jGromit

Posts: 7,815
Registered: 31-Jan-2006
Re: Web Open Font Format
Posted: 13-Jun-2013 13:07   in response to: Dschuwi in response to: Dschuwi
  Click to reply to this thread Reply
You can't use a WOFF font in the UI. It won't work. It can be used only in a web page.
jimberry

Posts: 528
Registered: 30-Aug-2004
Re: Web Open Font Format
Posted: 13-Jun-2013 14:18   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
Even if you could, why would you bother?
Surely the default fonts in any OS would be sufficient for a UI?
jGromit

Posts: 7,815
Registered: 31-Jan-2006
Re: Web Open Font Format
Posted: 13-Jun-2013 14:32   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
Exactly.
Dschuwi

Posts: 442
Registered: 12-Nov-2003
Re: Web Open Font Format
Posted: 13-Jun-2013 16:00   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
jimberry wrote:
Even if you could, why would you bother?
Surely the default fonts in any OS would be sufficient for a UI?

Surely the default fonts in any OS are sufficient for a web page as well ... they have been sufficient for over 20 years ;-)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums