mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
try to account for non-existing symbol fonts
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10292 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1de2bc6d79
commit
a4fc1ae96d
@ -117,10 +117,11 @@ void FontInfo::query()
|
|||||||
if (queried)
|
if (queried)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
queried = true;
|
||||||
|
|
||||||
if (pattern.empty()) {
|
if (pattern.empty()) {
|
||||||
lyxerr << "Cannot use empty font name for font query."
|
lyxerr << "Cannot use empty font name for font query."
|
||||||
<< endl;
|
<< endl;
|
||||||
queried = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +156,6 @@ void FontInfo::query()
|
|||||||
};
|
};
|
||||||
XFreeFontNames(list);
|
XFreeFontNames(list);
|
||||||
}
|
}
|
||||||
queried = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -300,6 +300,21 @@ XFontStruct * xfont_loader::doLoad(LyXFont::FONT_FAMILY family,
|
|||||||
}
|
}
|
||||||
|
|
||||||
getFontinfo(family, series, shape);
|
getFontinfo(family, series, shape);
|
||||||
|
|
||||||
|
LyXFont f;
|
||||||
|
f.setFamily(family);
|
||||||
|
f.setSeries(series);
|
||||||
|
f.setShape(shape);
|
||||||
|
f.setSize(size);
|
||||||
|
// The rest of the attributes are not interesting
|
||||||
|
f.setEmph(LyXFont::INHERIT);
|
||||||
|
f.setUnderbar(LyXFont::INHERIT);
|
||||||
|
f.setNoun(LyXFont::INHERIT);
|
||||||
|
f.setColor(LColor::inherit);
|
||||||
|
|
||||||
|
if (f.isSymbolFont() && !fontinfo[family][series][shape]->exist())
|
||||||
|
return 0;
|
||||||
|
|
||||||
// FIXME! CHECK! Should we use 72.0 or 72.27? (Lgb)
|
// FIXME! CHECK! Should we use 72.0 or 72.27? (Lgb)
|
||||||
int fsize = int((convert<double>(lyxrc.font_sizes[size]) * lyxrc.dpi *
|
int fsize = int((convert<double>(lyxrc.font_sizes[size]) * lyxrc.dpi *
|
||||||
(lyxrc.zoom/100.0)) / 72.27 + 0.5);
|
(lyxrc.zoom/100.0)) / 72.27 + 0.5);
|
||||||
@ -326,16 +341,6 @@ XFontStruct * xfont_loader::doLoad(LyXFont::FONT_FAMILY family,
|
|||||||
}
|
}
|
||||||
} else if (lyxerr.debugging(Debug::FONT)) {
|
} else if (lyxerr.debugging(Debug::FONT)) {
|
||||||
// Tell user the font matching
|
// Tell user the font matching
|
||||||
LyXFont f;
|
|
||||||
f.setFamily(family);
|
|
||||||
f.setSeries(series);
|
|
||||||
f.setShape(shape);
|
|
||||||
f.setSize(size);
|
|
||||||
// The rest of the attributes are not interesting
|
|
||||||
f.setEmph(LyXFont::INHERIT);
|
|
||||||
f.setUnderbar(LyXFont::INHERIT);
|
|
||||||
f.setNoun(LyXFont::INHERIT);
|
|
||||||
f.setColor(LColor::inherit);
|
|
||||||
lyxerr << "Font '" << f.stateText(0)
|
lyxerr << "Font '" << f.stateText(0)
|
||||||
<< "' matched by\n" << font << endl;
|
<< "' matched by\n" << font << endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user