| 60 | } |
| 61 | |
| 62 | std::string AssAttachment::GetFileName(bool raw) const { |
| 63 | if (raw || !boost::iends_with(filename.get(), ".ttf")) return filename; |
| 64 | |
| 65 | // Remove stuff after last underscore if it's a font |
| 66 | std::string::size_type last_under = filename.get().rfind('_'); |
| 67 | if (last_under == std::string::npos) |
| 68 | return filename; |
| 69 | |
| 70 | return filename.get().substr(0, last_under) + ".ttf"; |
| 71 | } |
no test coverage detected