ReactOS 0.4.16-dev-1019-g2c2cdfd
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 549 of file pshglob.c.

553 {
556 FT_Pos delta;
558 FT_Int no_shoots;
559
560
562
563 no_shoots = blues->no_overshoots;
564
565 /* look up stem top in top zones table */
566 table = &blues->normal_top;
567 count = table->count;
568 zone = table->zones;
569
570 for ( ; count > 0; count--, zone++ )
571 {
572 delta = SUB_LONG( stem_top, zone->org_bottom );
573 if ( delta < -blues->blue_fuzz )
574 break;
575
576 if ( stem_top <= zone->org_top + blues->blue_fuzz )
577 {
578 if ( no_shoots || delta <= blues->blue_threshold )
579 {
581 alignment->align_top = zone->cur_ref;
582 }
583 break;
584 }
585 }
586
587 /* look up stem bottom in bottom zones table */
588 table = &blues->normal_bottom;
589 count = table->count;
590 zone = table->zones + count-1;
591
592 for ( ; count > 0; count--, zone-- )
593 {
594 delta = SUB_LONG( zone->org_top, stem_bot );
595 if ( delta < -blues->blue_fuzz )
596 break;
597
598 if ( stem_bot >= zone->org_bottom - blues->blue_fuzz )
599 {
600 if ( no_shoots || delta < blues->blue_threshold )
601 {
603 alignment->align_bot = zone->cur_ref;
604 }
605 break;
606 }
607 }
608 }
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
Definition: align.cpp:48
#define SUB_LONG(a, b)
Definition: ftcalc.h:475
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_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 788 of file pshglob.c.

789 {
790 funcs->create = psh_globals_new;
791 funcs->set_scale = psh_globals_set_scale;
792 funcs->destroy = psh_globals_destroy;
793 }
static void psh_globals_destroy(PSH_Globals globals)
Definition: pshglob.c:620
static FT_Error psh_globals_new(FT_Memory memory, T1_Private *priv, PSH_Globals *aglobals)
Definition: pshglob.c:646
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:755
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 755 of file pshglob.c.

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