[OpenJDK 2D-Dev] Request for review : FreeType embedded in OSX packages

Phil Race philip.race at oracle.com
Wed Oct 17 17:40:43 UTC 2012


I filed : (JDK-8001065) [macosx] OpenJDK on OS X should use bundled 
freetype, not one from the system

Sample code is just

import java.awt.Font;
public class CreateFont {

public static void main(String args[]) throws Exception {
    Font f = Font.createFont(Font|.TYPE1_FONT, new 
java.io.File("mytype1font.pfa"));
}
}


You can get a font from ||| 
<http://docs.oracle.com/javase/6/docs/api/java/awt/Font.html#TYPE1_FONT>any 
of a gazillion places .. there'll be plenty
on almost any Linux you have handy.

-phil.

On 10/17/2012 10:31 AM, Henri Gomez wrote:
> Any sample java code available ?
>
> Le 17 oct. 2012 à 18:27, Phil Race<philip.race at oracle.com>  a écrit :
>
>> PS .. I could be misremembering or misunderstanding but the other
>> obstacle I ran into when I looked at this (ages ago) was that the freetype
>> I built was expecting to be installed in a specific location. I didn't
>> think it was enough to tell the JDK build to look for the freetype lib,
>> it seemed that the freetype.dylib was fussy about where it was placed.
>> Could you also check that your build works and really loads *your*
>> version of the lib - try  using a Postscript Type 1 font via Font.createFont(),
>> that should trigger it.
>>
>> -phil.
>>
>> On 10/17/12 9:18 AM, Phil Race wrote:
>>> On 10/17/12 1:11 AM, Henri Gomez wrote:
>>>>> You need to create a bug at<http://bugreport.sun.com/bugreport/>  describing what you want to change, and then attach a new patch. Mike's review plus one other will be enough to get it into JDK 8. JDK 7u will need two reviewers, since I think the Java2D team owns this part of the code. (I cc'd Phil Race).
>>>> Ticket created : #2361569
>>>>
>>>> Link to patches provided inside
>>> What number is that ? I think its just an incident. I will file a JIRA bug
>>> on this shortly .. but I had tried the patch yesterday and FWIW it doesn't
>>> seem to remove "build" dependency on the system libfreetype ..
>>> I don't think anything you did caused this because it would already fail
>>> for me in the sanity check at the beginning but a complete fix would
>>> address this too where it seems the ALT_ path is not making it through
>>> to tools/freetypecheck/Makefile
>>>
>>> dyld: Library not loaded: /usr/local/lib/libfreetype.6.dylib
>>>   Referenced from: /openjdk8/2d/build/macosx-x86_64/btbins/freetype_versioncheck
>>>   Reason: image not found
>>> make[2]: *** [all] Trace/BPT trap: 5
>>> ..
>>> ..
>>> ERROR: FreeType version  2.3.0  or higher is required.
>>> /bin/mkdir -p /openjdk8/2d/build/macosx-x86_64/btbins
>>> rm -f /openjdk8/2d/build/macosx-x86_64/btbins/freetype_versioncheck
>>> /openjdk8/2d/build/macosx-x86_64/btbins/freetype_versioncheck
>>> Failed to build freetypecheck.
>>>
>>> Exiting because of the above error(s).
>>> -----
>>>
>>> Also did you try this in the old and new build systems ?
>>>
>>> Finally, the way we build internally I guess our jprt and R/E builds of
>>> openjdk on OS X (if the latter were tried at all) should be made capable
>>> of using a custom freetype build. I think they can be ignorant of
>>> this change for now, but without creating a build and making them use
>>> it they will still spit out builds which rely on the system freetype
>>>
>>> -phil.




More information about the 2d-dev mailing list