本文整理汇总了C++中FontInfo::setFamily方法的典型用法代码示例。如果您正苦于以下问题:C++ FontInfo::setFamily方法的具体用法?C++ FontInfo::setFamily怎么用?C++ FontInfo::setFamily使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FontInfo
的用法示例。
在下文中一共展示了FontInfo::setFamily方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: symbol
GuiDelimiter::GuiDelimiter(GuiView & lv)
: GuiDialog(lv, "mathdelimiter", qt_("Math Delimiter"))
{
setupUi(this);
connect(closePB, SIGNAL(clicked()), this, SLOT(accept()));
setFocusProxy(leftLW);
leftLW->setViewMode(QListView::IconMode);
rightLW->setViewMode(QListView::IconMode);
leftLW->setDragDropMode(QAbstractItemView::NoDragDrop);
rightLW->setDragDropMode(QAbstractItemView::NoDragDrop);
initMathSymbols();
typedef map<char_type, QListWidgetItem *> ListItems;
ListItems list_items;
// The last element is the empty one.
int const end = nr_latex_delimiters - 1;
for (int i = 0; i < end; ++i) {
string const delim = latex_delimiters[i];
MathSymbol const & ms = mathSymbol(delim);
QString symbol(ms.fontcode?
QChar(ms.fontcode) : toqstr(docstring(1, ms.unicode)));
QListWidgetItem * lwi = new QListWidgetItem(symbol);
lwi->setToolTip(toqstr(delim));
FontInfo lyxfont;
lyxfont.setFamily(ms.fontfamily);
lwi->setFont(frontend::getFont(lyxfont));
list_items[ms.unicode] = lwi;
leftLW->addItem(lwi);
}
for (int i = 0; i != leftLW->count(); ++i) {
MathSymbol const & ms = mathSymbol(
fromqstr(leftLW->item(i)->toolTip()));
rightLW->addItem(list_items[doMatch(ms.unicode)]->clone());
}
// The last element is the empty one.
leftLW->addItem(qt_("(None)"));
rightLW->addItem(qt_("(None)"));
sizeCO->addItem(qt_("Variable"));
for (int i = 0; *biggui[i]; ++i)
sizeCO->addItem(qt_(biggui[i]));
on_leftLW_currentRowChanged(0);
bc().setPolicy(ButtonPolicy::IgnorantPolicy);
}
示例2: labelFont
// Note that this is supposed to return a fully realized font.
FontInfo Text::labelFont(Paragraph const & par) const
{
Buffer const & buffer = owner_->buffer();
Layout const & layout = par.layout();
if (!par.getDepth()) {
FontInfo lf = layout.reslabelfont;
// In case the default family has been customized
if (layout.labelfont.family() == INHERIT_FAMILY)
lf.setFamily(buffer.params().getFont().fontInfo().family());
return lf;
}
FontInfo font = layout.labelfont;
// Realize with the fonts of lesser depth.
font.realize(buffer.params().getFont().fontInfo());
return font;
}