本文整理汇总了C++中FT_BOOL函数的典型用法代码示例。如果您正苦于以下问题:C++ FT_BOOL函数的具体用法?C++ FT_BOOL怎么用?C++ FT_BOOL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FT_BOOL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: af_face_globals_is_digit
af_face_globals_is_digit( AF_FaceGlobals globals,
FT_UInt gindex )
{
if ( gindex < (FT_ULong)globals->glyph_count )
return FT_BOOL( globals->glyph_styles[gindex] & AF_DIGIT );
return FT_BOOL( 0 );
}
示例2: ftc_snode_compare
ftc_snode_compare( FTC_Node ftcsnode,
FT_Pointer ftcgquery,
FTC_Cache cache )
{
FTC_SNode snode = (FTC_SNode)ftcsnode;
FTC_GQuery gquery = (FTC_GQuery)ftcgquery;
FTC_GNode gnode = FTC_GNODE( snode );
FT_UInt gindex = gquery->gindex;
FT_Bool result;
result = FT_BOOL( gnode->family == gquery->family &&
(FT_UInt)( gindex - gnode->gindex ) < snode->count );
if ( result )
{
/* check if we need to load the glyph bitmap now */
FTC_SBit sbit = snode->sbits + ( gindex - gnode->gindex );
if ( sbit->buffer == NULL && sbit->width != 255 )
{
FT_ULong size;
if ( !ftc_snode_load( snode, cache->manager,
gindex, &size ) )
{
cache->manager->cur_weight += size;
}
}
}
return result;
}
示例3: gxv_kern_coverage_classic_microsoft_validate
static FT_Bool
gxv_kern_coverage_classic_microsoft_validate( FT_UShort coverage,
FT_UShort* format,
GXV_Validator gxvalid )
{
/* classic Microsoft-dialect */
#ifdef GXV_LOAD_TRACE_VARS
FT_Bool horizontal;
FT_Bool minimum;
FT_Bool cross_stream;
FT_Bool override;
#endif
FT_UNUSED( gxvalid );
/* reserved bits = 0 */
if ( coverage & 0xFDF0 )
return FALSE;
#ifdef GXV_LOAD_TRACE_VARS
horizontal = FT_BOOL( coverage & 1 );
minimum = FT_BOOL( ( coverage >> 1 ) & 1 );
cross_stream = FT_BOOL( ( coverage >> 2 ) & 1 );
override = FT_BOOL( ( coverage >> 3 ) & 1 );
示例4: ftc_cmap_node_compare
ftc_cmap_node_compare( FTC_CMapNode cnode,
FTC_CMapQuery cquery )
{
FT_UInt32 offset = (FT_UInt32)( cquery->char_code - cnode->first );
return FT_BOOL( offset < FTC_CMAP_INDICES_MAX );
}
示例5: ftc_glyph_node_compare
ftc_glyph_node_compare( FTC_GlyphNode gnode,
FTC_GlyphQuery gquery )
{
FT_UInt start = (FT_UInt)gnode->item_start;
FT_UInt count = (FT_UInt)gnode->item_count;
return FT_BOOL( (FT_UInt)( gquery->gindex - start ) < count );
}
示例6: ft_cubic_is_small_enough
static FT_Bool
ft_cubic_is_small_enough( FT_Vector* base,
FT_Angle *angle_in,
FT_Angle *angle_mid,
FT_Angle *angle_out )
{
FT_Vector d1, d2, d3;
FT_Angle theta1, theta2;
FT_Int close1, close2, close3;
d1.x = base[2].x - base[3].x;
d1.y = base[2].y - base[3].y;
d2.x = base[1].x - base[2].x;
d2.y = base[1].y - base[2].y;
d3.x = base[0].x - base[1].x;
d3.y = base[0].y - base[1].y;
close1 = FT_IS_SMALL( d1.x ) && FT_IS_SMALL( d1.y );
close2 = FT_IS_SMALL( d2.x ) && FT_IS_SMALL( d2.y );
close3 = FT_IS_SMALL( d3.x ) && FT_IS_SMALL( d3.y );
if ( close1 || close3 )
{
if ( close2 )
{
/* basically a point */
*angle_in = *angle_out = *angle_mid = 0;
}
else if ( close1 )
{
*angle_in = *angle_mid = FT_Atan2( d2.x, d2.y );
*angle_out = FT_Atan2( d3.x, d3.y );
}
else /* close2 */
{
*angle_in = FT_Atan2( d1.x, d1.y );
*angle_mid = *angle_out = FT_Atan2( d2.x, d2.y );
}
}
else if ( close2 )
{
*angle_in = *angle_mid = FT_Atan2( d1.x, d1.y );
*angle_out = FT_Atan2( d3.x, d3.y );
}
else
{
*angle_in = FT_Atan2( d1.x, d1.y );
*angle_mid = FT_Atan2( d2.x, d2.y );
*angle_out = FT_Atan2( d3.x, d3.y );
}
theta1 = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_mid ) );
theta2 = ft_pos_abs( FT_Angle_Diff( *angle_mid, *angle_out ) );
return FT_BOOL( theta1 < FT_SMALL_CUBIC_THRESHOLD &&
theta2 < FT_SMALL_CUBIC_THRESHOLD );
}
示例7: ftc_face_node_compare
ftc_face_node_compare( FTC_MruNode ftcnode,
FT_Pointer ftcface_id )
{
FTC_FaceNode node = (FTC_FaceNode)ftcnode;
FTC_FaceID face_id = (FTC_FaceID)ftcface_id;
return FT_BOOL( node->face_id == face_id );
}
示例8: ftc_size_node_compare
ftc_size_node_compare( FTC_SizeNode node,
FTC_SizeQuery query )
{
FT_Size size = node->size;
return FT_BOOL( size->face == query->face &&
(FT_UInt)size->metrics.x_ppem == query->width &&
(FT_UInt)size->metrics.y_ppem == query->height );
}
示例9: ftc_cmap_node_remove_faceid
ftc_cmap_node_remove_faceid( FTC_Node ftcnode,
FT_Pointer ftcface_id,
FTC_Cache cache )
{
FTC_CMapNode node = (FTC_CMapNode)ftcnode;
FTC_FaceID face_id = (FTC_FaceID)ftcface_id;
FT_UNUSED( cache );
return FT_BOOL( node->face_id == face_id );
}
示例10: ftc_size_node_compare_faceid
/* helper function used by ftc_face_node_done */
static FT_Bool
ftc_size_node_compare_faceid( FTC_MruNode ftcnode,
FT_Pointer ftcface_id )
{
FTC_SizeNode node = (FTC_SizeNode)ftcnode;
FTC_FaceID face_id = (FTC_FaceID)ftcface_id;
return FT_BOOL( node->scaler.face_id == face_id );
}
示例11: ftc_gnode_compare
ftc_gnode_compare( FTC_Node ftcgnode,
FT_Pointer ftcgquery,
FTC_Cache cache )
{
FTC_GNode gnode = (FTC_GNode)ftcgnode;
FTC_GQuery gquery = (FTC_GQuery)ftcgquery;
FT_UNUSED( cache );
return FT_BOOL( gnode->family == gquery->family &&
gnode->gindex == gquery->gindex );
}
示例12: ftc_image_family_compare
ftc_image_family_compare( FTC_ImageFamily ifam,
FTC_ImageQuery iquery )
{
FT_Bool result;
result = FT_BOOL( FTC_IMAGE_TYPE_COMPARE( &ifam->type, &iquery->type ) );
if ( result )
FTC_GLYPH_FAMILY_FOUND( ifam, iquery );
return result;
}
示例13: ftc_cmap_node_remove_faceid
ftc_cmap_node_remove_faceid( FTC_Node ftcnode,
FT_Pointer ftcface_id,
FTC_Cache cache,
FT_Bool* list_changed )
{
FTC_CMapNode node = (FTC_CMapNode)ftcnode;
FTC_FaceID face_id = (FTC_FaceID)ftcface_id;
FT_UNUSED( cache );
if ( list_changed )
*list_changed = FALSE;
return FT_BOOL( node->face_id == face_id );
}
示例14: ftc_gnode_compare
ftc_gnode_compare( FTC_Node ftcgnode,
FT_Pointer ftcgquery,
FTC_Cache cache,
FT_Bool* list_changed )
{
FTC_GNode gnode = (FTC_GNode)ftcgnode;
FTC_GQuery gquery = (FTC_GQuery)ftcgquery;
FT_UNUSED( cache );
if ( list_changed )
*list_changed = FALSE;
return FT_BOOL( gnode->family == gquery->family &&
gnode->gindex == gquery->gindex );
}
示例15: ftc_cmap_node_compare
ftc_cmap_node_compare( FTC_Node ftcnode,
FT_Pointer ftcquery,
FTC_Cache cache )
{
FTC_CMapNode node = (FTC_CMapNode)ftcnode;
FTC_CMapQuery query = (FTC_CMapQuery)ftcquery;
FT_UNUSED( cache );
if ( node->face_id == query->face_id &&
node->cmap_index == query->cmap_index )
{
FT_UInt32 offset = (FT_UInt32)( query->char_code - node->first );
return FT_BOOL( offset < FTC_CMAP_INDICES_MAX );
}
return 0;
}