[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Appropriate OpenJDK replacement for sun.font.FontManager?
From:       martijnverburg () gmail ! com (Martijn Verburg)
Date:       2011-12-12 15:13:29
Message-ID: CAP7YuAS6bwqfYtHAEDWerv9MEHu9_PxSvNGD0RZRT5u=XatgJQ () mail ! gmail ! com
[Download RAW message or body]

Hi all,

Apologies for the late reply, I'd forgotten about this thread :|.

Nope, they found a library (Swing!) which doesn't use the internals
and provides the correct behaviour,  :-).

+ import javax.swing.text.StyleContext;
+ return StyleContext.getDefaultStyleContext().getFont(name, style, size);

- import sun.font.FontManager;
- return FontManager.getCompositeFontUIResource(new Font(name, style, size));

Passing on Roman's comment was proof that they were going about it the
wrong way - they just needed the appeal to authority factor I guess.

Cheers,
Martijn

On 1 December 2011 17:32, Phil Race <philip.race at oracle.com> wrote:
> Do you mean they are now using a new library which now inappropriately
> uses the moved internal API, and they consider that problem solved ?
>
> -phil.
>
> On 12/1/11 8:00 AM, Martijn Verburg wrote:
>>
>> Hi Roman,
>>
>> Exactly :-), yes they want to avoid using the internal APIs. After
>> your hint they were quickly able to find a library that wraps the
>> internal API, problem solved.
>>
>> Cheers,
>> Martijn
>>
>> On 1 December 2011 15:49, Roman Kennke<roman at kennke.org> ?wrote:
>>>
>>> Ah and of course... maybe you should try to avoid using internal APIs to
>>> begin with. What exactly are you trying to do with this?
>>>
>>> Regards, Roman
>>>
>>> Am Donnerstag, den 01.12.2011, 15:30 +0000 schrieb Martijn Verburg:
>>>>
>>>> Thanks, that helps a bunch!
>>>>
>>>> On 1 December 2011 15:21, Roman Kennke<roman at kennke.org> ?wrote:
>>>>>
>>>>> Hi Martijn,
>>>>>
>>>>> we refactored the FontManager internal API, it's now:
>>>>>
>>>>> FontManagerFactory.getInstance().getNewComposite() (or whatever other
>>>>> FontManager static method it was before). There are a few methods that
>>>>> have been moved to other classes, but this one is still available in
>>>>> the
>>>>> FontManager interface (that's what it is now).
>>>>>
>>>>> I hope that helps.
>>>>>
>>>>> Regards, Roman
>>>>>
>>>>> Am Donnerstag, den 01.12.2011, 14:51 +0000 schrieb Martijn Verburg:
>>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I'm dealing with a 3rd party-lib that is sadly using
>>>>>> sun.font.FontManager (getNewComposite in particular). ?When moving to
>>>>>> Java 7 this breaks (not unexpectedly) and so they'd like some advice
>>>>>> on what would be an appropriate OpenJDK package to use instead of the
>>>>>> internal sun one.
>>>>>>
>>>>>> Any ideas? ?I'm completely clueless when it comes to this part of the
>>>>>> OpenJDK :|.
>>>>>>
>>>>>> Cheers,
>>>>>> Martijn
>>>>>>
>>>>>
>>>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic