font.ubuntu.com needs the font hosted for web embedding

Bug #655305 reported by Alan Bell
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-font-family-website
Fix Released
Wishlist
Paul Sladen

Bug Description

See:

  http://font.ubuntu.com/web/
  http://code.google.com/webfonts/family?family=Ubuntu

Original report:

http://font.ubuntu.com currently provides the font in source form and in a zip archive of .ttf files. In order to be used as embedded fonts linked in web pages using CSS with @font-face each .ttf needs to be individually served.

Microsoft only supports web fonts in its proprietary EOT format. There does not appear to be a packaged tool to convert from TTF to EOT however this code looks like it should do the trick. http://code.google.com/p/ttf2eot/

http://hacks.mozilla.org/2009/06/beautiful-fonts-with-font-face/
http://openfontlibrary.org/wiki/Embedded_OpenType
http://openfontlibrary.org/wiki/Web_font_linking_with_@font-face

There should be some copy and pasteable text on the home page of http://font.ubuntu.com for web designers to use. Something like this:

@font-face {
  /* Regular */
  font-family: "UbuntuNormal";
  src: url("http://font.ubuntu.com/Ubuntu-R.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-variant: normal;
  font-stretch: normal;
}@font-face {
  /* Bold */
  font-family: "UbuntuBold";
  src: url("http://font.ubuntu.com/Ubuntu-B.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-variant: normal;
  font-stretch: normal;
}@font-face {
  /* BoldItalic */
  font-family: "UbuntuBoldItalic";
  src: url("http://font.ubuntu.com/Ubuntu-BI.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-variant: normal;
  font-stretch: normal;
}@font-face {
  /* Italic */
  font-family: "UbuntuItalic";
  src: url("http://font.ubuntu.com/Ubuntu-I.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-variant: normal;
  font-stretch: normal;
}

Google font directory takes a slightly different approach and dynamically generates a little css stylesheet depending on the browser, e.g.
http://fonts.googleapis.com/css?family=Cantarell&subset=latin

Revision history for this message
Alan Bell (alanbell) wrote :

it may be necessary to make sure the mimetype is correct, so put this in .htaccess in the directory with the fonts
 AddType application/octet-stream .ttf .eot

description: updated
Alan Bell (alanbell)
description: updated
Revision history for this message
Alan Bell (alanbell) wrote :

The askubuntu.com stack exchange site is now using the ubuntu font as a webfont that they are hosting.
http://sstatic.net/askubuntu/all.css?v=7710c2ff227d
@font-face{font-family:'UbuntuRegular';src:url('img/ubuntu-r-webfont.eot');
src:local('☺'),
url('img/ubuntu-r-webfont.woff') format('woff'),
url('img/ubuntu-r-webfont.ttf') format('truetype'),
url('img/ubuntu-r-webfont.svg#webfontG9slIgrl') format('svg');

I would kind of rather point various websites at a hosted font that would get updates.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 655305] Re: font.ubuntu.com needs the font hosted for web embedding

Alan, agreed. We need to clear up some minor bits and then we'll have
global hosting sorted.

Mark

Revision history for this message
Paul Sladen (sladen) wrote :

Mmmm, lets see what we can manage.

Changed in ubuntu-font-family:
status: New → In Progress
assignee: nobody → Paul Sladen (sladen)
importance: Undecided → Wishlist
affects: ubuntu-font-family → ubuntu-font-family-website
Revision history for this message
Paul Sladen (sladen) wrote :

------------------------------------------------------------
revno: 49
committer: Paul Sladen <email address hidden>
branch nick: ubuntu-font-family-website
timestamp: Tue 2010-12-21 14:15:40 +0000
message:
  web/index.html: Add Ubuntu webfonts, Google Font API/Directory

Changed in ubuntu-font-family-website:
status: In Progress → Fix Released
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.