shithub: freetype+ttf2subf

Download patch

ref: 78dd7104ef2419d742d89ae897f99d8fe06d4685
parent: a0be99f131d07fdfddaf4904cd6fbbc6e192b5e9
author: David Turner <[email protected]>
date: Tue Oct 3 15:13:11 EDT 2000

small fix:
  when in direct rendering mode, the target bitmap buffer
  is not checked..

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1853,17 +1853,23 @@
            outline->contours[outline->n_contours - 1] + 1 )
       return ErrRaster_Invalid_Outline;
 
-    if ( !target_map || !target_map->buffer )
+    /* if direct mode is not set, we must have a target bitmap */
+    if ( (params->flags & ft_raster_flag_direct == 0) &&
+         ( !target_map || !target_map->buffer )       )
       return -1;
 
-    /* XXX: this version does not support monochrome rendering yet! */
+    /* this version does not support monochrome rendering */
     if ( !(params->flags & ft_raster_flag_aa) )
       return ErrRaster_Invalid_Mode;
 
     ras.outline   = *outline;
-    ras.target    = *target_map;
     ras.num_cells = 0;
     ras.invalid   = 1;
+
+    if (target_map)
+      ras.target = *target_map;
+    else
+      ras.target = 0;
 
     ras.render_span      = (FT_Raster_Span_Func)grays_render_span;
     ras.render_span_data = &ras;