Advertisement
Guest User

brebs

a guest
Aug 27th, 2010
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 34.30 KB | None | 0 0
  1. From http://www.infinality.net/fedora/linux/13/SRPMS/freetype-subpixel-2.3.12-3.fc13.src.rpm
  2. and modified to patch freetype 2.4.2
  3. See http://www.infinality.net/blog/?p=67
  4. and http://forums.gentoo.org/viewtopic-p-6350912.html#6350912
  5.  
  6. Added:
  7. freetype-2.3.0-enable-spr.patch from Fedora's src.rpm - http://koji.fedoraproject.org/koji/packageinfo?packageID=313
  8. freetype-2.2.1-enable-valid.patch from Fedora's src.rpm
  9. And #define FT_CONFIG_OPTION_SYSTEM_ZLIB in include/freetype/config/ftoption.h
  10.  
  11. Also upstream patches from http://git.savannah.gnu.org/cgit/freetype/freetype2.git/
  12. http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=a205b3ca85d2d78aac71ea3c1df104972031d6ad
  13. http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=ebaeb6425e15638cfce1db80286dfac4c6987621
  14.  
  15.  
  16. diff -Naur freetype-2.4.2-orig//ChangeLog freetype-2.4.2/ChangeLog
  17. --- freetype-2.4.2-orig//ChangeLog  2010-08-07 02:53:03.000000000 +0700
  18. +++ freetype-2.4.2/ChangeLog    2010-08-27 13:40:14.000000000 +0700
  19. @@ -1,3 +1,17 @@
  20. +2010-08-17  Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
  21. +
  22. +   Fix Savannah bug #30788.
  23. +
  24. +   * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
  25. +   NULL too.
  26. +
  27. +2010-08-10  Werner Lemberg  <wl@gnu.org>
  28. +
  29. +   Try to fix Savannah bug #30717 (and probably #30719 too).
  30. +
  31. +   * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
  32. +   overflow test for `width' and `height'.
  33. +
  34.  2010-08-06  Werner Lemberg  <wl@gnu.org>
  35.  
  36.     * Version 2.4.2 released.
  37. diff -Naur freetype-2.4.2-orig//include/freetype/config/ftoption.h freetype-2.4.2/include/freetype/config/ftoption.h
  38. --- freetype-2.4.2-orig//include/freetype/config/ftoption.h 2010-07-05 11:38:55.000000000 +0700
  39. +++ freetype-2.4.2/include/freetype/config/ftoption.h   2010-08-27 13:40:14.000000000 +0700
  40. @@ -93,7 +93,7 @@
  41.    /* This is done to allow FreeType clients to run unmodified, forcing     */
  42.    /* them to display normal gray-level anti-aliased glyphs.                */
  43.    /*                                                                       */
  44. -/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
  45. +#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
  46.  
  47.  
  48.    /*************************************************************************/
  49. @@ -185,7 +185,7 @@
  50.    /*   Do not #undef this macro here since the build system might define   */
  51.    /*   it for certain configurations only.                                 */
  52.    /*                                                                       */
  53. -/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
  54. +#define FT_CONFIG_OPTION_SYSTEM_ZLIB
  55.  
  56.  
  57.    /*************************************************************************/
  58. diff -Naur freetype-2.4.2-orig//include/freetype/freetype.h freetype-2.4.2/include/freetype/freetype.h
  59. --- freetype-2.4.2-orig//include/freetype/freetype.h    2010-08-07 02:51:58.000000000 +0700
  60. +++ freetype-2.4.2/include/freetype/freetype.h  2010-08-27 13:40:14.000000000 +0700
  61. @@ -2516,6 +2516,7 @@
  62.  #define FT_LOAD_MONOCHROME                   0x1000
  63.  #define FT_LOAD_LINEAR_DESIGN                0x2000
  64.  #define FT_LOAD_NO_AUTOHINT                  0x8000U
  65. +/*#define FT_LOAD_COMPATIBLE_WIDTHS            0x10000U*/
  66.  
  67.    /* */
  68.  
  69. diff -Naur freetype-2.4.2-orig//include/freetype/internal/ftobjs.h freetype-2.4.2/include/freetype/internal/ftobjs.h
  70. --- freetype-2.4.2-orig//include/freetype/internal/ftobjs.h 2010-07-18 23:07:31.000000000 +0700
  71. +++ freetype-2.4.2/include/freetype/internal/ftobjs.h   2010-08-27 13:40:14.000000000 +0700
  72. @@ -81,6 +81,13 @@
  73.  #define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )
  74.  #define FT_PIX_CEIL( x )      FT_PIX_FLOOR( (x) + 63 )
  75.  
  76. +#define FT_PIX_FLOOR_sph( x )     ( (x) & ~3 )
  77. +#define FT_PIX_ROUND_sph( x )     FT_PIX_FLOOR_sph( (x) + 2 )
  78. +#define FT_PIX_CEIL_sph( x )      FT_PIX_FLOOR_sph( (x) + 3 )
  79. +
  80. +#define FT_PIX_FLOOR_sphn( x, n )     ( (x) & ~(64 / n - 1) )
  81. +#define FT_PIX_ROUND_sphn( x, n )     FT_PIX_FLOOR_sph( (x) + 32 / n)
  82. +#define FT_PIX_CEIL_sphn( x, n )      FT_PIX_FLOOR_sph( (x) + 64 / n - 1)
  83.  
  84.    /*
  85.     *  Return the highest power of 2 that is <= value; this correspond to
  86. diff -Naur freetype-2.4.2-orig//modules.cfg freetype-2.4.2/modules.cfg
  87. --- freetype-2.4.2-orig//modules.cfg    2009-03-14 20:45:26.000000000 +0700
  88. +++ freetype-2.4.2/modules.cfg  2010-08-27 13:40:14.000000000 +0700
  89. @@ -110,7 +110,7 @@
  90.  AUX_MODULES += cache
  91.  
  92.  # TrueType GX/AAT table validation.  Needs ftgxval.c below.
  93. -# AUX_MODULES += gxvalid
  94. +AUX_MODULES += gxvalid
  95.  
  96.  # Support for streams compressed with gzip (files with suffix .gz).
  97.  #
  98. @@ -124,7 +124,7 @@
  99.  
  100.  # OpenType table validation.  Needs ftotval.c below.
  101.  #
  102. -# AUX_MODULES += otvalid
  103. +AUX_MODULES += otvalid
  104.  
  105.  # Auxiliary PostScript driver component to share common code.
  106.  #
  107. diff -Naur freetype-2.4.2-orig//src/cache/ftccache.c freetype-2.4.2/src/cache/ftccache.c
  108. --- freetype-2.4.2-orig//src/cache/ftccache.c   2010-06-24 14:17:45.000000000 +0700
  109. +++ freetype-2.4.2/src/cache/ftccache.c 2010-08-27 13:40:14.000000000 +0700
  110. @@ -346,7 +346,7 @@
  111.    static void
  112.    FTC_Cache_Clear( FTC_Cache  cache )
  113.    {
  114. -    if ( cache )
  115. +    if ( cache && cache->buckets )
  116.      {
  117.        FTC_Manager  manager = cache->manager;
  118.        FT_UFast     i;
  119. diff -Naur freetype-2.4.2-orig//src/smooth/ftsmooth.c freetype-2.4.2/src/smooth/ftsmooth.c
  120. --- freetype-2.4.2-orig//src/smooth/ftsmooth.c  2010-06-30 23:16:20.000000000 +0700
  121. +++ freetype-2.4.2/src/smooth/ftsmooth.c    2010-08-27 13:40:14.000000000 +0700
  122. @@ -140,8 +140,26 @@
  123.      cbox.xMax = FT_PIX_CEIL( cbox.xMax );
  124.      cbox.yMax = FT_PIX_CEIL( cbox.yMax );
  125.  
  126. -    width  = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
  127. -    height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
  128. +    if ( cbox.xMin < 0 && cbox.xMax > FT_INT_MAX + cbox.xMin )
  129. +    {
  130. +      FT_ERROR(( "ft_smooth_render_generic: glyph too large:"
  131. +                 " xMin = %d, xMax = %d\n",
  132. +                 cbox.xMin >> 6, cbox.xMax >> 6 ));
  133. +      return Smooth_Err_Raster_Overflow;
  134. +    }
  135. +    else
  136. +      width  = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
  137. +
  138. +    if ( cbox.yMin < 0 && cbox.yMax > FT_INT_MAX + cbox.yMin )
  139. +    {
  140. +      FT_ERROR(( "ft_smooth_render_generic: glyph too large:"
  141. +                 " yMin = %d, yMax = %d\n",
  142. +                 cbox.yMin >> 6, cbox.yMax >> 6 ));
  143. +      return Smooth_Err_Raster_Overflow;
  144. +    }
  145. +    else
  146. +      height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
  147. +
  148.      bitmap = &slot->bitmap;
  149.      memory = render->root.memory;
  150.  
  151. @@ -202,7 +220,7 @@
  152.      /* but we care realistic cases only. Always pitch <= width. */
  153.      if ( width > 0x7FFFU || height > 0x7FFFU )
  154.      {
  155. -      FT_ERROR(( "ft_smooth_render_generic: glyph too large: %d x %d\n",
  156. +      FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n",
  157.                   width, height ));
  158.        return Smooth_Err_Raster_Overflow;
  159.      }
  160. diff -Naur freetype-2.4.2-orig//src/truetype/ttgload.c freetype-2.4.2/src/truetype/ttgload.c
  161. --- freetype-2.4.2-orig//src/truetype/ttgload.c 2010-06-29 15:27:12.000000000 +0700
  162. +++ freetype-2.4.2/src/truetype/ttgload.c   2010-08-27 13:40:14.000000000 +0700
  163. @@ -1659,7 +1659,6 @@
  164.      {
  165.        FT_Pos  advance = loader->linear;
  166.  
  167. -
  168.        /* the flag FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH was introduced to */
  169.        /* correctly support DynaLab fonts, which have an incorrect       */
  170.        /* `advance_Width_Max' field!  It is used, to my knowledge,       */
  171. @@ -1669,6 +1668,8 @@
  172.             ( loader->load_flags & FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ) == 0 )
  173.          advance = face->horizontal.advance_Width_Max;
  174.  
  175. +
  176. +
  177.        /* we need to return the advance in font units in linearHoriAdvance, */
  178.        /* it will be scaled later by the base layer.                        */
  179.        glyph->linearHoriAdvance = advance;
  180. @@ -1683,13 +1684,20 @@
  181.           IS_HINTED( loader->load_flags ) )
  182.      {
  183.        FT_Byte*  widthp;
  184. +      FT_Bool   subpixel;
  185. +      FT_Bool   compatible_widths;
  186. +
  187. +      subpixel =
  188. +        FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags ) != FT_RENDER_MODE_MONO );
  189.  
  190. +      compatible_widths = FALSE;
  191. +        /*FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags ) != FT_LOAD_COMPATIBLE_WIDTHS )*/
  192.  
  193.        widthp = tt_face_get_device_metrics( face,
  194.                                             size->root.metrics.x_ppem,
  195.                                             glyph_index );
  196.  
  197. -      if ( widthp )
  198. +      if ( (!subpixel && widthp) || compatible_widths )
  199.          glyph->metrics.horiAdvance = *widthp << 6;
  200.      }
  201.  
  202. @@ -1883,7 +1891,8 @@
  203.      {
  204.        TT_ExecContext  exec;
  205.        FT_Bool         grayscale;
  206. -
  207. +      FT_Bool         subpixel;
  208. +      FT_Bool         compatible_widths;
  209.  
  210.        if ( !size->cvt_ready )
  211.        {
  212. @@ -1901,10 +1910,31 @@
  213.        grayscale =
  214.          FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != FT_RENDER_MODE_MONO );
  215.  
  216. +      subpixel =
  217. +        FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != FT_RENDER_MODE_MONO );
  218. +
  219. +      compatible_widths = FALSE;
  220. +        /*FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != FT_LOAD_COMPATIBLE_WIDTHS)*/;
  221. +
  222.        TT_Load_Context( exec, face, size );
  223.  
  224.        /* a change from mono to grayscale rendering (and vice versa) */
  225.        /* requires a re-execution of the CVT program                 */
  226. +      if ( compatible_widths != exec->compatible_widths )
  227. +      {
  228. +        FT_UInt  i;
  229. +
  230. +
  231. +        exec->compatible_widths = compatible_widths;
  232. +
  233. +        for ( i = 0; i < size->cvt_size; i++ )
  234. +          size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );
  235. +        tt_size_run_prep( size );
  236. +      }
  237. +
  238. +
  239. +      /* a change from mono to grayscale rendering (and vice versa) */
  240. +      /* requires a re-execution of the CVT program                 */
  241.        if ( grayscale != exec->grayscale )
  242.        {
  243.          FT_UInt  i;
  244. @@ -1914,6 +1944,18 @@
  245.  
  246.          for ( i = 0; i < size->cvt_size; i++ )
  247.            size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );
  248. +        tt_size_run_prep( size );
  249. +      }
  250. +
  251. +      if ( subpixel != exec->subpixel )
  252. +      {
  253. +        FT_UInt  i;
  254. +
  255. +
  256. +        exec->subpixel = subpixel;
  257. +
  258. +        for ( i = 0; i < size->cvt_size; i++ )
  259. +          size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );
  260.          tt_size_run_prep( size );
  261.        }
  262.  
  263. diff -Naur freetype-2.4.2-orig//src/truetype/ttinterp.c freetype-2.4.2/src/truetype/ttinterp.c
  264. --- freetype-2.4.2-orig//src/truetype/ttinterp.c    2010-08-06 05:36:55.000000000 +0700
  265. +++ freetype-2.4.2/src/truetype/ttinterp.c  2010-08-27 13:40:14.000000000 +0700
  266. @@ -168,6 +168,9 @@
  267.  #define CUR_Func_round( d, c ) \
  268.            CUR.func_round( EXEC_ARG_ d, c )
  269.  
  270. +#define CUR_Func_round_sphn( d, c ) \
  271. +          CUR.func_round_sphn( EXEC_ARG_ d, c )
  272. +
  273.  #define CUR_Func_read_cvt( index ) \
  274.            CUR.func_read_cvt( EXEC_ARG_ index )
  275.  
  276. @@ -1837,7 +1840,7 @@
  277.  #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
  278.      FT_ASSERT( !CUR.face->unpatented_hinting );
  279.  #endif
  280. -
  281. +if (CUR.skip_x == 0){
  282.      v = CUR.GS.freeVector.x;
  283.  
  284.      if ( v != 0 )
  285. @@ -1848,7 +1851,8 @@
  286.  
  287.        zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
  288.      }
  289. -
  290. +}
  291. +if (CUR.skip_y == 0){
  292.      v = CUR.GS.freeVector.y;
  293.  
  294.      if ( v != 0 )
  295. @@ -1860,6 +1864,7 @@
  296.        zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
  297.      }
  298.    }
  299. +  }
  300.  
  301.  
  302.    /*************************************************************************/
  303. @@ -1890,14 +1895,15 @@
  304.  #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
  305.      FT_ASSERT( !CUR.face->unpatented_hinting );
  306.  #endif
  307. -
  308. +if (CUR.skip_x == 0){
  309.      v = CUR.GS.freeVector.x;
  310.  
  311.      if ( v != 0 )
  312.        zone->org[point].x += TT_MULDIV( distance,
  313.                                         v * 0x10000L,
  314.                                         CUR.F_dot_P );
  315. -
  316. +}
  317. +if (CUR.skip_y==0){
  318.      v = CUR.GS.freeVector.y;
  319.  
  320.      if ( v != 0 )
  321. @@ -1905,7 +1911,7 @@
  322.                                         v * 0x10000L,
  323.                                         CUR.F_dot_P );
  324.    }
  325. -
  326. +  }
  327.  
  328.    /*************************************************************************/
  329.    /*                                                                       */
  330. @@ -1923,9 +1929,10 @@
  331.                            FT_F26Dot6    distance )
  332.    {
  333.      FT_UNUSED_EXEC;
  334. -
  335. +if (CUR.skip_x == 0){
  336.      zone->cur[point].x += distance;
  337.      zone->tags[point]  |= FT_CURVE_TAG_TOUCH_X;
  338. +}
  339.    }
  340.  
  341.  
  342. @@ -1935,11 +1942,11 @@
  343.                            FT_F26Dot6    distance )
  344.    {
  345.      FT_UNUSED_EXEC;
  346. -
  347. +if (CUR.skip_y ==0){
  348.      zone->cur[point].y += distance;
  349.      zone->tags[point]  |= FT_CURVE_TAG_TOUCH_Y;
  350.    }
  351. -
  352. +  }
  353.  
  354.    /*************************************************************************/
  355.    /*                                                                       */
  356. @@ -1957,8 +1964,9 @@
  357.                                 FT_F26Dot6    distance )
  358.    {
  359.      FT_UNUSED_EXEC;
  360. -
  361. +if (CUR.skip_x == 0){
  362.      zone->org[point].x += distance;
  363. +}
  364.    }
  365.  
  366.  
  367. @@ -1968,9 +1976,10 @@
  368.                                 FT_F26Dot6    distance )
  369.    {
  370.      FT_UNUSED_EXEC;
  371. -
  372. +if (CUR.skip_y == 0){
  373.      zone->org[point].y += distance;
  374.    }
  375. +  }
  376.  
  377.  
  378.    /*************************************************************************/
  379. @@ -2064,6 +2073,32 @@
  380.    }
  381.  
  382.  
  383. +    static FT_F26Dot6
  384. +  Round_To_Grid_sphn( EXEC_OP_ FT_F26Dot6  distance,
  385. +                          FT_F26Dot6  compensation )
  386. +  {
  387. +    FT_F26Dot6  val;
  388. +
  389. +    FT_UNUSED_EXEC;
  390. +
  391. +    if ( distance >= 0 )
  392. +    {
  393. +      val = distance + compensation + 32 / CUR.grid_factor;
  394. +      if ( distance && val > 0 )
  395. +        val &= ~(64 / CUR.grid_factor - 1);
  396. +      else
  397. +        val = 0;
  398. +    }
  399. +    else
  400. +    {
  401. +      val = -FT_PIX_ROUND_sphn( compensation - distance, CUR.grid_factor );
  402. +      if ( val > 0 )
  403. +        val = 0;
  404. +    }
  405. +    return  val;
  406. +  }
  407. +
  408. +
  409.    /*************************************************************************/
  410.    /*                                                                       */
  411.    /* <Function>                                                            */
  412. @@ -2106,6 +2141,32 @@
  413.    }
  414.  
  415.  
  416. +  static FT_F26Dot6
  417. +  Round_To_Half_Grid_sphn( EXEC_OP_ FT_F26Dot6  distance,
  418. +                               FT_F26Dot6  compensation )
  419. +  {
  420. +    FT_F26Dot6  val;
  421. +
  422. +    FT_UNUSED_EXEC;
  423. +
  424. +    if ( distance >= 0 )
  425. +    {
  426. +      val = FT_PIX_FLOOR_sphn( distance + compensation, CUR.grid_factor )
  427. +        + 32 / CUR.grid_factor;
  428. +      if ( distance && val < 0 )
  429. +        val = 0;
  430. +    }
  431. +    else
  432. +    {
  433. +      val = -( FT_PIX_FLOOR_sphn( compensation - distance, CUR.grid_factor )
  434. +        + 32 / CUR.grid_factor);
  435. +      if ( val > 0 )
  436. +        val = 0;
  437. +    }
  438. +
  439. +    return val;
  440. +  }
  441. +
  442.    /*************************************************************************/
  443.    /*                                                                       */
  444.    /* <Function>                                                            */
  445. @@ -2149,6 +2210,31 @@
  446.      return val;
  447.    }
  448.  
  449. +  static FT_F26Dot6
  450. +  Round_Down_To_Grid_sphn( EXEC_OP_ FT_F26Dot6  distance,
  451. +                               FT_F26Dot6  compensation )
  452. +  {
  453. +    FT_F26Dot6  val;
  454. +
  455. +    FT_UNUSED_EXEC;
  456. +
  457. +    if ( distance >= 0 )
  458. +    {
  459. +      val = distance + compensation;
  460. +      if ( distance && val > 0 )
  461. +        val &= ~(64 / CUR.grid_factor - 1);
  462. +      else
  463. +        val = 0;
  464. +    }
  465. +    else
  466. +    {
  467. +      val = -( ( compensation - distance ) & -(64 / CUR.grid_factor) );
  468. +      if ( val > 0 )
  469. +        val = 0;
  470. +    }
  471. +
  472. +    return val;
  473. +  }
  474.  
  475.    /*************************************************************************/
  476.    /*                                                                       */
  477. @@ -2194,6 +2280,33 @@
  478.    }
  479.  
  480.  
  481. +
  482. +  static FT_F26Dot6
  483. +  Round_Up_To_Grid_sphn( EXEC_OP_ FT_F26Dot6  distance,
  484. +                             FT_F26Dot6  compensation )
  485. +  {
  486. +    FT_F26Dot6  val;
  487. +
  488. +    FT_UNUSED_EXEC;
  489. +
  490. +    if ( distance >= 0 )
  491. +    {
  492. +      val = distance + compensation + (64 / CUR.grid_factor - 1);
  493. +      if ( distance && val > 0 )
  494. +        val &= ~(64 / CUR.grid_factor - 1);
  495. +      else
  496. +        val = 0;
  497. +    }
  498. +    else
  499. +    {
  500. +      val = - FT_PIX_CEIL_sphn( compensation - distance, CUR.grid_factor );
  501. +      if ( val > 0 )
  502. +        val = 0;
  503. +    }
  504. +
  505. +    return val;
  506. +  }
  507. +
  508.    /*************************************************************************/
  509.    /*                                                                       */
  510.    /* <Function>                                                            */
  511. @@ -2238,6 +2351,32 @@
  512.    }
  513.  
  514.  
  515. +
  516. +  static FT_F26Dot6
  517. +  Round_To_Double_Grid_sphn( EXEC_OP_ FT_F26Dot6  distance,
  518. +                                 FT_F26Dot6  compensation )
  519. +  {
  520. +    FT_F26Dot6 val;
  521. +
  522. +    FT_UNUSED_EXEC;
  523. +
  524. +    if ( distance >= 0 )
  525. +    {
  526. +      val = distance + compensation + 16 / CUR.grid_factor;
  527. +      if ( distance && val > 0 )
  528. +        val &= ~(32 / CUR.grid_factor - 1);
  529. +      else
  530. +        val = 0;
  531. +    }
  532. +    else
  533. +    {
  534. +      val = -FT_PAD_ROUND( compensation - distance, 32 / CUR.grid_factor );
  535. +      if ( val > 0 )
  536. +        val = 0;
  537. +    }
  538. +
  539. +    return val;
  540. +  }
  541.    /*************************************************************************/
  542.    /*                                                                       */
  543.    /* <Function>                                                            */
  544. @@ -2288,6 +2427,14 @@
  545.    }
  546.  
  547.  
  548. +
  549. +  static FT_F26Dot6
  550. +  Round_Super_sphn( EXEC_OP_ FT_F26Dot6  distance,
  551. +                        FT_F26Dot6  compensation  )
  552. +  {
  553. +    return distance;
  554. +  }
  555. +
  556.    /*************************************************************************/
  557.    /*                                                                       */
  558.    /* <Function>                                                            */
  559. @@ -2336,6 +2483,15 @@
  560.    }
  561.  
  562.  
  563. +
  564. +  static FT_F26Dot6
  565. +  Round_Super_45_sphn( EXEC_OP_ FT_F26Dot6  distance,
  566. +                        FT_F26Dot6  compensation  )
  567. +  {
  568. +
  569. +    return distance;
  570. +  }
  571. +
  572.    /*************************************************************************/
  573.    /*                                                                       */
  574.    /* <Function>                                                            */
  575. @@ -2358,30 +2514,37 @@
  576.  
  577.      case TT_Round_To_Grid:
  578.        CUR.func_round = (TT_Round_Func)Round_To_Grid;
  579. +      CUR.func_round_sphn = (TT_Round_Func)Round_To_Grid_sphn;
  580.        break;
  581.  
  582.      case TT_Round_Up_To_Grid:
  583.        CUR.func_round = (TT_Round_Func)Round_Up_To_Grid;
  584. +      CUR.func_round_sphn = (TT_Round_Func)Round_Up_To_Grid_sphn;
  585.        break;
  586.  
  587.      case TT_Round_Down_To_Grid:
  588.        CUR.func_round = (TT_Round_Func)Round_Down_To_Grid;
  589. +      CUR.func_round_sphn = (TT_Round_Func)Round_Down_To_Grid_sphn;
  590.        break;
  591.  
  592.      case TT_Round_To_Half_Grid:
  593.        CUR.func_round = (TT_Round_Func)Round_To_Half_Grid;
  594. +      CUR.func_round_sphn = (TT_Round_Func)Round_To_Half_Grid_sphn;
  595.        break;
  596.  
  597.      case TT_Round_To_Double_Grid:
  598.        CUR.func_round = (TT_Round_Func)Round_To_Double_Grid;
  599. +      CUR.func_round_sphn = (TT_Round_Func)Round_To_Double_Grid_sphn;
  600.        break;
  601.  
  602.      case TT_Round_Super:
  603.        CUR.func_round = (TT_Round_Func)Round_Super;
  604. +      CUR.func_round_sphn = (TT_Round_Func)Round_Super_sphn;
  605.        break;
  606.  
  607.      case TT_Round_Super_45:
  608.        CUR.func_round = (TT_Round_Func)Round_Super_45;
  609. +      CUR.func_round_sphn = (TT_Round_Func)Round_Super_45_sphn;
  610.        break;
  611.      }
  612.    }
  613. @@ -3032,44 +3195,52 @@
  614.  
  615.  #define DO_RTHG                                         \
  616.      CUR.GS.round_state = TT_Round_To_Half_Grid;         \
  617. -    CUR.func_round = (TT_Round_Func)Round_To_Half_Grid;
  618. +    CUR.func_round = (TT_Round_Func)Round_To_Half_Grid; \
  619. +    CUR.func_round_sphn = (TT_Round_Func)Round_To_Half_Grid_sphn;
  620.  
  621.  
  622.  #define DO_RTG                                     \
  623.      CUR.GS.round_state = TT_Round_To_Grid;         \
  624. -    CUR.func_round = (TT_Round_Func)Round_To_Grid;
  625. +    CUR.func_round = (TT_Round_Func)Round_To_Grid; \
  626. +    CUR.func_round_sphn = (TT_Round_Func)Round_To_Grid_sphn;
  627.  
  628.  
  629.  #define DO_RTDG                                           \
  630.      CUR.GS.round_state = TT_Round_To_Double_Grid;         \
  631. -    CUR.func_round = (TT_Round_Func)Round_To_Double_Grid;
  632. +    CUR.func_round = (TT_Round_Func)Round_To_Double_Grid; \
  633. +    CUR.func_round_sphn = (TT_Round_Func)Round_To_Double_Grid_sphn;
  634.  
  635.  
  636.  #define DO_RUTG                                       \
  637.      CUR.GS.round_state = TT_Round_Up_To_Grid;         \
  638. -    CUR.func_round = (TT_Round_Func)Round_Up_To_Grid;
  639. +    CUR.func_round = (TT_Round_Func)Round_Up_To_Grid; \
  640. +    CUR.func_round_sphn = (TT_Round_Func)Round_Up_To_Grid_sphn;
  641.  
  642.  
  643.  #define DO_RDTG                                         \
  644.      CUR.GS.round_state = TT_Round_Down_To_Grid;         \
  645. -    CUR.func_round = (TT_Round_Func)Round_Down_To_Grid;
  646. +    CUR.func_round = (TT_Round_Func)Round_Down_To_Grid; \
  647. +    CUR.func_round_sphn = (TT_Round_Func)Round_Down_To_Grid_sphn;
  648.  
  649.  
  650.  #define DO_ROFF                                 \
  651.      CUR.GS.round_state = TT_Round_Off;          \
  652. -    CUR.func_round = (TT_Round_Func)Round_None;
  653. +    CUR.func_round = (TT_Round_Func)Round_None; \
  654. +    CUR.func_round_sphn = (TT_Round_Func)Round_None;
  655.  
  656.  
  657.  #define DO_SROUND                                \
  658.      SET_SuperRound( 0x4000, args[0] );           \
  659.      CUR.GS.round_state = TT_Round_Super;         \
  660. -    CUR.func_round = (TT_Round_Func)Round_Super;
  661. +    CUR.func_round = (TT_Round_Func)Round_Super; \
  662. +    CUR.func_round_sphn = (TT_Round_Func)Round_Super_sphn;
  663.  
  664.  
  665.  #define DO_S45ROUND                                 \
  666.      SET_SuperRound( 0x2D41, args[0] );              \
  667.      CUR.GS.round_state = TT_Round_Super_45;         \
  668. -    CUR.func_round = (TT_Round_Func)Round_Super_45;
  669. +    CUR.func_round = (TT_Round_Func)Round_Super_45; \
  670. +    CUR.func_round_sphn = (TT_Round_Func)Round_Super_45_sphn;
  671.  
  672.  
  673.  #define DO_SLOOP                       \
  674. @@ -3297,7 +3468,9 @@
  675.           args[0] = 0;                   \
  676.       }                                  \
  677.       else                               \
  678. -       args[0] = CUR.storage[I];        \
  679. +        /* Subpixel Hinting- Typeman Dstroke and Istroke, Vacuform Rounds */ \
  680. +       if (CUR.subpixel && (I == 24 || I == 22 || I == 8)) args[0] = 0; \
  681. +       else args[0] = CUR.storage[I];  \
  682.     }
  683.  
  684.  
  685. @@ -5154,6 +5327,9 @@
  686.        }
  687.      }
  688.  
  689. +   /* Subpixel Hinting - Type 2 Vacuform Rounds - Arial Narrow */
  690. +   if (CUR.subpixel && FT_ABS(D) == 64) D += 1;
  691. +
  692.      args[0] = D;
  693.    }
  694.  
  695. @@ -5633,14 +5809,15 @@
  696.        return;
  697.      }
  698.  #endif
  699. -
  700. +if (CUR.skip_x == 0){
  701.      if ( CUR.GS.freeVector.x != 0 )
  702.      {
  703.        CUR.zp2.cur[point].x += dx;
  704.        if ( touch )
  705.          CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
  706.      }
  707. -
  708. +}
  709. +if (CUR.skip_y == 0){
  710.      if ( CUR.GS.freeVector.y != 0 )
  711.      {
  712.        CUR.zp2.cur[point].y += dy;
  713. @@ -5648,7 +5825,7 @@
  714.          CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
  715.      }
  716.    }
  717. -
  718. +  }
  719.  
  720.    /*************************************************************************/
  721.    /*                                                                       */
  722. @@ -5863,7 +6040,18 @@
  723.          }
  724.        }
  725.        else
  726. -        MOVE_Zp2_Point( point, dx, dy, TRUE );
  727. +      {
  728. +        /* If freedom vector is Y, and point is touched, continue */
  729. +        if ( CUR.subpixel && CUR.GS.freeVector.y != 0 && CUR.iup_called == 0
  730. +          && ( ( CUR.pts.tags[point] & FT_CURVE_TAG_TOUCH_X ) != 0
  731. +            || ( CUR.pts.tags[point] & FT_CURVE_TAG_TOUCH_Y ) != 0 )
  732. +        ){
  733. +          MOVE_Zp2_Point( point, dx, dy, TRUE ); }
  734. +
  735. +        else if ( !CUR.subpixel || CUR.is_composite )
  736. +          MOVE_Zp2_Point( point, dx, dy, TRUE );
  737. +
  738. +      }
  739.  
  740.        CUR.GS.loop--;
  741.      }
  742. @@ -5908,6 +6096,15 @@
  743.      distance = CUR_Func_project( CUR.zp1.cur + point,
  744.                                   CUR.zp0.cur + CUR.GS.rp0 );
  745.  
  746. +    /* Subpixel Hinting - make MSIRP respect CVT cutin            */
  747. +    /* Fixes "k" issue with Arial                                 */
  748. +    /* Using 0 instead of CUR.GS.control_value_cutin/grid_factor  */
  749. +    /* fixes Helvetica Neue                                       */
  750. +    if (CUR.subpixel && CUR.GS.freeVector.x != 0
  751. +      && FT_ABS(distance - args[1]) >= 0 )
  752. +      distance = args[1];
  753. +
  754. +
  755.      CUR_Func_move( &CUR.zp1, point, args[1] - distance );
  756.  
  757.      CUR.GS.rp1 = CUR.GS.rp0;
  758. @@ -5946,7 +6143,10 @@
  759.      if ( ( CUR.opcode & 1 ) != 0 )
  760.      {
  761.        cur_dist = CUR_fast_project( &CUR.zp0.cur[point] );
  762. -      distance = CUR_Func_round( cur_dist,
  763. +      if (!CUR.subpixel || CUR.GS.freeVector.x == 0)
  764. +        distance = CUR_Func_round( cur_dist,
  765. +                                 CUR.tt_metrics.compensations[0] ) - cur_dist;
  766. +      else distance = CUR_Func_round_sphn( cur_dist,
  767.                                   CUR.tt_metrics.compensations[0] ) - cur_dist;
  768.      }
  769.      else
  770. @@ -6020,10 +6220,20 @@
  771.  
  772.      if ( ( CUR.opcode & 1 ) != 0 )   /* rounding and control cutin flag */
  773.      {
  774. -      if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
  775. -        distance = org_dist;
  776.  
  777. -      distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
  778. +      if ( !CUR.subpixel || CUR.GS.freeVector.x == 0 )
  779. +      {
  780. +        if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin)
  781. +          distance = org_dist;
  782. +        distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
  783. +      }
  784. +      else
  785. +      {
  786. +        if ( FT_ABS( distance - org_dist )
  787. +                > CUR.GS.control_value_cutin / CUR.grid_factor)
  788. +          distance = org_dist;
  789. +        distance = CUR_Func_round_sphn( distance, CUR.tt_metrics.compensations[0] );
  790. +      }
  791.      }
  792.  
  793.      CUR_Func_move( &CUR.zp0, point, distance - org_dist );
  794. @@ -6107,9 +6317,15 @@
  795.      /* round flag */
  796.  
  797.      if ( ( CUR.opcode & 4 ) != 0 )
  798. -      distance = CUR_Func_round(
  799. +    {
  800. +      if ( !CUR.subpixel || CUR.GS.freeVector.x == 0 )
  801. +        distance = CUR_Func_round(
  802. +                   org_dist,
  803. +                   CUR.tt_metrics.compensations[CUR.opcode & 3] );
  804. +      else distance = CUR_Func_round_sphn(
  805.                     org_dist,
  806.                     CUR.tt_metrics.compensations[CUR.opcode & 3] );
  807. +    }
  808.      else
  809.        distance = ROUND_None(
  810.                     org_dist,
  811. @@ -6117,17 +6333,36 @@
  812.  
  813.      /* minimum distance flag */
  814.  
  815. -    if ( ( CUR.opcode & 8 ) != 0 )
  816. -    {
  817. -      if ( org_dist >= 0 )
  818. +    /* Use 2/3 in x direction.  Better results than documented 1/2 */
  819. +    if (CUR.GS.freeVector.x != 0 && CUR.subpixel ){
  820. +      if ( ( CUR.opcode & 8 ) != 0 )
  821.        {
  822. -        if ( distance < CUR.GS.minimum_distance )
  823. -          distance = CUR.GS.minimum_distance;
  824. +        if ( org_dist >= 0 )
  825. +        {
  826. +          if ( distance < 2*CUR.GS.minimum_distance/3 )
  827. +            distance = 2*CUR.GS.minimum_distance/3;
  828. +        }
  829. +        else
  830. +        {
  831. +          if ( distance > -CUR.GS.minimum_distance/2 )
  832. +            distance = -CUR.GS.minimum_distance/2;
  833. +        }
  834.        }
  835. -      else
  836. +    }
  837. +    else
  838. +    {
  839. +      if ( ( CUR.opcode & 8 ) != 0 )
  840.        {
  841. -        if ( distance > -CUR.GS.minimum_distance )
  842. -          distance = -CUR.GS.minimum_distance;
  843. +        if ( org_dist >= 0 )
  844. +        {
  845. +          if ( distance < CUR.GS.minimum_distance )
  846. +            distance = CUR.GS.minimum_distance;
  847. +        }
  848. +        else
  849. +        {
  850. +          if ( distance > -CUR.GS.minimum_distance )
  851. +            distance = -CUR.GS.minimum_distance;
  852. +        }
  853.        }
  854.      }
  855.  
  856. @@ -6163,7 +6398,6 @@
  857.                  cur_dist,
  858.                  org_dist;
  859.  
  860. -
  861.      point    = (FT_UShort)args[0];
  862.      cvtEntry = (FT_ULong)( args[1] + 1 );
  863.  
  864. @@ -6224,41 +6458,84 @@
  865.  
  866.      /* control value cutin and round */
  867.  
  868. -    if ( ( CUR.opcode & 4 ) != 0 )
  869. +    if ( (!CUR.subpixel && ( CUR.opcode & 4 ) != 0) || CUR.subpixel )
  870.      {
  871.        /* XXX: UNDOCUMENTED!  Only perform cut-in test when both points */
  872.        /*      refer to the same zone.                                  */
  873.  
  874. -      if ( CUR.GS.gep0 == CUR.GS.gep1 )
  875. -        if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
  876. -          cvt_dist = org_dist;
  877. +      if ( (!CUR.subpixel && CUR.GS.gep0 == CUR.GS.gep1) || CUR.subpixel )
  878. +      {
  879. +        if ( (CUR.subpixel && CUR.GS.freeVector.x == 0) || !CUR.subpixel )
  880. +        {
  881. +          if ( FT_ABS(cvt_dist - org_dist)  >= CUR.GS.control_value_cutin  )
  882. +            cvt_dist = org_dist;
  883. +
  884. +          distance = CUR_Func_round(
  885. +            cvt_dist,
  886. +            CUR.tt_metrics.compensations[CUR.opcode & 3] );
  887. +        }
  888.  
  889. -      distance = CUR_Func_round(
  890. +        else if (CUR.subpixel)
  891. +        {
  892. +          if ( FT_ABS(cvt_dist - org_dist)
  893. +                >= CUR.GS.control_value_cutin / CUR.grid_factor )
  894. +                  cvt_dist = org_dist;
  895. +
  896. +          distance = CUR_Func_round_sphn(
  897.                     cvt_dist,
  898.                     CUR.tt_metrics.compensations[CUR.opcode & 3] );
  899. +        }
  900. +
  901. +      /* This fixes subpixel hinting italics (Verdana) but may be hacky */
  902. +        else
  903. +          distance = ROUND_None(
  904. +                   cvt_dist,
  905. +                   CUR.tt_metrics.compensations[CUR.opcode & 3] );
  906. +      }
  907.      }
  908. -    else
  909. +    else if (!CUR.subpixel){
  910.        distance = ROUND_None(
  911.                     cvt_dist,
  912.                     CUR.tt_metrics.compensations[CUR.opcode & 3] );
  913. +    }
  914.  
  915.      /* minimum distance test */
  916. -
  917. -    if ( ( CUR.opcode & 8 ) != 0 )
  918. +   if (CUR.GS.freeVector.x != 0 && CUR.subpixel)
  919.      {
  920. -      if ( org_dist >= 0 )
  921. +      if ( ( CUR.opcode & 8 ) != 0 )
  922.        {
  923. -        if ( distance < CUR.GS.minimum_distance )
  924. -          distance = CUR.GS.minimum_distance;
  925. +        if ( org_dist >= 0 )
  926. +        {
  927. +          if ( distance < 2 * CUR.GS.minimum_distance / 3 )
  928. +            distance = 2 * CUR.GS.minimum_distance / 3;
  929. +        }
  930. +        else
  931. +        {
  932. +          if ( distance > -2 * CUR.GS.minimum_distance / 3 )
  933. +            distance = -2 * CUR.GS.minimum_distance / 3;
  934. +        }
  935. +
  936.        }
  937. -      else
  938. +    }
  939. +    else
  940. +    {
  941. +      if ( ( CUR.opcode & 8 ) != 0 )
  942.        {
  943. -        if ( distance > -CUR.GS.minimum_distance )
  944. -          distance = -CUR.GS.minimum_distance;
  945. +        if ( org_dist >= 0 )
  946. +        {
  947. +          if ( distance < CUR.GS.minimum_distance )
  948. +            distance = CUR.GS.minimum_distance;
  949. +        }
  950. +        else
  951. +        {
  952. +          if ( distance > -CUR.GS.minimum_distance )
  953. +            distance = -CUR.GS.minimum_distance;
  954. +        }
  955.        }
  956. +
  957.      }
  958.  
  959. -    CUR_Func_move( &CUR.zp1, point, distance - cur_dist );
  960. +      CUR_Func_move( &CUR.zp1, point, distance - cur_dist );
  961.  
  962.      CUR.GS.rp1 = CUR.GS.rp0;
  963.  
  964. @@ -6727,6 +7004,7 @@
  965.  
  966.      FT_UNUSED_ARG;
  967.  
  968. +    CUR.iup_called = 1;
  969.  
  970.      /* ignore empty outlines */
  971.      if ( CUR.pts.n_contours == 0 )
  972. @@ -6821,7 +7099,7 @@
  973.      FT_UShort  A;
  974.      FT_ULong   C;
  975.      FT_Long    B;
  976. -
  977. +    FT_Byte    orig_round_state;
  978.  
  979.  #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
  980.      /* Delta hinting is covered by US Patent 5159668. */
  981. @@ -6891,7 +7169,28 @@
  982.              B++;
  983.            B = B * 64 / ( 1L << CUR.GS.delta_shift );
  984.  
  985. -          CUR_Func_move( &CUR.zp0, A, B );
  986. +          /* This dirty hack fixes subpixel y-artifacts in trebuchet,  */
  987. +          /* verdana bold, ms sans serif, due to bi-level deltas in y  */
  988. +          /* direction, but breaks some glyphs (trebuchet e, times e,  */
  989. +          /* arial bold S.  Needs work.  */
  990. +
  991. +          if (0 && CUR.GS.freeVector.y != 0 && CUR.subpixel  )
  992. +          {
  993. +            orig_round_state= CUR.GS.round_state;
  994. +            COMPUTE_Round( TT_Round_Down_To_Grid );
  995. +            B = CUR_Func_round( B, CUR.tt_metrics.compensations[0] );
  996. +            COMPUTE_Round( orig_round_state );
  997. +          }
  998. +
  999. +          /* Only allow deltas under certain conditions */
  1000. +          if ( CUR.subpixel && CUR.GS.freeVector.y != 0 && CUR.iup_called == 0
  1001. +            &&  (( CUR.pts.tags[A] & FT_CURVE_TAG_TOUCH_X ) != 0
  1002. +              || ( CUR.pts.tags[A] & FT_CURVE_TAG_TOUCH_Y ) != 0 )
  1003. +             ){
  1004. +            CUR_Func_move(&CUR.zp0, A, B); }
  1005. +          else if ( !CUR.subpixel || CUR.is_composite )
  1006. +            CUR_Func_move(&CUR.zp0, A, B);
  1007. +
  1008.          }
  1009.        }
  1010.        else
  1011. @@ -7016,9 +7315,9 @@
  1012.  
  1013.      K = 0;
  1014.  
  1015. -    /* We return MS rasterizer version 1.7 for the font scaler. */
  1016. +    /* We return MS rasterizer version 1.8 for the font scaler. */
  1017.      if ( ( args[0] & 1 ) != 0 )
  1018. -      K = 35;
  1019. +      K = 37;
  1020.  
  1021.      /* Has the glyph been rotated? */
  1022.      if ( ( args[0] & 2 ) != 0 && CUR.tt_metrics.rotated )
  1023. @@ -7032,6 +7331,27 @@
  1024.      if ( ( args[0] & 32 ) != 0 && CUR.grayscale )
  1025.        K |= 1 << 12;
  1026.  
  1027. +    /* Are we hinting for subpixel? */
  1028. +    if ( ( args[0] & 64 ) != 0 && CUR.subpixel )
  1029. +      K |= 1 << 13;
  1030. +
  1031. +    /* Are we hinting for compatible_widths? */
  1032. +    if ( ( args[0] & 128 ) != 0 && CUR.compatible_widths ){
  1033. +      K |= 1 << 14;
  1034. +      CUR.skip_x = 0;
  1035. +    }
  1036. +    else CUR.skip_x = 1;
  1037. +    CUR.skip_y = 0;
  1038. +
  1039. +    /* Are we hinting for symmetrical_smoothing? */
  1040. +    /*if ( ( args[0] & 256 ) != 0 && CUR.symmetrical_smoothing )*/
  1041. +    /* Forcibly setting to 0 fixes PALATINO */
  1042. +      K |= 0 << 15;
  1043. +
  1044. +    /* Are we hinting for bgr? */
  1045. +    if ( ( args[0] & 512 ) != 0 && CUR.bgr )
  1046. +      K |= 1 << 16;
  1047. +
  1048.      args[0] = K;
  1049.    }
  1050.  
  1051. @@ -7405,6 +7725,13 @@
  1052.  #ifdef TT_CONFIG_OPTION_STATIC_RASTER
  1053.      cur = *exc;
  1054.  #endif
  1055. +    if (CUR.subpixel)
  1056. +      /* 1/32 of a pixel in y direction */
  1057. +      CUR.grid_factor = 32;
  1058. +    else
  1059. +      CUR.grid_factor = 1;
  1060. +
  1061. +    CUR.iup_called = 0;
  1062.  
  1063.      /* set CVT functions */
  1064.      CUR.tt_metrics.ratio = 0;
  1065. diff -Naur freetype-2.4.2-orig//src/truetype/ttinterp.h freetype-2.4.2/src/truetype/ttinterp.h
  1066. --- freetype-2.4.2-orig//src/truetype/ttinterp.h    2010-08-06 04:56:05.000000000 +0700
  1067. +++ freetype-2.4.2/src/truetype/ttinterp.h  2010-08-27 13:40:14.000000000 +0700
  1068. @@ -203,6 +203,7 @@
  1069.      FT_Long            F_dot_P;    /* dot product of freedom and projection */
  1070.                                     /* vectors                               */
  1071.      TT_Round_Func      func_round; /* current rounding function             */
  1072. +    TT_Round_Func      func_round_sphn; /* subpixel rounding function       */
  1073.  
  1074.      TT_Project_Func    func_project,   /* current projection function */
  1075.                         func_dualproj,  /* current dual proj. function */
  1076. @@ -215,7 +216,16 @@
  1077.      TT_Set_CVT_Func    func_write_cvt; /* write a cvt entry (in pixels) */
  1078.      TT_Set_CVT_Func    func_move_cvt;  /* incr a cvt entry (in pixels)  */
  1079.  
  1080. -    FT_Bool            grayscale;      /* are we hinting for grayscale? */
  1081. +    FT_Bool            grayscale;         /* are we hinting for grayscale?  */
  1082. +    FT_Bool            subpixel;          /* are we hinting for subpixel?   */
  1083. +    FT_Bool            compatible_widths; /* are we using compatible widths?*/
  1084. +    FT_Bool            symmetrical_smoothing; /* symmetrical_smoothing ?    */
  1085. +    FT_Bool            bgr;               /* are we using bgr, not rgb?     */
  1086. +
  1087. +    FT_Bool            grid_factor;    /* freedom vector resol (1 < 32) */
  1088. +    FT_Bool            iup_called;     /* IUP[] been called for this glyph? */
  1089. +    FT_Bool            skip_x;         /* Skip all x moves? */
  1090. +    FT_Bool            skip_y;         /* Skip all y moves? */
  1091.  
  1092.    } TT_ExecContextRec;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement