Commit 563598d4 authored by Ian Pilcher's avatar Ian Pilcher Committed by Alexandre Julliard

Read metrics from TrueType fonts.

parent 31eaee45
...@@ -378,6 +378,30 @@ AC_CHECK_LIB(cups,cupsGetPPD, ...@@ -378,6 +378,30 @@ AC_CHECK_LIB(cups,cupsGetPPD,
) )
AC_SUBST(CUPSLIBS) AC_SUBST(CUPSLIBS)
dnl **** Check for FreeType 2 ****
AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no)
if test "$ft_lib" = "no"
then
FREETYPELIBS=""
FREETYPEINCL=""
wine_cv_msg_freetype=no
else
AC_CHECK_PROG(ft_devel,freetype-config,yes,no)
if test "$ft_devel" = "no"
then
FREETYPELIBS=""
FREETYPEINCL=""
wine_cv_msg_freetype=yes
else
AC_DEFINE(HAVE_FREETYPE)
FREETYPELIBS=`freetype-config --libs`
FREETYPEINCL=`freetype-config --cflags`
wine_cv_msg_freetype=no
fi
fi
AC_SUBST(FREETYPELIBS)
AC_SUBST(FREETYPEINCL)
dnl **** Check for IPX (currently Linux only) **** dnl **** Check for IPX (currently Linux only) ****
AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu, AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
AC_TRY_COMPILE( AC_TRY_COMPILE(
...@@ -1362,6 +1386,15 @@ then ...@@ -1362,6 +1386,15 @@ then
echo "*** contains cups.h to enable CUPS support in WINE." echo "*** contains cups.h to enable CUPS support in WINE."
fi fi
if test "$wine_cv_msg_freetype" = "yes"
then
echo
echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
echo "*** freetype-devel package (or its equivalent on your distribution) to"
echo "*** enable Wine to use TrueType fonts."
fi
echo echo
echo "Configure finished. Do 'make depend && make' to compile Wine." echo "Configure finished. Do 'make depend && make' to compile Wine."
echo echo
......
...@@ -6,7 +6,8 @@ MODULE = wineps ...@@ -6,7 +6,8 @@ MODULE = wineps
SOVERSION = 1.0 SOVERSION = 1.0
ALTNAMES = wineps16 ALTNAMES = wineps16
IMPORTS = user32 gdi32 winspool.drv kernel32 ntdll IMPORTS = user32 gdi32 winspool.drv kernel32 ntdll
EXTRALIBS = @CUPSLIBS@ EXTRALIBS = @CUPSLIBS@ @FREETYPELIBS@
EXTRAINCL = @FREETYPEINCL@
C_SRCS = \ C_SRCS = \
afm.c \ afm.c \
...@@ -26,7 +27,8 @@ C_SRCS = \ ...@@ -26,7 +27,8 @@ C_SRCS = \
pen.c \ pen.c \
ppd.c \ ppd.c \
ps.c \ ps.c \
text.c text.c \
truetype.c
RC_SRCS= \ RC_SRCS= \
rsrc.rc rsrc.rc
......
...@@ -654,8 +654,9 @@ static void PSDRV_DumpFontList(void) ...@@ -654,8 +654,9 @@ static void PSDRV_DumpFontList(void)
{ {
INT i; INT i;
TRACE("\tFontName '%s' (%i glyphs):\n", afmle->afm->FontName, TRACE("\tFontName '%s' (%i glyphs) - '%s' encoding:\n",
afmle->afm->NumofMetrics); afmle->afm->FontName, afmle->afm->NumofMetrics,
afmle->afm->EncodingScheme);
for (i = 0; i < afmle->afm->NumofMetrics; ++i) for (i = 0; i < afmle->afm->NumofMetrics; ++i)
{ {
...@@ -671,7 +672,10 @@ static void PSDRV_DumpFontList(void) ...@@ -671,7 +672,10 @@ static void PSDRV_DumpFontList(void)
* SortFontMetrics * SortFontMetrics
* *
* Initializes the UV member of each glyph's AFMMETRICS and sorts each font's * Initializes the UV member of each glyph's AFMMETRICS and sorts each font's
* Metrics by Unicode Value. * Metrics by Unicode Value. If the font has a standard encoding (i.e. it is
* using the Adobe Glyph List encoding vector), look up each glyph's Unicode
* Value based on it's glyph name. If the font has a font-specific encoding,
* map the default PostScript encodings into the Unicode private use area.
* *
*/ */
static int UnicodeGlyphByNameIndex(const UNICODEGLYPH *a, const UNICODEGLYPH *b) static int UnicodeGlyphByNameIndex(const UNICODEGLYPH *a, const UNICODEGLYPH *b)
...@@ -965,10 +969,17 @@ BOOL PSDRV_GetFontMetrics(void) ...@@ -965,10 +969,17 @@ BOOL PSDRV_GetFontMetrics(void)
if (PSDRV_ReadAFMDir (value) == FALSE) if (PSDRV_ReadAFMDir (value) == FALSE)
return FALSE; return FALSE;
PSDRV_IndexGlyphList(); PSDRV_IndexGlyphList(); /* So SortFontMetrics will work */
if (SortFontMetrics() == FALSE) if (SortFontMetrics() == FALSE)
return FALSE; return FALSE;
CalcWindowsMetrics(); CalcWindowsMetrics();
#ifdef HAVE_FREETYPE
if (PSDRV_GetTrueTypeMetrics() == FALSE)
return FALSE;
PSDRV_IndexGlyphList();
#endif
PSDRV_DumpFontList(); PSDRV_DumpFontList();
return TRUE; return TRUE;
} }
...@@ -418,6 +418,7 @@ VOID PSDRV_DrawLine( DC *dc ); ...@@ -418,6 +418,7 @@ VOID PSDRV_DrawLine( DC *dc );
INT PSDRV_GlyphListInit(); INT PSDRV_GlyphListInit();
GLYPHNAME *PSDRV_GlyphName(LPCSTR szName); GLYPHNAME *PSDRV_GlyphName(LPCSTR szName);
VOID PSDRV_IndexGlyphList(); VOID PSDRV_IndexGlyphList();
BOOL PSDRV_GetTrueTypeMetrics();
#endif #endif
......
...@@ -123,6 +123,9 @@ ...@@ -123,6 +123,9 @@
/* Define if we have CUPS */ /* Define if we have CUPS */
#undef HAVE_CUPS #undef HAVE_CUPS
/* Define if FreeType 2 is installed */
#undef HAVE_FREETYPE
/* Define if we have 64 bit file offsets */ /* Define if we have 64 bit file offsets */
#undef HAVE_OFF64_T #undef HAVE_OFF64_T
......
...@@ -154,6 +154,9 @@ ...@@ -154,6 +154,9 @@
/* Define if we have CUPS */ /* Define if we have CUPS */
#undef HAVE_CUPS #undef HAVE_CUPS
/* Define if FreeType 2 is installed */
#undef HAVE_FREETYPE
/* Define if we have 64 bit file offsets */ /* Define if we have 64 bit file offsets */
#undef HAVE_OFF64_T #undef HAVE_OFF64_T
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment