mirror of https://github.com/freetype/freetype
[cff] Fix for hints that touch.
* src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for finding index value of insertion point.
This commit is contained in:
parent
5e225b7c15
commit
dd21301ef2
|
@ -1,3 +1,10 @@
|
||||||
|
2013-11-08 Dave Arnold <darnold@adobe.com>
|
||||||
|
|
||||||
|
[cff] Fix for hints that touch.
|
||||||
|
|
||||||
|
* src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
|
||||||
|
finding index value of insertion point.
|
||||||
|
|
||||||
2013-11-06 Werner Lemberg <wl@gnu.org>
|
2013-11-06 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[truetype] Fix handling of phantom points in composite glyphs.
|
[truetype] Fix handling of phantom points in composite glyphs.
|
||||||
|
|
|
@ -596,22 +596,31 @@
|
||||||
indexInsert = 0;
|
indexInsert = 0;
|
||||||
for ( ; indexInsert < hintmap->count; indexInsert++ )
|
for ( ; indexInsert < hintmap->count; indexInsert++ )
|
||||||
{
|
{
|
||||||
if ( hintmap->edge[indexInsert].csCoord > firstHintEdge->csCoord )
|
if ( hintmap->edge[indexInsert].csCoord >= firstHintEdge->csCoord )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Discard any hints that overlap in character space. Most often,
|
* Discard any hints that overlap in character space. Most often, this
|
||||||
* this is while building the initial map, but in theory, it can also
|
* is while building the initial map, where captured hints from all
|
||||||
* occur because of darkening.
|
* zones are combined. Define overlap to include hints that `touch'
|
||||||
|
* (overlap zero). Hiragino Sans/Gothic fonts have numerous hints that
|
||||||
|
* touch. Some fonts have non-ideographic glyphs that overlap our
|
||||||
|
* synthetic hints.
|
||||||
|
*
|
||||||
|
* Overlap also occurs when darkening stem hints that are close.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ( indexInsert < hintmap->count )
|
if ( indexInsert < hintmap->count )
|
||||||
{
|
{
|
||||||
/* we are inserting before an existing edge: */
|
/* we are inserting before an existing edge: */
|
||||||
|
/* verify that an existing edge is not the same */
|
||||||
|
if ( hintmap->edge[indexInsert].csCoord == firstHintEdge->csCoord )
|
||||||
|
return; /* ignore overlapping stem hint */
|
||||||
|
|
||||||
/* verify that a new pair does not straddle the next edge */
|
/* verify that a new pair does not straddle the next edge */
|
||||||
if ( isPair &&
|
if ( isPair &&
|
||||||
hintmap->edge[indexInsert].csCoord < secondHintEdge->csCoord )
|
hintmap->edge[indexInsert].csCoord <= secondHintEdge->csCoord )
|
||||||
return; /* ignore overlapping stem hint */
|
return; /* ignore overlapping stem hint */
|
||||||
|
|
||||||
/* verify that we are not inserting between paired edges */
|
/* verify that we are not inserting between paired edges */
|
||||||
|
|
Loading…
Reference in New Issue