Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » SWT Font and AWT Font shows different size
SWT Font and AWT Font shows different size [message #165892] Thu, 27 January 2005 11:39 Go to next message
Eclipse UserFriend
Originally posted by: shaiju.exorindia.com

Hi All
We are developing an IDE based on GEF . By this IDE , user can design
applets. IDE's design environemement is based on Draw2d and SWT. Applets
that user design using this IDE is serialized in xml format. IDE's
launcher application will create applet code (Java awt ) and user can
deploy this anywhere he wants.
We are facing a problem related to Font. When we use a Font for a
particular control (say Label ) at design time it shows a size which is
different from the size shown in applet . i.e Same Font in SWT and AWT
show different size ( even we set same size and other properties in both
case ). Can anybody help us in fixing this problem.
Thanks in Advance

Shaiju.P
Re: SWT Font and AWT Font shows different size [message #166386 is a reply to message #165892] Mon, 31 January 2005 21:59 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Can you isolate this problem in SWT? Is the font itself a different size or
is it the spacing around the text (or spacing between lines of text) that is
different? This might have something to do with the leading that Draw2d/GEF
uses.

"Shaiju" <shaiju@exorindia.com> wrote in message
news:ctaju0$1ri$1@www.eclipse.org...
> Hi All
> We are developing an IDE based on GEF . By this IDE , user can design
> applets. IDE's design environemement is based on Draw2d and SWT. Applets
> that user design using this IDE is serialized in xml format. IDE's
> launcher application will create applet code (Java awt ) and user can
> deploy this anywhere he wants.
> We are facing a problem related to Font. When we use a Font for a
> particular control (say Label ) at design time it shows a size which is
> different from the size shown in applet . i.e Same Font in SWT and AWT
> show different size ( even we set same size and other properties in
both
> case ). Can anybody help us in fixing this problem.
> Thanks in Advance
>
> Shaiju.P
>
>
Re: SWT Font and AWT Font shows different size [message #166809 is a reply to message #166386] Thu, 03 February 2005 09:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shaiju.exorindia.com

I think there is difference in font size itself in awt and swt .A slight
difference is there between SWT and GEF/Draw2D but that is very little and
can be ignored.
When we applied same Font ( Times New Roman ,14 ,Normal) we got the
different results in pure SWT and GEF/Draw2D and Applet . Please find the
attachment .I have marked the three results .
thank you for your valuable time

Shaiju.P

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:ctm9o4$asc$1@www.eclipse.org...
> Can you isolate this problem in SWT? Is the font itself a different size
> or
> is it the spacing around the text (or spacing between lines of text) that
> is
> different? This might have something to do with the leading that
> Draw2d/GEF
> uses.
>
> "Shaiju" <shaiju@exorindia.com> wrote in message
> news:ctaju0$1ri$1@www.eclipse.org...
>> Hi All
>> We are developing an IDE based on GEF . By this IDE , user can design
>> applets. IDE's design environemement is based on Draw2d and SWT.
>> Applets
>> that user design using this IDE is serialized in xml format. IDE's
>> launcher application will create applet code (Java awt ) and user can
>> deploy this anywhere he wants.
>> We are facing a problem related to Font. When we use a Font for a
>> particular control (say Label ) at design time it shows a size which is
>> different from the size shown in applet . i.e Same Font in SWT and AWT
>> show different size ( even we set same size and other properties in
> both
>> case ). Can anybody help us in fixing this problem.
>> Thanks in Advance
>>
>> Shaiju.P
>>
>>
>
>


Re: SWT Font and AWT Font shows different size [message #166991 is a reply to message #166809] Fri, 04 February 2005 10:44 Go to previous message
Eric Suen is currently offline Eric SuenFriend
Messages: 94
Registered: July 2009
Member
The Java(tm)2D API adopts the convention that one point is equivalent to
one unit in user coordinates. When using a normalized transform for
converting user space coordinates to device space coordinates 72 user
space units equal 1 inch in device space. In this case one point is 1/72
of an inch.

For Windows system, the default is 96 dpi, So in most swing application,
the font in size 12 is the same as the 9 in system...

"Shaiju" <shaiju@exorindia.com> д
Previous Topic:how to read GEF source code ?
Next Topic:Announcement: Talk on GEF at SIG Eclipse/JUGS (Stuttgart, Germany)
Goto Forum:
  


Current Time: Sat Dec 21 14:23:06 GMT 2024

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

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

Back to the top