< prev index next >

src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c

Print this page




 226     /* finally apply filtering */
 227     if ( hmul || vmul )
 228     {
 229       FT_Byte*                 lcd_weights;
 230       FT_Bitmap_LcdFilterFunc  lcd_filter_func;
 231 
 232 
 233       /* Per-face LCD filtering takes priority if set up. */
 234       if ( slot->face && slot->face->internal->lcd_filter_func )
 235       {
 236         lcd_weights     = slot->face->internal->lcd_weights;
 237         lcd_filter_func = slot->face->internal->lcd_filter_func;
 238       }
 239       else
 240       {
 241         lcd_weights     = slot->library->lcd_weights;
 242         lcd_filter_func = slot->library->lcd_filter_func;
 243       }
 244 
 245       if ( lcd_filter_func )
 246         lcd_filter_func( bitmap, mode, lcd_weights );
 247     }
 248 
 249 #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
 250 
 251     if ( hmul )  /* lcd */
 252     {
 253       FT_Byte*  line;
 254       FT_Byte*  temp = NULL;
 255       FT_UInt   i, j;
 256 
 257       unsigned int  height = bitmap->rows;
 258       unsigned int  width  = bitmap->width;
 259       int           pitch  = bitmap->pitch;
 260 
 261       FT_Vector*  sub = slot->library->lcd_geometry;
 262 
 263 
 264       /* Render 3 separate monochrome bitmaps, shifting the outline.  */
 265       width /= 3;
 266 




 226     /* finally apply filtering */
 227     if ( hmul || vmul )
 228     {
 229       FT_Byte*                 lcd_weights;
 230       FT_Bitmap_LcdFilterFunc  lcd_filter_func;
 231 
 232 
 233       /* Per-face LCD filtering takes priority if set up. */
 234       if ( slot->face && slot->face->internal->lcd_filter_func )
 235       {
 236         lcd_weights     = slot->face->internal->lcd_weights;
 237         lcd_filter_func = slot->face->internal->lcd_filter_func;
 238       }
 239       else
 240       {
 241         lcd_weights     = slot->library->lcd_weights;
 242         lcd_filter_func = slot->library->lcd_filter_func;
 243       }
 244 
 245       if ( lcd_filter_func )
 246         lcd_filter_func( bitmap, lcd_weights );
 247     }
 248 
 249 #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
 250 
 251     if ( hmul )  /* lcd */
 252     {
 253       FT_Byte*  line;
 254       FT_Byte*  temp = NULL;
 255       FT_UInt   i, j;
 256 
 257       unsigned int  height = bitmap->rows;
 258       unsigned int  width  = bitmap->width;
 259       int           pitch  = bitmap->pitch;
 260 
 261       FT_Vector*  sub = slot->library->lcd_geometry;
 262 
 263 
 264       /* Render 3 separate monochrome bitmaps, shifting the outline.  */
 265       width /= 3;
 266 


< prev index next >