[prev in list] [next in list] [prev in thread] [next in thread]
List: freetype-devel
Subject: Re: [Devel] Some news
From: Owen Taylor <otaylor () redhat ! com>
Date: 2002-07-31 16:12:51
[Download RAW message or body]
Owen Taylor <otaylor@redhat.com> writes:
> > Besides, thin stems /part of glyphs of so-called "high-contrast typefaces"
> > (like Bodoni, Bodoni Poster) are disappearing, creating geometrical
> > distortion. Is it possible to fix in some way?
>
> You might be seeing a PS hinter bug with points being snapped to the
> wrong side of stems. You can try the attached patch. (I'm not quite
> ready to say this patch is fully correct, but it certainly fixes some
> problems.)
Argh! wrong patch. (yes, that was the big Hint_Flags patch again).
Sorry for the confusion. The patch I meant is appended.
Owen
[Attachment #3 (text/x-patch)]
Index: src/pshinter/pshalgo3.c
===================================================================
RCS file: /cvs/freetype/freetype2/src/pshinter/pshalgo3.c,v
retrieving revision 1.2
diff -u -p -r1.2 pshalgo3.c
--- pshalgo3.c 2002/07/08 22:26:11 1.2
+++ pshalgo3.c 2002/07/31 16:05:46
@@ -956,6 +956,10 @@
#define PSH3_STRONG_THRESHOLD 10
+ /* major_dir is the direction for points on the bottom/left of the stem;
+ * Points on the top/right of the stem will have a direction of
+ * -major_dir.
+ */
static void
psh3_hint_table_find_strong_point( PSH3_Hint_Table table,
PSH3_Point point,
@@ -968,26 +972,27 @@
for ( ; num_hints > 0; num_hints--, sort++ )
{
PSH3_Hint hint = sort[0];
+ FT_Pos d;
-
- if ( ABS( point->dir_in ) == major_dir ||
- ABS( point->dir_out ) == major_dir )
+
+ d = point->org_u - hint->org_pos;
+
+ if ( point->dir_in == major_dir ||
+ point->dir_out == major_dir )
{
- FT_Pos d;
-
-
- d = point->org_u - hint->org_pos;
- if ( ABS( d ) < PSH3_STRONG_THRESHOLD )
- {
- Is_Strong:
- psh3_point_set_strong( point );
- point->hint = hint;
- break;
- }
-
- d -= hint->org_len;
- if ( ABS( d ) < PSH3_STRONG_THRESHOLD )
- goto Is_Strong;
+ if ( ABS( d ) < PSH2_STRONG_THRESHOLD )
+ {
+ Is_Strong:
+ psh2_point_set_strong( point );
+ point->hint = hint;
+ break;
+ }
+ }
+ else
+ {
+ d -= hint->org_len;
+ if ( ABS( d ) < PSH2_STRONG_THRESHOLD )
+ goto Is_Strong;
}
#if 1
@@ -1016,7 +1021,7 @@
PS_Mask mask = table->hint_masks->masks;
FT_UInt num_masks = table->hint_masks->num_masks;
FT_UInt first = 0;
- FT_Int major_dir = dimension == 0 ? PSH3_DIR_UP : PSH3_DIR_RIGHT;
+ FT_Int major_dir = dimension == 0 ? PSH3_DIR_DOWN : PSH3_DIR_RIGHT;
/* process secondary hints to "selected" points */
_______________________________________________
Devel mailing list
Devel@freetype.org
http://www.freetype.org/mailman/listinfo/devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic