typeface.js
HOME
USAGE
EXAMPLES
FONTS
DOWNLOAD
DEVELOPMENT
FORUM
CONTACT
User / Developer Forum
Using Typeface.js within a GWT app
dindeman
|
1 May 2010 18:29
I am looking for some sample Java code demonstrating how to get AJAX content displayed into a custom font using Typeface.js within a GWT app. I have tried a little bit by calling the following native function
native void Typeface_renderDocument() /*-{
$wnd._typeface_js.renderDocument();
}-*/;
- after having filled the relevant widget with the AJAX content, and
- after calling the following function on the widget :
void applyTypeface(Widget widget) {
widget.addStyleName("typeface-js");
widget.getElement().getStyle().setProperty("fontFamily", "Helvetiker");
Typeface_renderDocument();
}
...where Helvetiker is a custom font (actually available from Typeface.js fonts.
But that didn't work.
I am looking forward to any suggestions since I am bit stuck here.
Post a Reply
YOUR NAME
YOUR EMAIL
YOUR COMMENT
We don't support HTML, but please use [quote] ... [/quote] tags around quotes.
Copyright (c) 2008 David Chester | davidchester@gmx.net
I am looking for some sample Java code demonstrating how to get AJAX content displayed into a custom font using Typeface.js within a GWT app. I have tried a little bit by calling the following native function
native void Typeface_renderDocument() /*-{
$wnd._typeface_js.renderDocument();
}-*/;
- after having filled the relevant widget with the AJAX content, and
- after calling the following function on the widget :
void applyTypeface(Widget widget) {
widget.addStyleName("typeface-js");
widget.getElement().getStyle().setProperty("fontFamily", "Helvetiker");
Typeface_renderDocument();
}
...where Helvetiker is a custom font (actually available from Typeface.js fonts.
But that didn't work.
I am looking forward to any suggestions since I am bit stuck here.