Hi,
I am importing Google font as shown below. It renders properly on IE 11 and Chrome 38. But on Firefox 32 the text is truncated in the example below. I am using SmartGwt v 3.1. Is there a fix or workaround for this?
Importing the font style in the modules html file. This is imported before any references to the local css files.
Using the font in the css file
I am importing Google font as shown below. It renders properly on IE 11 and Chrome 38. But on Firefox 32 the text is truncated in the example below. I am using SmartGwt v 3.1. Is there a fix or workaround for this?
Importing the font style in the modules html file. This is imported before any references to the local css files.
Code:
<link type='text/css' rel='stylesheet' href='http://fonts.googleapis.com/css?family=Open+Sans:300'>
Code:
.ftOpenSansText {
font-family: 'Open Sans';
font-size: 14px;
font-weight: 300;
}
Code:
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.Label;
public class TestFont implements EntryPoint {
public void onModuleLoad() {
Canvas c = new Canvas();
c.setWidth100();
c.setHeight100();
Label l = new Label();
l.setAutoWidth();
l.setAutoHeight();
l.setWrap(false);
l.setStyleName("ftOpenSansText");
l.setContents("This is a sentence.");
l.setAlign(Alignment.CENTER);
l.setBorder("1px solid #000");
c.addChild(l);
c.draw();
}
}