Using Google web fonts
There have been a few posts here and on StackOverflow, but I've still got an issue with using Google Web fonts in my GWT app. In my module .gwt.xml file I have inherits name='com.google.gwt.user.theme.clean.Clean' / stylesheet src=http://fonts.googleapis.com/css? family=Roboto:regular,medium,thin,italic,mediumitalic / I have in my CSS file body, table td, select, button { font-family: Roboto, sans-serif; } I have Resources.java with @Source(css/my.css) public CssResource css(); and in my app I do: Resources.INSTANCE.css().ensureInjected(); This all works well except for certain GWT widgets, which have a hard- coded font. e.g. in clean.css such as: .gwt-TextBox { padding: 5px 4px; border: 1px solid #ccc; border-top: 1px solid #999; font-size: small; font-family: Arial Unicode MS, Arial, sans-serif; } which is the last style applied, so my TextBox always has an Arial font and not the Roboto which I want. I'm wondering if there is a way to easily override these to use my desired font -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Web Fonts
From what I read they are just web fonts which means their font css style sheets need to be loaded via a link tag and once they are loaded they are used as any other font would be using standard css font attributes. The Technical Considerations documentation, located at http://code.google.com/apis/webfonts/docs/technical_considerations.html, goes into some detail as to how the actual font style sheets are rendered which is browser dependent and only the browsers listed in this document, http://code.google.com/apis/webfonts/faq.html#Browsers_Supported, are supported. Some of these fonts really look great and can really add some finesse to a page if applied with some restraint :). Another very cool service from Google provided to us struggling web developers... how cool is that? Now I am wondering if these fonts can be used via ClientBundles. Hmmm... Jeff On Fri, Jan 28, 2011 at 2:58 AM, Thomas Lefort lefortho...@gmail.comwrote: Have you tried putting the link in your html file? Interesting anyway, I hadn't heard of it, looks great. I wonder what is the trick (canvas elements?). On Jan 27, 10:02 pm, EMan eric.nis...@gmail.com wrote: Has anyone successfully used this in a GWT project? http://code.google.com/apis/webfonts/docs/getting_started.html#Quick_... I tried to add these fonts to some uiBinder elements, but I can't get it to work. What is the best way to get the font css files to link up? Thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Jeff Schwartz* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Web Fonts
...and then you read On Friday, January 28, 2011 3:26:26 PM UTC+1, Jeff wrote: Another very cool service from Google provided to us struggling web developers... how cool is that? +1 ...and then you read those drama queens on Engadget crying that Google has added ads to GMail UI or ceased to *autocomplete *suspicious keywords. :( Jeff On Fri, Jan 28, 2011 at 2:58 AM, Thomas Lefort lefor...@gmail.com wrote: Have you tried putting the link in your html file? Interesting anyway, I hadn't heard of it, looks great. I wonder what is the trick (canvas elements?). On Jan 27, 10:02 pm, EMan eric@gmail.com wrote: Has anyone successfully used this in a GWT project? http://code.google.com/apis/webfonts/docs/getting_started.html#Quick_. .. I tried to add these fonts to some uiBinder elements, but I can't get it to work. What is the best way to get the font css files to link up? Thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-we...@googlegroups.com. To unsubscribe from this group, send email to google-web-tool...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Jeff Schwartz* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Web Fonts
2011/1/28 Jaroslav Záruba jaroslav.zar...@gmail.com No trick apparently, @font-face. Yup, I believe you are right :) Too bad the fonts (quite predictably) miss many characters and there's no way to complete them. I'd participate glady. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Jeff Schwartz* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Web Fonts
I got it working with my GWT app by just putting the link into the HTML file (that includes the GWT JS) and using the font as you would use any font (like verdana) in your CSS file. No @font-face required. -- Arthur Kalmenson On Fri, Jan 28, 2011 at 9:48 AM, Jeff Schwartz jefftschwa...@gmail.com wrote: 2011/1/28 Jaroslav Záruba jaroslav.zar...@gmail.com No trick apparently, @font-face. Yup, I believe you are right :) Too bad the fonts (quite predictably) miss many characters and there's no way to complete them. I'd participate glady. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Jeff Schwartz -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Web Fonts
Yes adding it into the main HTML file seems to work now for me. Thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Google Web Fonts
Has anyone successfully used this in a GWT project? http://code.google.com/apis/webfonts/docs/getting_started.html#Quick_Start I tried to add these fonts to some uiBinder elements, but I can't get it to work. What is the best way to get the font css files to link up? Thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.