Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 83880 Details for
Bug 128760
Series patches for freetype 2.1.10
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bugzilla-158573-fix-orientation-detection.patch
bugzilla-158573-fix-orientation-detection.patch (text/plain), 2.14 KB, created by
Lin Hao-jie
on 2006-04-04 05:12:26 UTC
(
hide
)
Description:
bugzilla-158573-fix-orientation-detection.patch
Filename:
MIME Type:
Creator:
Lin Hao-jie
Created:
2006-04-04 05:12:26 UTC
Size:
2.14 KB
patch
obsolete
>diff -ur freetype-2.1.10.built/src/base/ftoutln.c freetype-2.1.10/src/base/ftoutln.c >--- freetype-2.1.10.built/src/base/ftoutln.c 2006-03-18 01:01:26.000000000 +0800 >+++ freetype-2.1.10/src/base/ftoutln.c 2006-03-18 01:06:18.000000000 +0800 >@@ -778,7 +778,10 @@ > contour++, first = last + 1 ) > { > FT_Vector* point; >- >+ FT_Int on_curve; >+ FT_Int on_curve_count = 0; >+ FT_Pos tmp_xmin = 32768L; >+ FT_Vector* tmp_xmin_point = NULL; > > last = outline->points + *contour; > >@@ -786,16 +789,28 @@ > if ( last < first + 2 ) > continue; > >- for ( point = first; point <= last; point++ ) >+ for ( point = first; point <= last; ++point ) > { >- if ( point->x < xmin ) >+ /* Count on curve points, if there are less than 3 on curve points, >+ then just bypass this contour. >+ */ >+ on_curve = (outline->tags [point - outline->points] & 1); >+ on_curve_count += on_curve; >+ >+ if ( point->x < tmp_xmin && on_curve) > { >- xmin = point->x; >- xmin_point = point; >- xmin_first = first; >- xmin_last = last; >+ tmp_xmin = point->x; >+ tmp_xmin_point = point; > } > } >+ >+ if (on_curve_count > 2 && tmp_xmin < xmin) >+ { >+ xmin = tmp_xmin; >+ xmin_point = tmp_xmin_point; >+ xmin_first = first; >+ xmin_last = last; >+ } > } > > if ( !xmin_point ) >@@ -804,6 +819,19 @@ > prev = ( xmin_point == xmin_first ) ? xmin_last : xmin_point - 1; > next = ( xmin_point == xmin_last ) ? xmin_first : xmin_point + 1; > >+ /* Skip off curve points */ >+ while ((outline->tags [prev - outline->points] & 1) == 0) >+ { >+ if (prev == xmin_first) prev = xmin_last; >+ else --prev; >+ } >+ >+ while ((outline->tags [next - outline->points] & 1) == 0) >+ { >+ if (next == xmin_last) next = xmin_first; >+ else ++next; >+ } >+ > if ( FT_Atan2( prev->x - xmin_point->x, prev->y - xmin_point->y ) > > FT_Atan2( next->x - xmin_point->x, next->y - xmin_point->y ) ) > return FT_ORIENTATION_POSTSCRIPT;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 128760
:
83876
|
83877
|
83878
|
83879
| 83880 |
83881
|
83883
|
83885
|
83955
|
83956
|
83957
|
83958
|
83959
|
83960