Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft committed Oct 23, 2024
1 parent fb31e73 commit 0bb6228
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/AppInstallerCLICore/Workflows/FontFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,15 @@ namespace AppInstaller::CLI::Workflow

for (const auto& fontFace : fontFamily->Faces)
{
bool isFirstLine = true;
for (const auto& filePath : fontFace.FilePaths)
{
if (isFirstLine)
{
InstalledFontFacesTableLine line(
familyName,
Utility::LocIndString(Utility::ToLower(Utility::ConvertToUTF8(fontFace.Name))),
Utility::LocIndString(Utility::ConvertToUTF8(fontFace.Version)),
filePath.u8string());

lines.push_back(std::move(line));
isFirstLine = false;
}
else
{
// Creates a separate row for faces supported by multiple files.
InstalledFontFacesTableLine line({}, {}, {}, filePath.u8string());
lines.push_back(std::move(line));
}
InstalledFontFacesTableLine line(
familyName,
Utility::LocIndString(Utility::ToLower(Utility::ConvertToUTF8(fontFace.Name))),
Utility::LocIndString(Utility::ConvertToUTF8(fontFace.Version)),
filePath.u8string());

lines.push_back(std::move(line));
}
}

Expand Down

0 comments on commit 0bb6228

Please sign in to comment.