diff options
Diffstat (limited to 'graphics/cairo/files/patch-src_cairo-ft-font.c')
-rw-r--r-- | graphics/cairo/files/patch-src_cairo-ft-font.c | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/graphics/cairo/files/patch-src_cairo-ft-font.c b/graphics/cairo/files/patch-src_cairo-ft-font.c index 86ce179c9..88bcadeed 100644 --- a/graphics/cairo/files/patch-src_cairo-ft-font.c +++ b/graphics/cairo/files/patch-src_cairo-ft-font.c @@ -1,13 +1,27 @@ ---- src/cairo-ft-font.c.orig Tue Aug 16 14:31:13 2005 -+++ src/cairo-ft-font.c Tue Aug 16 14:31:57 2005 -@@ -296,9 +296,8 @@ _cairo_ft_unscaled_font_init (cairo_ft_u - filename_copy = strdup (filename); - if (filename_copy == NULL) - return CAIRO_STATUS_NO_MEMORY; -+ _cairo_ft_unscaled_font_init_key (unscaled, filename_copy, id); - } -- -- _cairo_ft_unscaled_font_init_key (unscaled, filename_copy, id); +--- src/cairo-ft-font.c.orig Tue Aug 16 14:33:55 2005 ++++ src/cairo-ft-font.c Tue Aug 16 14:43:47 2005 +@@ -44,6 +44,10 @@ + #include <fontconfig/fontconfig.h> + #include <fontconfig/fcfreetype.h> - if (face) { - unscaled->from_face = 1; ++#include <sys/types.h> ++#include <time.h> ++#include <unistd.h> ++ + #include <ft2build.h> + #include FT_FREETYPE_H + #include FT_OUTLINE_H +@@ -257,7 +261,12 @@ _cairo_ft_unscaled_font_init_key (cairo_ + key->id = id; + + /* 1607 is just an arbitrary prime. */ +- hash = _cairo_hash_string (filename); ++ if (filename != NULL) { ++ hash = _cairo_hash_string (filename); ++ } else { ++ srandom(time(NULL) * getpid()); ++ hash = random(); ++ } + hash += ((unsigned long) id) * 1607; + + key->base.hash_entry.hash = hash; |