Ticket #7797: subpix_aa.diff

File subpix_aa.diff, 2.5 KB (added by diver, 8 years ago)
  • src/servers/app/FontCacheEntry.cpp

     
    401401    if (font.Rotation() != 0.0 || font.Shear() != 90.0
    402402        || font.FalseBoldWidth() != 0.0
    403403        || (font.Flags() & B_DISABLE_ANTIALIASING) != 0
    404         || font.Size() > 30
    405         || !font.Hinting()) {
     404        || font.Size() > 30) {
    406405        renderingType = glyph_ren_outline;
    407406    }
    408407
  • src/servers/app/FontEngine.cpp

     
    366366decompose_ft_bitmap_subpix(const FT_Bitmap& bitmap, int x, int y,
    367367    bool flip_y, Scanline& sl, ScanlineStorage& storage)
    368368{
    369 #ifdef AVERAGE_BASED_SUBPIXEL_FILTERING
     369#if 1
    370370    const uint8* buf = (const uint8*)bitmap.buffer;
    371371    int pitch = bitmap.pitch;
    372372    sl.reset(x, x + bitmap.width / 3);
     
    588588    fLastError = FT_Init_FreeType(&fLibrary);
    589589    if (fLastError == 0)
    590590        fLibraryInitialized = true;
     591
     592    FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT);
    591593}
    592594
    593595
  • src/servers/app/drawing/Painter/GlobalSubpixelSettings.h

     
    1717    HINTING_MODE_MONOSPACED_ONLY
    1818};
    1919
    20 #define AVERAGE_BASED_SUBPIXEL_FILTERING
     20//#define AVERAGE_BASED_SUBPIXEL_FILTERING
    2121
    2222extern bool gSubpixelAntialiasing;
    2323extern uint8 gDefaultHintingMode;
  • headers/libs/freetype2/freetype/config/ftoption.h

     
    9393  /* This is done to allow FreeType clients to run unmodified, forcing     */
    9494  /* them to display normal gray-level anti-aliased glyphs.                */
    9595  /*                                                                       */
    96 #if HAIKU_INCLUDE_PATENTED_CODE
    97 #   define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
    98 #endif
     96#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
    9997
    10098  /*************************************************************************/
    10199  /*                                                                       */