Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » TextStyle default font with different size
TextStyle default font with different size [message #655992] Wed, 23 February 2011 16:45 Go to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Hi,
I want to define a TextStyle that makes use of the editor's default font
but in a larger font size. I have not been able to figure out how to do
this.

A default TextStyle has no FontData so it is very hard to make any
statement about the size (without also specifying the font name).

I tried things like getting the JFaceResources.TEXT_FONT from the font
registry, but that is not the same font as what is used by default in
the text editor.

Hope someone can point me in the right direction.

Regards
- henrik
Re: TextStyle default font with different size [message #656296 is a reply to message #655992] Thu, 24 February 2011 23:22 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Any insights on this?

Regards
- henrik

On 2/23/11 5:45 PM, Henrik Lindberg wrote:
> Hi,
> I want to define a TextStyle that makes use of the editor's default font
> but in a larger font size. I have not been able to figure out how to do
> this.
>
> A default TextStyle has no FontData so it is very hard to make any
> statement about the size (without also specifying the font name).
>
> I tried things like getting the JFaceResources.TEXT_FONT from the font
> registry, but that is not the same font as what is used by default in
> the text editor.
>
> Hope someone can point me in the right direction.
>
> Regards
> - henrik
Re: TextStyle default font with different size [message #656298 is a reply to message #656296] Thu, 24 February 2011 23:44 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Henrik,

I'm afraid you'll have to define an own API for that. I guess
abstraction that we used simplifies too much for your use case.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 25.02.11 00:22, schrieb Henrik Lindberg:
> Any insights on this?
>
> Regards
> - henrik
>
> On 2/23/11 5:45 PM, Henrik Lindberg wrote:
>> Hi,
>> I want to define a TextStyle that makes use of the editor's default font
>> but in a larger font size. I have not been able to figure out how to do
>> this.
>>
>> A default TextStyle has no FontData so it is very hard to make any
>> statement about the size (without also specifying the font name).
>>
>> I tried things like getting the JFaceResources.TEXT_FONT from the font
>> registry, but that is not the same font as what is used by default in
>> the text editor.
>>
>> Hope someone can point me in the right direction.
>>
>> Regards
>> - henrik
>
Re: TextStyle default font with different size [message #656307 is a reply to message #656298] Fri, 25 February 2011 00:25 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Ok, thanks.
Any chance you know where/how the default font is actually resolved?
Even a guess Is helpful...

- henrik
Sebastian Zarnekow <Sebastian.Zarnekow@itemis.de> wrote:
> Hi Henrik,
>
> I'm afraid you'll have to define an own API for that. I guess abstraction
> that we used simplifies too much for your use case.
>
> Regards,
> Sebastian


--
- henrik
Previous Topic:Disabling comment auto complete
Next Topic:How does the XText DSL example work with the e4 model workbench ecore model?
Goto Forum:
  


Current Time: Sat Apr 27 04:35:41 GMT 2024

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

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

Back to the top