diff --git a/aegisub/font_file_lister.cpp b/aegisub/font_file_lister.cpp index 565e58107..acba8cbbb 100644 --- a/aegisub/font_file_lister.cpp +++ b/aegisub/font_file_lister.cpp @@ -100,7 +100,11 @@ void FontFileLister::ClearData() { wxArrayString FontFileLister::CacheGetFilesWithFace(wxString facename) { FontMap::iterator iter = fontTable.find(facename); if (iter != fontTable.end()) return iter->second; - else return wxArrayString(); + else { + iter = fontTable.find(_T("*")+facename); + if (iter != fontTable.end()) return iter->second; + return wxArrayString(); + } } diff --git a/aegisub/font_file_lister_freetype.cpp b/aegisub/font_file_lister_freetype.cpp index 3c3da6c99..b75ac4bf3 100644 --- a/aegisub/font_file_lister_freetype.cpp +++ b/aegisub/font_file_lister_freetype.cpp @@ -81,8 +81,9 @@ wxArrayString GetName(FT_Face &face,int id) { str[name.string_len+1] = 0; if (name.encoding_id == 0) final.Add(wxString(str, wxConvLocal)); else if (name.encoding_id == 1) { - wxMBConvUTF16LE conv; - final.Add(wxString((wxChar*)str,conv)); + wxMBConvUTF16BE conv; + wxString string(str,conv); + final.Add(string); } delete [] str; } @@ -140,14 +141,24 @@ void FreetypeFontFileLister::DoInitialize() { wxArrayString family = GetName(face,1); wxArrayString subFamily = GetName(face,2); wxArrayString fullName = GetName(face,4); - //AddFont(fontfiles[i],family); - for (size_t j=0;jfamily_name, wxConvLocal)); - if (face->style_name) AddFont(fontfiles[i],wxString(face->family_name, wxConvLocal) + _T(" ") + wxString(face->style_name, wxConvLocal)); + // Ordinary fonts + else { + if (face->style_name) { + AddFont(fontfiles[i],wxString(face->family_name, wxConvLocal) + _T(" ") + wxString(face->style_name, wxConvLocal)); + AddFont(fontfiles[i],_T("*")+wxString(face->family_name, wxConvLocal)); + } + else AddFont(fontfiles[i],wxString(face->family_name, wxConvLocal)); + } FT_Done_Face(face); } }