Commit 9979b1b3 authored by Yi Yang's avatar Yi Yang Committed by Adrian Johnson
Browse files

Include .otf fonts when finding substitute fonts

Bug 44412
parent ebfab832
......@@ -449,7 +449,7 @@ CharCodeToUnicode *GfxFont::readToUnicodeCMap(Dict *fontDict, int nBits,
void GfxFont::findExtFontFile() {
static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL };
static char *ttExts[] = { ".ttf", ".ttc", NULL };
static char *ttExts[] = { ".ttf", ".ttc", ".otf", NULL };
if (name) {
if (type == fontType1) {
......
......@@ -1247,7 +1247,7 @@ DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
ext = strrchr((char*)s,'.');
if (!ext)
continue;
if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4))
if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4) || !strncasecmp(ext, ".otf", 4))
{
dfp = new DisplayFontParam(fontName->copy(), displayFontTT);
dfp->tt.fileName = new GooString((char*)s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment