Google Web Fonts

Hi, I tried using the web fonts and they seems to work just ok with the @StyleSheet annotation for the UI class. No need to add the link in the servlet.

@StyleSheet("http://fonts.googleapis.com/css?family=Cabin+Sketch")
@Theme("book-examples")
public class BookExamplesUI extends UI {

Then have something styled with the font:

// Something for which we change the CSS
Label label = new Label("Hello, world!");
label.addStyleName("usethewebfont");
layout.addComponent(label);

And use it in the CSS:

.usethewebfont {
    font-family: 'Cabin Sketch';
    font-size: 24px;
    font-weight: bold;
    padding-top: 10px;
    padding-left: 10px;
    line-height: 30px;
}

See the example
here
.

However, when I tried to use the “Titillium Web” font in the same way, it didn’t work. I don’t know why.