This happens, for example, with fonts only having an Apple Roman charmap.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22228
b3059339-0415-0410-9bf9-
f77b7e298cf2
unsigned eid = cmap->encoding_id;
if (pid == 3 /*microsoft*/ && (eid == 1 /*unicode bmp*/ || eid == 10 /*full unicode*/)) {
FT_Set_Charmap(face, cmap);
- break;
+ return;
}
}
+
+ if (!face->charmap) {
+ if (face->num_charmaps == 0) {
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_NoCharmaps);
+ return;
+ }
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_NoCharmapAutodetected);
+ FT_Set_Charmap(face, face->charmaps[0]);
+ return;
+ }
}
/**