FT_Glyph glyph; FT_BBox bbox; error =FT_Get_Glyph(face->glyph, &glyph);if(error)returnerror; FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_pixels, &bbox); FT_Done_Glyph(glyph);if(pascent) *pascent = bbox.yMax;if(pdescent) *pdescent = -bbox.yMin; }return0; } 开发者ID:eledot,...
FT_Get_Glyph(face->glyph, &glyph); FT_OutlineGlyph og = (FT_OutlineGlyph)glyph;if(face->glyph->format != ft_glyph_format_outline) {std::cerr<<"Not an outline font\n"; }// write glyph headerif(fpLff) {fprintf(fpLff,"\n[#%04X]\n", (unsigned)charcode); }// trace outline of...
新的关键点使用FT_Glyph来表示,可以使用这样的代码从slot中获得glyph: 代码语言:javascript 复制 error=FT_Get_Glyph(slot,&glyph); FT_BBox FT_BBox结构体定义如下,它表示一个字符的外框,即新glyph的外框: 可以使用以下代码从glyph中获得这些信息: 代码语言:javascript 复制 FT_Glyph_Get_CBox(glyph,FT_GLYPH_...
/* FT_Glyph_BBox_Mode */ /* */ /* <Description> */ /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ /* */ /* <Values> */ /* FT_GLYPH_BBOX_UNSCALED :: */ /* Return unscaled font units. */ /* */ /* FT_GLYPH_BBOX_SUBPIXELS ::...
prev_glyphindex = glyphindex; kerning.x >>=6; }elsekerning.x =0; 开发者ID:TitanNit,项目名称:tdt,代码行数:29,代码来源:text.c 示例4: FT_Get_Kerning ▲点赞 1▼ //---boolfont_engine_freetype_base::add_kerning(unsignedfirst,unsignedsecond,double* x,double* y) {if(m_cur_face &&...
FT_BBox bbox;FT_Outline_Get_CBox(&self->x, &bbox);returnPy_BBox_cnew(&bbox,1.0); } 开发者ID:anthrotype,项目名称:freetypy,代码行数:9,代码来源:outline.c 示例5: ft_smooth_get_cbox ▲点赞 1▼ /* return the glyph's control box */staticvoidft_smooth_get_cbox( FT_Renderer rende...
FT_Outline_Get_CBox(&face->glyph->outline, &bbox);/* for the case of BBox != CBox */SetRasterArea(quiet); }returnerror; } 开发者ID:MiKTeX,项目名称:miktex,代码行数:39,代码来源:ttflib.c 示例4: ft_outline_glyph_transform ▲点赞 2▼ ...
FT_BBox* cbox ){FT_MEM_SET( cbox,0,sizeof( *cbox ) );if( slot->format == render->glyph_format ) FT_Outline_Get_CBox( &slot->outline, cbox ); } 开发者ID:Claruarius,项目名称:stblinux-2.6.37,代码行数:11,代码来源:ftsmooth.c ...
FT_Outline_Get_CBox(&fontData->facePtr->glyph->outline, &bbox_after); FT_Pos dx = bbox_after.xMax - bbox_before.xMax; FT_Pos dy = bbox_after.yMax - bbox_before.yMax; fontData->facePtr->glyph->metrics.width += dx;
FT_Vector kerning;if(FT_Get_Kerning( _fontRef, glyphIndex1, glyphIndex2, FT_KERNING_DEFAULT, &kerning))return0;return(kerning.x >>6); } 开发者ID:0x0c,项目名称:cocos2d-x,代码行数:29,代码来源:CCFontFreeType.cpp 示例4: lock