Freetype in Mountain Lion and higher

Phil Race philip.race at oracle.com
Wed May 2 09:32:22 PDT 2012


I think .6 probably was to ensure we are getting a version was expect.
If it was something else it might be a red flag to check all worked as 
expected.

There's also the infamous freetype_check program which ensured the
actual freetype version, not the library version, was what we expected.
At the time we did the work platforms which had fonts with embedded
bitmaps were *dead* with freetype. Expect an infinite loop on start up.

The plan was to have pre-built freetype libs which would be imported
and delivered along with JDK, but *allow* Linux distros to set a variable
USING_SYSTEM_FT_LIB  to say not to do that ..

I am not sure I see why we need another variable (EMBEDDING_EXTERNAL_FT_LIB)
  to say not to not do that  ...

For OS X including a copy is absolutely the way to go, and I blocked on
this a few months ago because I didn't have the cycles to go figure out
how to fix the freetype build for OS X, which hardwires into itself the 
dylib
path where it expects to be installed and that code linked against it must
use, to be standard location.

That seemed to me to be the only issue that seemed to require anything
except perhaps very, very minor makefile tweaking.

-phil.

On 5/2/2012 9:01 AM, Henri Gomez wrote:
>>>     ifeq ($(USING_SYSTEM_FT_LIB), false)
>>>       FREETYPE_LIB =
>>> $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
>>>     endif
>>
>> I'd defer the answer to 2D folks. I can only speculate that this must be a
>> minimum required version. Perhaps the makefiles logic might be enhanced in
>> this area.
> Yep, I spent some time on this makefile and it seems incomplete.
> ie :
>
>
> $(FREETYPE_LIB):
>          $(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
> endif
>
> This goal make me think copy of Freetype library was planned, but need
> some more tweaking.
>
> ifeq ($(PLATFORM), windows)
>      FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
>      OTHER_LDLIBS += $(FREETYPE_LIB_PATH)/freetype.lib
> else
>    ifeq ($(USING_SYSTEM_FT_LIB), false)
>      FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
>    endif
>    OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
> endif
>
> ...
>
> #
> # Libraries to link, and other C flags.
> #
>
> ifeq ($(PLATFORM), macosx))
> OTHER_INCLUDES += -I$(X11_PATH)/include
> OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
>   ifeq ($(OS_VENDOR),Apple)
>     # XXXDARWIN Match BSD/Linux behavior -- the mawt.dylib symbols will
>     # be available at runtime.
>     OTHER_LDLIBS += -undefined dynamic_lookup
>   endif
> else
> ifeq ($(PLATFORM), solaris)
>    # Note that on Solaris, fontmanager is built against the headless library.
>    LDFLAGS      += -L$(LIBDIR)/$(LIBARCH)/headless
>    OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
> else # PLATFORM is linux
>   OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
>    ifeq ("$(CC_VER_MAJOR)", "3")
>      OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
>    endif
> endif
> endif
>
> Makefile may need some cleanup to split it between using system FT lib
> and copying (embedding) provided external FT LIB (via
> ALT_FREETYPE_HEADERS_PATH and ALT_FREETYPE_LIB_PATH)
>
> It will be clearer by using 2 vars.
>
> One exist, USING_SYSTEM_FT_LIB, new one could be EMBEDDING_EXTERNAL_FT_LIB.
>
> My 0.01$



More information about the macosx-port-dev mailing list