fix family name issues

This commit is contained in:
houzh 2023-09-05 17:58:00 +08:00
parent b867839d6b
commit b027333f41

View File

@ -49,11 +49,12 @@ Typeface::Typeface(FcPattern & font,const std::string&family) {
s = nullptr;
}
}
std::ostringstream oss;
for(int i = 0; FcPatternGetString(&font, FC_FAMILY,i, &s) == FcResultMatch; i++) {
mFamily +=std::string((const char*)s);
mFamily +=";";
oss<<(const char*)s<<";";
s = nullptr;
}
mFamily = oss.str();
LOGV("family=%s",mFamily.c_str());
mStyle = 0 ;
ret = FcPatternGetString(&font, FC_STYLE, 0, &s);