Specialize font paths for preinstalled font selection instead

This commit is contained in:
elasota
2021-04-15 20:56:31 -04:00
parent 22ae442f87
commit 141f840888
17 changed files with 49 additions and 54 deletions

View File

@@ -201,8 +201,10 @@ int toolMain(int argc, const char **argv)
int variation = fontFamily->GetVariationForFlags(flags);
PortabilityLayer::FontHacks hacks;
PortabilityLayer::VirtualDirectory_t vDir;
const char *path = nullptr;
fontFamily->GetFontSpec(variation, hacks, path);
int typeFaceIndex = 0;
fontFamily->GetFontSpec(variation, hacks, vDir, path, typeFaceIndex);
KnownFontSpec spec(path, size, aa, hacks);
@@ -218,7 +220,7 @@ int toolMain(int argc, const char **argv)
{
PortabilityLayer::CFileStream stream(fontFile);
IGpFont *font = ft2Handler->LoadFont(&stream);
IGpFont *font = ft2Handler->LoadFont(&stream, typeFaceIndex);
if (!ft2Handler->KeepStreamOpen())
stream.Close();