Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Fonts
SWT Fonts [message #465867] Tue, 20 December 2005 21:55 Go to next message
Michael Damone is currently offline Michael DamoneFriend
Messages: 1
Registered: July 2009
Junior Member
Hi All,

I'm trying to create a SWT Font object from a ttf file. I don't want to
have to install the font into the os, I just want to be able to load it
from a file. I have done this befor in AWT/Swing, but I'm trying to find
out how to do it in SWT. I have not had any luck thus far, so can anyone
tell me how?

This is how I have done it in AWT/Swing:

InputStream in = new BufferedInputStream(new FileInputStream(fileName));
Font font = Font.createFont(Font.TRUETYPE_FONT, in);

So what I'm looking for is the SWT version of this same code.

Thanks for any response,
Michael
Re: SWT Fonts [message #465908 is a reply to message #465867] Wed, 21 December 2005 20:06 Go to previous message
Carolyn MacLeod is currently offline Carolyn MacLeodFriend
Messages: 149
Registered: July 2009
Senior Member
Please open a feature request in Bugzilla.
Be sure to say why you would want to do this.
Carolyn

"Michael Damone" <michael.damone@21csi.com> wrote in message
news:a52a8a978c68325e01455dafbc746c6a$1@www.eclipse.org...
> Hi All,
>
> I'm trying to create a SWT Font object from a ttf file. I don't want to
> have to install the font into the os, I just want to be able to load it
> from a file. I have done this befor in AWT/Swing, but I'm trying to find
> out how to do it in SWT. I have not had any luck thus far, so can anyone
> tell me how?
>
> This is how I have done it in AWT/Swing:
>
> InputStream in = new BufferedInputStream(new FileInputStream(fileName));
> Font font = Font.createFont(Font.TRUETYPE_FONT, in);
>
> So what I'm looking for is the SWT version of this same code.
>
> Thanks for any response,
> Michael
>
>
Previous Topic:Table.getColumns(), what order is returned
Next Topic:ScrolledComposite setContent problem
Goto Forum:
  


Current Time: Mon Sep 23 11:07:45 GMT 2019

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

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

Back to the top