< prev index next >
src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.c
Print this page
@@ -1,21 +1,21 @@
-/***************************************************************************/
-/* */
-/* pshalgo.c */
-/* */
-/* PostScript hinting algorithm (body). */
-/* */
-/* Copyright 2001-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used */
-/* modified and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * pshalgo.c
+ *
+ * PostScript hinting algorithm (body).
+ *
+ * Copyright (C) 2001-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used
+ * modified and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
@@ -24,11 +24,11 @@
#include "pshnterr.h"
#undef FT_COMPONENT
-#define FT_COMPONENT trace_pshalgo
+#define FT_COMPONENT pshalgo
#ifdef DEBUG_HINTER
PSH_Hint_Table ps_debug_hint_table = NULL;
PSH_HintFunc ps_debug_hint_func = NULL;
@@ -51,12 +51,12 @@
/* return true if two stem hints overlap */
static FT_Int
psh_hint_overlap( PSH_Hint hint1,
PSH_Hint hint2 )
{
- return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
- hint2->org_pos + hint2->org_len >= hint1->org_pos;
+ return ADD_INT( hint1->org_pos, hint1->org_len ) >= hint2->org_pos &&
+ ADD_INT( hint2->org_pos, hint2->org_len ) >= hint1->org_pos;
}
/* destroy hints table */
static void
@@ -477,11 +477,11 @@
align.align = PSH_BLUE_ALIGN_NONE;
align.align_bot = align.align_top = 0;
if ( dimension == 1 )
psh_blues_snap_stem( &globals->blues,
- hint->org_pos + hint->org_len,
+ ADD_INT( hint->org_pos, hint->org_len ),
hint->org_pos,
&align );
switch ( align.align )
{
@@ -701,11 +701,11 @@
align.align = PSH_BLUE_ALIGN_NONE;
align.align_bot = align.align_top = 0;
if ( dimension == 1 )
psh_blues_snap_stem( &globals->blues,
- hint->org_pos + hint->org_len,
+ ADD_INT( hint->org_pos, hint->org_len ),
hint->org_pos,
&align );
switch ( align.align )
{
@@ -1537,11 +1537,11 @@
{
PSH_Hint hint = sort[nn];
if ( org_u >= hint->org_pos &&
- org_u <= hint->org_pos + hint->org_len )
+ org_u <= ADD_INT( hint->org_pos, hint->org_len ) )
{
point->hint = hint;
break;
}
}
< prev index next >