Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » CSS font(Get different string extent running the same application.CSS, StringExtent, Widget...)
CSS font [message #531748] Wed, 05 May 2010 22:22 Go to next message
Eclipse UserFriend
I am implementing a widget whose size depends on the font it is using. I use themming from a CSS file where default font are defined. I suppose the widget I am working on will inherit the font type from css which is decided before widget is rendered. However when debuging the I find different values from Graphics.stringExtent(font, string) method, and I am sure that the samet font returned from Control.getFont method and used as the parameter. So I guess this is the problem of the implementation ofGraphics.stringExtent which returns different value when I simply refresh the web page.
Re: CSS font [message #531750 is a reply to message #531748] Wed, 05 May 2010 22:30 Go to previous messageGo to next message
Eclipse UserFriend
More information, I am using 1.3M6 as the platform and a different value returned when I try to refresh the page and all widgets are re-rendered.

Thanks in advance.
Re: CSS font [message #531817 is a reply to message #531748] Thu, 06 May 2010 04:44 Go to previous message
Eclipse UserFriend
Hi,

maybe your observation is related to the way the text size determination
works in RAP. Before text sizes are measured on the client, it uses an
estimated value. This only affects the first session that renders the
string.

Ralf

lsq wrote:
> I am implementing a widget whose size depends on the font it is using. I
> use themming from a CSS file where default font are defined. I suppose
> the widget I am working on will inherit the font type from css which is
> decided before widget is rendered. However when debuging the I find
> different values from Graphics.stringExtent(font, string) method, and I
> am sure that the samet font returned from Control.getFont method and
> used as the parameter. So I guess this is the problem of the
> implementation ofGraphics.stringExtent which returns different value
> when I simply refresh the web page.
Previous Topic:Migrating the exsisting Application
Next Topic:NullPointerException and RuntimeException Occurs when refresh the page
Goto Forum:
  


Current Time: Sat Jul 05 02:10:37 EDT 2025

Powered by FUDForum. Page generated in 0.03732 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top