aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fontconfig/conf.d/10-scale-bitmap-fonts.conf81
-rw-r--r--fontconfig/conf.d/Makefile.am2
-rw-r--r--fontconfig/configure.ac7
-rw-r--r--fontconfig/fc-query/fc-query.c1
-rw-r--r--fontconfig/src/Makefile.am1
-rwxr-xr-xfontconfig/src/fcatomic.c3
-rwxr-xr-x[-rw-r--r--]fontconfig/src/fccache.c6
-rw-r--r--fontconfig/src/fccompat.c107
-rw-r--r--fontconfig/src/fcint.h7
-rw-r--r--fontconfig/src/fcstat.c2
-rwxr-xr-xfontconfig/src/fcxml.c2
-rw-r--r--mesalib/scons/gallium.py3
-rw-r--r--mesalib/src/mesa/SConscript2
-rw-r--r--xorg-server/fonts.src/fonts.conf118
14 files changed, 330 insertions, 12 deletions
diff --git a/fontconfig/conf.d/10-scale-bitmap-fonts.conf b/fontconfig/conf.d/10-scale-bitmap-fonts.conf
new file mode 100644
index 000000000..e3bcd46cd
--- /dev/null
+++ b/fontconfig/conf.d/10-scale-bitmap-fonts.conf
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <edit name="pixelsizefixupfactor" mode="assign">
+ <divide>
+ <name target="pattern">pixelsize</name>
+ <name target="font" >pixelsize</name>
+ </divide>
+ </edit>
+</match>
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <edit name="scalingnotneeded" mode="assign">
+ <and>
+ <less>
+ <name>pixelsizefixupfactor</name>
+ <double>1.2</double>
+ </less>
+ <more>
+ <name>pixelsizefixupfactor</name>
+ <double>0.8</double>
+ </more>
+ </and>
+ </edit>
+</match>
+<!--
+ So far we determined the scale factor. Now, check and if
+ scaling is NOT desirable, just reset the scale factor to 1.0.
+ -->
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <test name="pixelsize" target="pattern" compare="less">
+ <double>64</double>
+ </test>
+ <test name="hinting" compare="eq">
+ <bool>true</bool>
+ </test>
+ <test name="scalingnotneeded" compare="eq">
+ <bool>true</bool>
+ </test>
+ <edit name="pixelsizefixupfactor" mode="assign">
+ <double>1.0</double>
+ </edit>
+</match>
+<!--
+ If we *are* going to scale, go ahead and do it.
+ -->
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <test name="pixelsizefixupfactor" compare="not_eq">
+ <double>1.0</double>
+ </test>
+ <edit name="matrix" mode="assign">
+ <times>
+ <name>matrix</name>
+ <matrix>
+ <name>pixelsizefixupfactor</name> <double>0</double>
+ <double>0</double> <name>pixelsizefixupfactor</name>
+ </matrix>
+ </times>
+ </edit>
+ <edit name="size" mode="assign">
+ <divide>
+ <name>size</name>
+ <name>pixelsizefixupfactor</name>
+ </divide>
+ </edit>
+</match>
+
+</fontconfig>
diff --git a/fontconfig/conf.d/Makefile.am b/fontconfig/conf.d/Makefile.am
index e3a26f081..77597e57f 100644
--- a/fontconfig/conf.d/Makefile.am
+++ b/fontconfig/conf.d/Makefile.am
@@ -25,6 +25,7 @@ DOC_FILES= \
README
CONF_LINKS = \
+ 10-scale-bitmap-fonts.conf \
20-unhint-small-vera.conf \
30-urw-aliases.conf \
30-metric-aliases.conf \
@@ -49,6 +50,7 @@ templatedir = $(TEMPLATEDIR)
template_DATA = \
10-autohint.conf \
10-no-sub-pixel.conf \
+ 10-scale-bitmap-fonts.conf \
10-sub-pixel-bgr.conf \
10-sub-pixel-rgb.conf \
10-sub-pixel-vbgr.conf \
diff --git a/fontconfig/configure.ac b/fontconfig/configure.ac
index 4beca08d3..803084c09 100644
--- a/fontconfig/configure.ac
+++ b/fontconfig/configure.ac
@@ -60,6 +60,8 @@ AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
AC_PROG_INSTALL
AC_PROG_LN_S
AC_LIBTOOL_WIN32_DLL
@@ -139,7 +141,7 @@ AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MMAP
-AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
+AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp mkostemp _mktemp_s strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
dnl AC_CHECK_FUNCS doesn't check for header files.
dnl posix_fadvise() may be not available in older libc.
@@ -598,6 +600,9 @@ if test "$os_win32" = no; then
AX_PTHREAD([have_pthread=true])
fi
if $have_pthread; then
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ CC="$PTHREAD_CC"
AC_DEFINE(HAVE_PTHREAD, 1, [Have POSIX threads])
fi
AM_CONDITIONAL(HAVE_PTHREAD, $have_pthread)
diff --git a/fontconfig/fc-query/fc-query.c b/fontconfig/fc-query/fc-query.c
index 883e3031e..2983e0f19 100644
--- a/fontconfig/fc-query/fc-query.c
+++ b/fontconfig/fc-query/fc-query.c
@@ -100,7 +100,6 @@ main (int argc, char **argv)
FcChar8 *format = NULL;
int err = 0;
int i;
- FcBlanks *blanks;
#if HAVE_GETOPT_LONG || HAVE_GETOPT
int c;
diff --git a/fontconfig/src/Makefile.am b/fontconfig/src/Makefile.am
index 617713fe7..dba42065a 100644
--- a/fontconfig/src/Makefile.am
+++ b/fontconfig/src/Makefile.am
@@ -131,6 +131,7 @@ libfontconfig_la_SOURCES = \
fccache.c \
fccfg.c \
fccharset.c \
+ fccompat.c \
fcdbg.c \
fcdefault.c \
fcdir.c \
diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c
index 45048aa9f..c35a829fd 100755
--- a/fontconfig/src/fcatomic.c
+++ b/fontconfig/src/fcatomic.c
@@ -50,7 +50,6 @@
#include "fcint.h"
#include <sys/types.h>
#include <sys/stat.h>
-#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
@@ -109,7 +108,7 @@ FcAtomicLock (FcAtomic *atomic)
strcpy ((char *) atomic->tmp, (char *) atomic->file);
strcat ((char *) atomic->tmp, TMP_NAME);
- fd = mkstemp ((char *) atomic->tmp);
+ fd = FcMakeTempfile ((char *) atomic->tmp);
if (fd < 0)
return FcFalse;
f = fdopen (fd, "w");
diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index 5926a398b..c37cbe148 100644..100755
--- a/fontconfig/src/fccache.c
+++ b/fontconfig/src/fccache.c
@@ -156,7 +156,7 @@ FcDirCacheOpenFile (const FcChar8 *cache_file, struct stat *file_stat)
if (FcStat (cache_file, file_stat) < 0)
return -1;
#endif
- fd = open((char *) cache_file, O_RDONLY | O_BINARY);
+ fd = FcOpen((char *) cache_file, O_RDONLY | O_BINARY);
if (fd < 0)
return fd;
#ifndef _WIN32
@@ -978,7 +978,7 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
if (!FcAtomicLock (atomic))
goto bail3;
- fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666);
+ fd = FcOpen((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666);
if (fd == -1)
goto bail4;
@@ -1456,7 +1456,7 @@ FcDirCacheCreateTagFile (const FcChar8 *cache_dir)
goto bail1;
if (!FcAtomicLock (atomic))
goto bail2;
- fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT, 0644);
+ fd = FcOpen((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT, 0644);
if (fd == -1)
goto bail3;
fp = fdopen(fd, "wb");
diff --git a/fontconfig/src/fccompat.c b/fontconfig/src/fccompat.c
new file mode 100644
index 000000000..169cab9ed
--- /dev/null
+++ b/fontconfig/src/fccompat.c
@@ -0,0 +1,107 @@
+/*
+ * fontconfig/src/fccompat.c
+ *
+ * Copyright © 2012 Red Hat, Inc.
+ *
+ * Author(s):
+ * Akira TAGOH
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of the author(s) not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. The authors make no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "fcint.h"
+
+#if HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include <stdarg.h>
+#include <stdlib.h>
+
+#ifdef O_CLOEXEC
+#define FC_O_CLOEXEC O_CLOEXEC
+#else
+#define FC_O_CLOEXEC 0
+#endif
+#ifdef O_LARGEFILE
+#define FC_O_LARGEFILE O_LARGEFILE
+#else
+#define FC_O_LARGEFILE 0
+#endif
+
+int
+FcOpen(const char *pathname, int flags, ...)
+{
+ int fd = -1;
+
+ if (flags & O_CREAT)
+ {
+ va_list ap;
+ mode_t mode;
+
+ va_start(ap, flags);
+ mode = (mode_t) va_arg(ap, int);
+ va_end(ap);
+
+ fd = open(pathname, flags | FC_O_CLOEXEC | FC_O_LARGEFILE, mode);
+ }
+ else
+ {
+ fd = open(pathname, flags | FC_O_CLOEXEC | FC_O_LARGEFILE);
+ }
+
+ return fd;
+}
+
+int
+FcMakeTempfile (char *template)
+{
+ int fd = -1;
+
+#if HAVE_MKOSTEMP
+ fd = mkostemp (template, FC_O_CLOEXEC);
+#elif HAVE_MKSTEMP
+ fd = mkstemp (template);
+# ifdef F_DUPFD_CLOEXEC
+ if (fd != -1)
+ {
+ int newfd = fcntl(fd, F_DUPFD_CLOEXEC);
+
+ close(fd);
+ fd = newfd;
+ }
+# elif defined(FD_CLOEXEC)
+ if (fd != -1)
+ {
+ fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
+ }
+# endif
+#elif HAVE__MKTEMP_S
+ if (_mktemp_s(template, strlen(template) + 1) != 0)
+ return -1;
+ fd = FcOpen(template, O_RDWR | O_EXCL | O_CREAT, 0600);
+#else
+#error no secure functions to create a temporary file
+#endif
+
+ return fd;
+}
diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h
index 38bd9bb73..3883bc96e 100644
--- a/fontconfig/src/fcint.h
+++ b/fontconfig/src/fcint.h
@@ -717,6 +717,13 @@ FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
FcPrivate FcChar16 *
FcCharSetGetNumbers(const FcCharSet *c);
+/* fccompat.c */
+FcPrivate int
+FcOpen(const char *pathname, int flags, ...);
+
+FcPrivate int
+FcMakeTempfile (char *template);
+
/* fcdbg.c */
FcPrivate void
diff --git a/fontconfig/src/fcstat.c b/fontconfig/src/fcstat.c
index 9763c21a4..390f45c37 100644
--- a/fontconfig/src/fcstat.c
+++ b/fontconfig/src/fcstat.c
@@ -336,7 +336,7 @@ FcIsFsMmapSafe (int fd)
FcBool
FcIsFsMtimeBroken (const FcChar8 *dir)
{
- int fd = open ((const char *) dir, O_RDONLY);
+ int fd = FcOpen ((const char *) dir, O_RDONLY);
if (fd != -1)
{
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index 5b074c88e..cd6aa3109 100755
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -2980,7 +2980,7 @@ FcConfigParseAndLoad (FcConfig *config,
if (FcDebug () & FC_DBG_CONFIG)
printf ("\tLoading config file %s\n", filename);
- fd = open ((char *) filename, O_RDONLY);
+ fd = FcOpen ((char *) filename, O_RDONLY);
if (fd == -1) {
FcStrFree (filename);
goto bail0;
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index 98671f75d..7207c6bb2 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -361,8 +361,7 @@ def generate(env):
ccflags += [
'-mstackrealign', # ensure stack is aligned
'-march=i586', # Haiku target is Pentium
- '-mtune=i686', # use i686 where we can
- '-mmmx' # use mmx math where we can
+ '-mtune=i686' # use i686 where we can
]
if env['machine'] == 'x86_64':
ccflags += ['-m64']
diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript
index a2492f771..a28db23e4 100644
--- a/mesalib/src/mesa/SConscript
+++ b/mesalib/src/mesa/SConscript
@@ -370,7 +370,7 @@ env.Depends(glget_sources, get_hash_header)
#
# Assembly sources
#
-if env['gcc'] and env['platform'] not in ('cygwin', 'darwin', 'windows'):
+if env['gcc'] and env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
if env['machine'] == 'x86':
env.Append(CPPDEFINES = [
'USE_X86_ASM',
diff --git a/xorg-server/fonts.src/fonts.conf b/xorg-server/fonts.src/fonts.conf
new file mode 100644
index 000000000..9e6ec7487
--- /dev/null
+++ b/xorg-server/fonts.src/fonts.conf
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+<!--
+ Accept deprecated 'mono' alias, replacing it with 'monospace'
+-->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>mono</string>
+ </test>
+ <edit name="family" mode="assign" binding="same">
+ <string>monospace</string>
+ </edit>
+ </match>
+
+<!--
+ Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
+-->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>sans serif</string>
+ </test>
+ <edit name="family" mode="assign" binding="same">
+ <string>sans-serif</string>
+ </edit>
+ </match>
+
+<!--
+ Accept deprecated 'sans' alias, replacing it with 'sans-serif'
+-->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>sans</string>
+ </test>
+ <edit name="family" mode="assign" binding="same">
+ <string>sans-serif</string>
+ </edit>
+ </match>
+
+<!-- Font cache directory list -->
+
+ <config>
+<!--
+ These are the default Unicode chars that are expected to be blank
+ in fonts. All other blank chars are assumed to be broken and
+ won't appear in the resulting charsets
+ -->
+ <blank>
+ <int>0x0020</int> <!-- SPACE -->
+ <int>0x00A0</int> <!-- NO-BREAK SPACE -->
+ <int>0x00AD</int> <!-- SOFT HYPHEN -->
+ <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER -->
+ <int>0x0600</int> <!-- ARABIC NUMBER SIGN -->
+ <int>0x0601</int> <!-- ARABIC SIGN SANAH -->
+ <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER -->
+ <int>0x0603</int> <!-- ARABIC SIGN SAFHA -->
+ <int>0x06DD</int> <!-- ARABIC END OF AYAH -->
+ <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK -->
+ <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER -->
+ <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
+ <int>0x1680</int> <!-- OGHAM SPACE MARK -->
+ <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ -->
+ <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA -->
+ <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR -->
+ <int>0x2000</int> <!-- EN QUAD -->
+ <int>0x2001</int> <!-- EM QUAD -->
+ <int>0x2002</int> <!-- EN SPACE -->
+ <int>0x2003</int> <!-- EM SPACE -->
+ <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
+ <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
+ <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
+ <int>0x2007</int> <!-- FIGURE SPACE -->
+ <int>0x2008</int> <!-- PUNCTUATION SPACE -->
+ <int>0x2009</int> <!-- THIN SPACE -->
+ <int>0x200A</int> <!-- HAIR SPACE -->
+ <int>0x200B</int> <!-- ZERO WIDTH SPACE -->
+ <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER -->
+ <int>0x200D</int> <!-- ZERO WIDTH JOINER -->
+ <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK -->
+ <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK -->
+ <int>0x2028</int> <!-- LINE SEPARATOR -->
+ <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
+ <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
+ <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
+ <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING -->
+ <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
+ <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
+ <int>0x202F</int> <!-- NARROW NO-BREAK SPACE -->
+ <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE -->
+ <int>0x2060</int> <!-- WORD JOINER -->
+ <int>0x2061</int> <!-- FUNCTION APPLICATION -->
+ <int>0x2062</int> <!-- INVISIBLE TIMES -->
+ <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
+ <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
+ <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
+ <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
+ <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
+ <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
+ <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
+ <int>0x2800</int> <!-- BRAILLE PATTERN BLANK -->
+ <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
+ <int>0x3164</int> <!-- HANGUL FILLER -->
+ <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
+ <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER -->
+ <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
+ <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
+ <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
+ </blank>
+<!--
+ Rescan configuration every 30 seconds when FcFontSetList is called
+ -->
+ <rescan>
+ <int>30</int>
+ </rescan>
+ </config>
+
+</fontconfig>