mirror of https://github.com/odrling/Aegisub
Eliminate a string copy for @ fonts in the fonts collector
This commit is contained in:
parent
c50d80cf24
commit
e53b2dab6b
|
@ -84,9 +84,7 @@ FontConfigFontFileLister::FontConfigFontFileLister(FontCollectorStatusCallback c
|
||||||
FontFileLister::CollectionResult FontConfigFontFileLister::GetFontPaths(std::string const& facename, int bold, bool italic, std::set<wxUniChar> const& characters) {
|
FontFileLister::CollectionResult FontConfigFontFileLister::GetFontPaths(std::string const& facename, int bold, bool italic, std::set<wxUniChar> const& characters) {
|
||||||
CollectionResult ret;
|
CollectionResult ret;
|
||||||
|
|
||||||
std::string family(facename);
|
std::string family = facename[0] == '@' ? facename.substr(1) : facename;
|
||||||
if (family[0] == '@')
|
|
||||||
family.erase(0, 1);
|
|
||||||
boost::to_lower(family);
|
boost::to_lower(family);
|
||||||
|
|
||||||
int weight = bold == 0 ? 80 :
|
int weight = bold == 0 ? 80 :
|
||||||
|
|
Loading…
Reference in New Issue