Lines Matching refs:edge

60     size_t     j;          /* index of upper hint map edge   */
142 * non-Adobe font tool. The Type 2 spec allows edge (ghost) hints
184 /* Now that ghost hints have been detected, adjust this edge for */
313 CF2_Hint hint = &hintmap->edge[i];
352 csCoord >= hintmap->edge[i + 1].csCoord )
356 while ( i > 0 && csCoord < hintmap->edge[i].csCoord )
361 if ( i == 0 && csCoord < hintmap->edge[0].csCoord )
363 /* special case for points below first edge: use uniform scale */
365 hintmap->edge[0].csCoord ),
367 hintmap->edge[0].dsCoord );
373 * Use edge[i], the highest entry where csCoord >= entry[i].csCoord
376 hintmap->edge[i].csCoord ),
377 hintmap->edge[i].scale ),
378 hintmap->edge[i].dsCoord );
416 FT_Bool isPair = cf2_hint_isPair( &hintmap->edge[i] );
419 /* index of upper edge (same value for ghost hint) */
423 FT_ASSERT( cf2_hint_isValid( &hintmap->edge[i] ) );
424 FT_ASSERT( cf2_hint_isValid( &hintmap->edge[j] ) );
425 FT_ASSERT( cf2_hint_isLocked( &hintmap->edge[i] ) ==
426 cf2_hint_isLocked( &hintmap->edge[j] ) );
428 if ( !cf2_hint_isLocked( &hintmap->edge[i] ) )
430 /* hint edge is not locked, we can adjust it */
431 CF2_Fixed fracDown = cf2_fixedFraction( hintmap->edge[i].dsCoord );
432 CF2_Fixed fracUp = cf2_fixedFraction( hintmap->edge[j].dsCoord );
449 /* final amount to move edge or edge pair */
462 cf2_hint_isSynthetic( &hintmap->edge[i - 1] ) )
466 cf2_hint_isSynthetic( &hintmap->edge[j + 1] ) )
471 /* there is if we are at top of array or the next edge is at or */
474 hintmap->edge[j + 1].dsCoord >=
475 ADD_INT32( hintmap->edge[j].dsCoord,
480 hintmap->edge[i - 1].dsCoord <=
481 ADD_INT32( hintmap->edge[i].dsCoord,
494 hintmap->edge[i - 1].dsCoord <=
495 ADD_INT32( hintmap->edge[i].dsCoord,
513 /* Do this only if there is an unlocked edge above (which could */
517 !cf2_hint_isLocked( &hintmap->edge[j + 1] ) )
529 /* move the edge(s) */
530 hintmap->edge[i].dsCoord = ADD_INT32( hintmap->edge[i].dsCoord,
533 hintmap->edge[j].dsCoord = ADD_INT32( hintmap->edge[j].dsCoord,
539 hintmap->edge[i - 1].dsCoord <= hintmap->edge[i].dsCoord );
541 hintmap->edge[i].dsCoord <= hintmap->edge[j].dsCoord );
546 if ( hintmap->edge[i].csCoord != hintmap->edge[i - 1].csCoord )
547 hintmap->edge[i - 1].scale =
548 FT_DivFix( SUB_INT32( hintmap->edge[i].dsCoord,
549 hintmap->edge[i - 1].dsCoord ),
550 SUB_INT32( hintmap->edge[i].csCoord,
551 hintmap->edge[i - 1].csCoord ) );
556 if ( hintmap->edge[j].csCoord != hintmap->edge[j - 1].csCoord )
557 hintmap->edge[j - 1].scale =
558 FT_DivFix( SUB_INT32( hintmap->edge[j].dsCoord,
559 hintmap->edge[j - 1].dsCoord ),
560 SUB_INT32( hintmap->edge[j].csCoord,
561 hintmap->edge[j - 1].csCoord ) );
563 i += 1; /* skip upper edge on next loop */
581 if ( hintmap->edge[j + 1].dsCoord >=
582 ADD_INT32( hintmap->edge[j].dsCoord,
585 /* there is more room now, move edge up */
586 hintmap->edge[j].dsCoord = ADD_INT32( hintmap->edge[j].dsCoord,
589 if ( cf2_hint_isPair( &hintmap->edge[j] ) )
592 hintmap->edge[j - 1].dsCoord =
593 ADD_INT32( hintmap->edge[j - 1].dsCoord, hintMove->moveUp );
608 /* set default values, then check for edge hints */
615 /* edge hints; at least one edge must be valid */
622 /* insert only the top edge */
628 /* insert only the bottom edge */
641 if ( hintmap->edge[indexInsert].csCoord >= firstHintEdge->csCoord )
666 /* we are inserting before an existing edge: */
667 /* verify that an existing edge is not the same */
668 if ( hintmap->edge[indexInsert].csCoord == firstHintEdge->csCoord )
671 /* verify that a new pair does not straddle the next edge */
673 hintmap->edge[indexInsert].csCoord <= secondHintEdge->csCoord )
677 if ( cf2_hint_isPairTop( &hintmap->edge[indexInsert] ) )
717 * 25. Pair 667,747 initially conflicts in design space with top edge
718 * 660. This is because 667 maps to 7.87, and the top edge was
720 * in a zone without the top edge. In this zone it is adjusted to 8.0,
721 * and no longer conflicts with the top edge in design space. This
723 * edge hint. This produces a small mismatch between the first and
731 /* we are inserting after an existing edge */
732 if ( firstHintEdge->dsCoord < hintmap->edge[indexInsert - 1].dsCoord )
738 /* we are inserting before an existing edge */
741 if ( secondHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord )
746 if ( firstHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord )
766 hintmap->edge[iDst--] = hintmap->edge[iSrc--];
768 /* insert first edge */
769 hintmap->edge[indexInsert] = *firstHintEdge; /* copy struct */
778 /* insert second edge */
779 hintmap->edge[indexInsert + 1] = *secondHintEdge; /* copy struct */
947 * A stem hint for the psili conflicts with the top edge hint
966 hintmap->edge[0].csCoord > 0 ||
967 hintmap->edge[hintmap->count - 1].csCoord < 0 )
970 /* construct a locked edge hint at 0 */
972 CF2_HintRec edge, invalid;
975 cf2_hint_initZero( &edge );
977 edge.flags = CF2_GhostBottom |
980 edge.scale = hintmap->scale;
983 cf2_hintmap_insertHint( hintmap, &edge, &invalid );
1036 * debugging hinting. Examine `hintmap->edge' for the list of
1055 if ( !cf2_hint_isSynthetic( &hintmap->edge[i] ) )
1061 hintmap->edge[i].index );
1064 if ( cf2_hint_isTop( &hintmap->edge[i] ) )
1065 stemhint->maxDS = hintmap->edge[i].dsCoord;
1067 stemhint->minDS = hintmap->edge[i].dsCoord;