This macro demonstrate usage of existing ROOT fonts for RText.
Also load of custom font is shown
#include "ROOT/RText.hxx"
{
auto canvas = RCanvas::Create("RText fonts example");
text->text.align = RAttrText::kLeftCenter;
text->text.font.family =
"Comic";
else
name->text.align = RAttrText::kRightCenter;
};
drawText(RAttrFont::kCourierBoldOblique);
drawText(RAttrFont::kVerdanaBoldItalic);
auto pos =
fname.find(
"rtext_font.cxx");
if (pos > 0) {
fname.resize(pos);
fname.append(
"comic.woff2"); }
else fname =
"comic.woff2";
canvas->Show();
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char text
A position (horizontal and vertical) in a RPad.
- Date
- 2021-07-07
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Definition in file rtext_font.cxx.