コード例 #1
0
ファイル: blf.c プロジェクト: OldBrunet/BGERTPS
float BLF_width(int fontid, const char *str)
{
	FontBLF *font;

	font= BLF_get(fontid);
	if (font)
		return(blf_font_width(font, str));
	return(0.0f);
}
コード例 #2
0
ファイル: blf.c プロジェクト: vanangamudi/blender-main
float BLF_width(int fontid, const char *str)
{
	FontBLF *font = BLF_get(fontid);

	if (font && font->glyph_cache) {
		return blf_font_width(font, str);
	}

	return 0.0f;
}
コード例 #3
0
ファイル: blf.c プロジェクト: RiazAhamed/NewBlender
float BLF_width_ex(
        int fontid, const char *str, size_t len,
        struct ResultBLF *r_info)
{
	FontBLF *font = blf_get(fontid);

	BLF_RESULT_CHECK_INIT(r_info);

	if (font && font->glyph_cache) {
		return blf_font_width(font, str, len, r_info);
	}

	return 0.0f;
}