[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog macros/freetype.m4 server/Freet...
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] gnash ChangeLog macros/freetype.m4 server/Freet... |
Date: |
Tue, 06 Nov 2007 09:06:01 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 07/11/06 09:06:01
Modified files:
. : ChangeLog
macros : freetype.m4
server : FreetypeGlyphsProvider.cpp
Log message:
* macros/freetype.m4: use fontconfig to find a default sans
font for
use if gnash runtime fails to find a suitable system font.
Revert
to the old hard-coded path if fc-match fails.
* server/FreetypeGlyphsProvider.cpp: take DEFAULT_FONTFILE from
config.h.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4774&r2=1.4775
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/freetype.m4?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/server/FreetypeGlyphsProvider.cpp?cvsroot=gnash&r1=1.15&r2=1.16
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4774
retrieving revision 1.4775
diff -u -b -r1.4774 -r1.4775
--- ChangeLog 6 Nov 2007 08:59:57 -0000 1.4774
+++ ChangeLog 6 Nov 2007 09:06:00 -0000 1.4775
@@ -1,3 +1,11 @@
+2007-11-06 Benjamin Wolsey <address@hidden>
+
+ * macros/freetype.m4: use fontconfig to find a default sans font for
+ use if gnash runtime fails to find a suitable system font. Revert
+ to the old hard-coded path if fc-match fails.
+ * server/FreetypeGlyphsProvider.cpp: take DEFAULT_FONTFILE from
+ config.h.
+
2007-11-06 Sandro Santilli <address@hidden>
* testsuite/misc-ming.all/DrawingApiTest.as: add support for 'h' key
Index: macros/freetype.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/freetype.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- macros/freetype.m4 13 Oct 2007 23:24:07 -0000 1.3
+++ macros/freetype.m4 6 Nov 2007 09:06:01 -0000 1.4
@@ -89,7 +89,7 @@
dnl If the path hasn't been specified, go look for it.
if test x"${ac_cv_path_freetype_lib}" = x; then
- dnl freetype-config gives us way to many libraries, which create nasty
linking
+ dnl freetype-config gives us way too many libraries, which create nasty
linking
dnl dependancy issue, so we strip them off here. The real dependencies are
dnl are taken care of by other config tests.
AC_MSG_CHECKING([for ${libname} library])
@@ -126,6 +126,23 @@
AC_DEFINE(USE_FREETYPE, [1], [Define this if you want to enable freetype
usage])
fi
+ dnl Look for fontconfig's fc-match to set a hard-coded font path.
+ dnl If fontconfig is available, gnash should always manage to find a
+ dnl suitable system font in run time, so will never need this hard-coded
+ dnl default (unless fontconfig is removed after building gnash, for
instance).
+ AC_PATH_PROG(FC_MATCH, fc-match, ,[${pathlist}])
+ if test x"$FC_MATCH" != x; then
+ DEFAULT_FONT=`$FC_MATCH -v 'Sans' | grep '^.file:' | sed 's/\(file:
\"\)\(.*\)\(\".*\)/\2/g'`
+ fi
+
+ dnl Hard-coded last resort, which is only likely to work
+ dnl on UNIX-like systems.
+ if test -z "$DEFAULT_FONT"; then
+ DEFAULT_FONT="/usr/share/fonts/truetype/freefont/FreeSans.ttf"
+ fi
+
+ AC_DEFINE_UNQUOTED(DEFAULT_FONTFILE, ["$DEFAULT_FONT"], [Path to default
font])
+
AC_SUBST(FREETYPE2_CFLAGS)
AC_SUBST(FREETYPE2_LIBS)
])
Index: server/FreetypeGlyphsProvider.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/FreetypeGlyphsProvider.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- server/FreetypeGlyphsProvider.cpp 5 Nov 2007 16:45:43 -0000 1.15
+++ server/FreetypeGlyphsProvider.cpp 6 Nov 2007 09:06:01 -0000 1.16
@@ -237,8 +237,6 @@
bool bold, bool italic, std::string& filename)
{
-#define DEFAULT_FONTFILE "/usr/share/fonts/truetype/freefont/FreeSans.ttf"
-
#ifdef HAVE_FONTCONFIG
if (!FcInit ())
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog macros/freetype.m4 server/Freet...,
Benjamin Wolsey <=