ReactOS 0.4.15-dev-7942-gd23573b
pshglob.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PSH_WidthRec_
 
struct  PSH_WidthsRec_
 
struct  PSH_DimensionRec_
 
struct  PSH_Blue_ZoneRec_
 
struct  PSH_Blue_TableRec_
 
struct  PSH_BluesRec_
 
struct  PSH_GlobalsRec_
 
struct  PSH_AlignmentRec_
 

Macros

#define PS_GLOBALS_MAX_BLUE_ZONES   16
 
#define PS_GLOBALS_MAX_STD_WIDTHS   16
 
#define PSH_BLUE_ALIGN_NONE   0
 
#define PSH_BLUE_ALIGN_TOP   1
 
#define PSH_BLUE_ALIGN_BOT   2
 

Typedefs

typedef struct PSH_WidthRec_ PSH_WidthRec
 
typedef struct PSH_WidthRec_PSH_Width
 
typedef struct PSH_WidthsRec_ PSH_WidthsRec
 
typedef struct PSH_WidthsRec_PSH_Widths
 
typedef struct PSH_DimensionRec_ PSH_DimensionRec
 
typedef struct PSH_DimensionRec_PSH_Dimension
 
typedef struct PSH_Blue_ZoneRec_ PSH_Blue_ZoneRec
 
typedef struct PSH_Blue_ZoneRec_PSH_Blue_Zone
 
typedef struct PSH_Blue_TableRec_ PSH_Blue_TableRec
 
typedef struct PSH_Blue_TableRec_PSH_Blue_Table
 
typedef struct PSH_BluesRec_ PSH_BluesRec
 
typedef struct PSH_BluesRec_PSH_Blues
 
typedef struct PSH_GlobalsRec_ PSH_GlobalsRec
 
typedef struct PSH_AlignmentRec_ PSH_AlignmentRec
 
typedef struct PSH_AlignmentRec_PSH_Alignment
 

Functions

 psh_globals_funcs_init (PSH_Globals_FuncsRec *funcs)
 
 psh_globals_set_scale (PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta)
 
 psh_blues_snap_stem (PSH_Blues blues, FT_Int stem_top, FT_Int stem_bot, PSH_Alignment alignment)
 

Macro Definition Documentation

◆ PS_GLOBALS_MAX_BLUE_ZONES

#define PS_GLOBALS_MAX_BLUE_ZONES   16

Definition at line 48 of file pshglob.h.

◆ PS_GLOBALS_MAX_STD_WIDTHS

#define PS_GLOBALS_MAX_STD_WIDTHS   16

Definition at line 60 of file pshglob.h.

◆ PSH_BLUE_ALIGN_BOT

#define PSH_BLUE_ALIGN_BOT   2

Definition at line 146 of file pshglob.h.

◆ PSH_BLUE_ALIGN_NONE

#define PSH_BLUE_ALIGN_NONE   0

Definition at line 144 of file pshglob.h.

◆ PSH_BLUE_ALIGN_TOP

#define PSH_BLUE_ALIGN_TOP   1

Definition at line 145 of file pshglob.h.

Typedef Documentation

◆ PSH_Alignment

◆ PSH_AlignmentRec

◆ PSH_Blue_Table

◆ PSH_Blue_TableRec

◆ PSH_Blue_Zone

◆ PSH_Blue_ZoneRec

◆ PSH_Blues

◆ PSH_BluesRec

◆ PSH_Dimension

◆ PSH_DimensionRec

◆ PSH_GlobalsRec

◆ PSH_Width

◆ PSH_WidthRec

◆ PSH_Widths

◆ PSH_WidthsRec

Function Documentation

◆ psh_blues_snap_stem()

psh_blues_snap_stem ( PSH_Blues  blues,
FT_Int  stem_top,
FT_Int  stem_bot,
PSH_Alignment  alignment 
)

Definition at line 548 of file pshglob.c.

552 {
555 FT_Pos delta;
557 FT_Int no_shoots;
558
559
560 alignment->align = PSH_BLUE_ALIGN_NONE;
561
562 no_shoots = blues->no_overshoots;
563
564 /* look up stem top in top zones table */
565 table = &blues->normal_top;
566 count = table->count;
567 zone = table->zones;
568
569 for ( ; count > 0; count--, zone++ )
570 {
571 delta = stem_top - zone->org_bottom;
572 if ( delta < -blues->blue_fuzz )
573 break;
574
575 if ( stem_top <= zone->org_top + blues->blue_fuzz )
576 {
577 if ( no_shoots || delta <= blues->blue_threshold )
578 {
579 alignment->align |= PSH_BLUE_ALIGN_TOP;
580 alignment->align_top = zone->cur_ref;
581 }
582 break;
583 }
584 }
585
586 /* look up stem bottom in bottom zones table */
587 table = &blues->normal_bottom;
588 count = table->count;
589 zone = table->zones + count-1;
590
591 for ( ; count > 0; count--, zone-- )
592 {
593 delta = zone->org_top - stem_bot;
594 if ( delta < -blues->blue_fuzz )
595 break;
596
597 if ( stem_bot >= zone->org_bottom - blues->blue_fuzz )
598 {
599 if ( no_shoots || delta < blues->blue_threshold )
600 {
601 alignment->align |= PSH_BLUE_ALIGN_BOT;
602 alignment->align_bot = zone->cur_ref;
603 }
604 break;
605 }
606 }
607 }
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:58
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
GLuint GLuint GLsizei count
Definition: gl.h:1545
DWORD zone
Definition: sec_mgr.c:1754
#define PSH_BLUE_ALIGN_BOT
Definition: pshglob.h:146
#define PSH_BLUE_ALIGN_NONE
Definition: pshglob.h:144
#define PSH_BLUE_ALIGN_TOP
Definition: pshglob.h:145
FT_Pos align_top
Definition: pshglob.h:152
FT_Pos align_bot
Definition: pshglob.h:153
FT_Int blue_fuzz
Definition: pshglob.h:126
FT_Bool no_overshoots
Definition: pshglob.h:127
PSH_Blue_TableRec normal_top
Definition: pshglob.h:118
PSH_Blue_TableRec normal_bottom
Definition: pshglob.h:119

Referenced by psh_hint_align().

◆ psh_globals_funcs_init()

psh_globals_funcs_init ( PSH_Globals_FuncsRec funcs)

Definition at line 787 of file pshglob.c.

788 {
789 funcs->create = psh_globals_new;
790 funcs->set_scale = psh_globals_set_scale;
791 funcs->destroy = psh_globals_destroy;
792 }
static void psh_globals_destroy(PSH_Globals globals)
Definition: pshglob.c:619
static FT_Error psh_globals_new(FT_Memory memory, T1_Private *priv, PSH_Globals *aglobals)
Definition: pshglob.c:645
psh_globals_set_scale(PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta)
Definition: pshglob.c:754
static struct __wine_debug_functions funcs
Definition: debug.c:59

Referenced by ps_hinter_init().

◆ psh_globals_set_scale()

psh_globals_set_scale ( PSH_Globals  globals,
FT_Fixed  x_scale,
FT_Fixed  y_scale,
FT_Fixed  x_delta,
FT_Fixed  y_delta 
)

Definition at line 754 of file pshglob.c.

759 {
760 PSH_Dimension dim;
761
762
763 dim = &globals->dimension[0];
764 if ( x_scale != dim->scale_mult ||
765 x_delta != dim->scale_delta )
766 {
767 dim->scale_mult = x_scale;
768 dim->scale_delta = x_delta;
769
770 psh_globals_scale_widths( globals, 0 );
771 }
772
773 dim = &globals->dimension[1];
774 if ( y_scale != dim->scale_mult ||
775 y_delta != dim->scale_delta )
776 {
777 dim->scale_mult = y_scale;
778 dim->scale_delta = y_delta;
779
780 psh_globals_scale_widths( globals, 1 );
781 psh_blues_scale_zones( &globals->blues, y_scale, y_delta );
782 }
783 }
static void psh_globals_scale_widths(PSH_Globals globals, FT_UInt direction)
Definition: pshglob.c:41
static void psh_blues_scale_zones(PSH_Blues blues, FT_Fixed scale, FT_Pos delta)
Definition: pshglob.c:366
FT_Fixed scale_mult
Definition: pshglob.h:85
FT_Fixed scale_delta
Definition: pshglob.h:86

Referenced by ps_hints_apply(), and psh_globals_funcs_init().