Issue 68434 - Mac OS X and system freetype and FT_ENCODING macros
Summary: Mac OS X and system freetype and FT_ENCODING macros
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: current
Hardware: All Mac OS X, all
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.0.4
Assignee: pavel
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-10 16:21 UTC by pavel
Modified: 2006-08-31 14:05 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
copied pjaniks patch from external location (1.03 KB, application/octet-stream)
2006-08-11 08:08 UTC, hdu@apache.org
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2006-08-10 16:21:13 UTC
Hi,

m181 brought new freetype lib and this set of patches:

-                        eEncoding = ft_encoding_big5;
+                        eEncoding = FT_ENCODING_BIG5;

System freetype on Mac OS X does not define uppercase macros like this but:

/usr/X11R6/include/freetype2/freetype/freetype.h:#define  ft_encoding_big5     
      FT_ENCODING_MS_BIG5

(notice MS_...).

Thus compile of m181 on Mac OS X with X11 on m181:

/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:
In constructor 'FreetypeServerFont::FreetypeServerFont(const
ImplFontSelectData&, FtFontInfo*)':
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:740:
error: 'FT_ENCODING_SJIS' was not declared in this scope
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:744:
error: 'FT_ENCODING_GB2312' was not declared in this scope
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:748:
error: 'FT_ENCODING_BIG5' was not declared in this scope
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:752:
error: 'FT_ENCODING_WANSUNG' was not declared in this scope
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:756:
error: 'FT_ENCODING_JOHAB' was not declared in this scope
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:
In member function 'virtual void FreetypeServerFont::InitGlyphData(int,
GlyphData&) const':
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs/gcach_ftyp.cxx:1259:
error: 'FT_GLYPH_BBOX_PIXELS' was not declared in this scope
dmake:  Error code 1, while making '../../unxmacxp.pro/slo/gcach_ftyp.obj'
'---* tg_merge.mk *---'

ERROR: Error 0 occurred while making
/Volumes/Build/oo/BuildDir/ooo_SRC680_m181_src/vcl/source/glyphs

This means, that right now, we have to use this patch to get it compiled:

ftp://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Patches/SRC680/aquavcl01-freetype.diff
Comment 1 pavel 2006-08-10 16:22:10 UTC
set target.

Please shed some light on FT_ENCODING macros renaming.
Comment 2 sparcmoz 2006-08-11 00:39:59 UTC
http://freetype.sourceforge.net/freetype2/docs/reference/ft2-base_interface.html#FT_Encoding

FT_ENCODING_MS_SJIS	Same as FT_ENCODING_SJIS. Deprecated.

FT_ENCODING_MS_GB2312	Same as FT_ENCODING_GB2312. Deprecated.

FT_ENCODING_MS_BIG5	Same as FT_ENCODING_BIG5. Deprecated.

FT_ENCODING_MS_WANSUNG	Same as FT_ENCODING_WANSUNG. Deprecated.

FT_ENCODING_MS_JOHAB	Same as FT_ENCODING_JOHAB. Deprecated.
Comment 3 hdu@apache.org 2006-08-11 07:57:19 UTC
Yes, the old macros where deprecated by the freetype project. Thanks sparcmoz.
Comment 4 hdu@apache.org 2006-08-11 08:07:08 UTC
The patch, which removes MACOSX special handling of the freetype library is
great. Thanks Pavel.
Comment 5 hdu@apache.org 2006-08-11 08:08:57 UTC
Created attachment 38436 [details]
copied pjaniks patch from external location
Comment 6 pavel 2006-08-11 08:12:08 UTC
Does this mean that we have raised our bar for being able to use system freetype
as well?

Configure contains this check:

    PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )

But this is not true anymore, right?
Comment 7 hdu@apache.org 2006-08-11 08:29:09 UTC
Yes, the old macros were deprecated three years ago by freetype version 2.1.5:
http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/include/freetype/freetype.h?r1=1.127&r2=1.128
Comment 8 hdu@apache.org 2006-08-11 08:32:13 UTC
In the previous comment I should also have linked to
http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/include/freetype/ftglyph.h?r1=1.30&r2=1.31
Comment 9 jens-heiner.rechtien 2006-08-11 12:49:44 UTC
patch added as master fix to OOD680 m1
Comment 10 hdu@apache.org 2006-08-11 12:58:01 UTC
Reopen for reassigning.
Comment 11 hdu@apache.org 2006-08-11 12:58:56 UTC
Reassigning.
Comment 12 hdu@apache.org 2006-08-11 12:59:44 UTC
Please verify in master OOD680_m1
Comment 13 pavel 2006-08-31 14:05:19 UTC
verified, closing.