Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenfont/intern/blf_font.c
| Show First 20 Lines • Show All 1,355 Lines • ▼ Show 20 Lines | if (err) { | ||||
| } | } | ||||
| else { | else { | ||||
| printf("Error encountered while opening font file\n"); | printf("Error encountered while opening font file\n"); | ||||
| } | } | ||||
| font->flags |= BLF_BAD_FONT; | font->flags |= BLF_BAD_FONT; | ||||
| return false; | return false; | ||||
| } | } | ||||
| if (font->face && !(font->face->face_flags & FT_FACE_FLAG_SCALABLE)) { | |||||
| printf("Font is not scalable\n"); | |||||
| return false; | |||||
| } | |||||
| err = FT_Select_Charmap(font->face, FT_ENCODING_UNICODE); | err = FT_Select_Charmap(font->face, FT_ENCODING_UNICODE); | ||||
| if (err) { | if (err) { | ||||
| err = FT_Select_Charmap(font->face, FT_ENCODING_APPLE_ROMAN); | err = FT_Select_Charmap(font->face, FT_ENCODING_APPLE_ROMAN); | ||||
| } | } | ||||
| if (err && font->face->num_charmaps > 0) { | if (err && font->face->num_charmaps > 0) { | ||||
| err = FT_Select_Charmap(font->face, font->face->charmaps[0]->encoding); | err = FT_Select_Charmap(font->face, font->face->charmaps[0]->encoding); | ||||
| } | } | ||||
| if (err) { | if (err) { | ||||
| ▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines | |||||