Re: [ft-devel] controlling FreeType modules

2012-08-11 Thread Werner LEMBERG

Hello Toshiya-san!


Sorry for the late response.

> At present, FTC_Manager instance is allocated with FT_Library's
> allocator, FT_Library object itself does not have a (list of)
> FTC_Manager, so, it could be slightly difficult for set- property
> functions to invoke the cache flusher. There might be 2 ways:
> 
> A) set-property function does not invoke the cache flusher, but sets
> some internal flags in FT_Library or FT_Face to indicate the change
> of the properties. when the cache is accessed, the cache manager
> checks the flag and flush if needed.
> 
> B) put a list of FTC_Manager instance(s list) into FT_Library.  if
> set-property functions are used, FT_Library instances invoke the
> cache flusher of the listed FTC_Manager instance(s).
> 
> Which is better?

What about

 C) If an application uses FreeType's cache system, it should call
`FTC_Manager_Reset' to flush the cache.

?  This sounds rather straightforward to me, and it fully avoids any
internal hassles.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] [bug #37017] Freetype 2.4.8 renders the "Sabrina-AT" font incorrectly.

2012-08-11 Thread Werner LEMBERG

Graham, David,


some time ago we had a discussion about the usefulness of a patch from
Alexei:

  http://lists.nongnu.org/archive/html/freetype-devel/2010-11/msg00010.html

However, right now the usefulness is evident, since applying the patch
fixes the quite serious issue #37017. :-)

  https://savannah.nongnu.org/bugs/index.php?37017

For reference, I'm attaching his patch below.  In case you have Bézier
harness tests, please run them!

Alexei, please extend the comment so that normal mortals like me can
better understand the mathematical logic behind your change, then
apply it.


Werner


==


diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index a7a18f2..bb263fb 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1082,10 +1082,8 @@ typedef ptrdiff_t  FT_PtrDist;
   goto Split;

 /* If P1 or P2 is outside P0-P3, split the curve. */
-if ( dy * dy1 + dx * dx1 < 0 ||
- dy * dy2 + dx * dx2 < 0 ||
- dy * (arc[3].y - arc[1].y) + dx * (arc[3].x - arc[1].x) < 0 ||
- dy * (arc[3].y - arc[2].y) + dx * (arc[3].x - arc[2].x) < 0 )
+if ( dx1 * ( dx1 - dx ) + dy1 * ( dy1 - dy ) > 0 ||
+ dx2 * ( dx2 - dx ) + dy2 * ( dy2 - dy ) > 0 )
   goto Split;

 /* No reason to split. */

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel