minor changes
This commit is contained in:
@@ -39,8 +39,8 @@ namespace OpenVulkano
|
||||
{
|
||||
FcPattern* font = fs->fonts[i];
|
||||
FcChar8* file;
|
||||
FcChar8 *style;
|
||||
FcChar8 *family;
|
||||
FcChar8* style;
|
||||
FcChar8* family;
|
||||
if (FcPatternGetString(font, FC_FILE, 0, &file) == FcResultMatch &&
|
||||
FcPatternGetString(font, FC_FAMILY, 0, &family) == FcResultMatch &&
|
||||
FcPatternGetString(font, FC_STYLE, 0, &style) == FcResultMatch)
|
||||
|
||||
@@ -49,14 +49,7 @@ namespace OpenVulkano
|
||||
{
|
||||
// remove null-terminated characters since size is always bigger than needed
|
||||
std::string fontNameCropped(fontName.begin(), fontName.end());
|
||||
size_t realSize = 0;
|
||||
for (; realSize < fontNameCropped.size(); realSize++)
|
||||
{
|
||||
if (fontNameCropped[realSize] == '\0')
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
size_t realSize = strlen(fontNameCropped.data());
|
||||
fontNameCropped.resize(realSize);
|
||||
Utils::ToLower(fontNameCropped);
|
||||
fontFileMapping[std::move(fontNameCropped)] = fontFilename.path().string();
|
||||
|
||||
Reference in New Issue
Block a user