File indexing completed on 2025-01-18 10:10:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ROOT7_RFont
0010 #define ROOT7_RFont
0011
0012 #include "ROOT/RDrawable.hxx"
0013
0014 #include <string>
0015
0016 namespace ROOT {
0017 namespace Experimental {
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 class RFont : public RDrawable {
0029
0030 std::string fFamily;
0031 std::string fStyle;
0032 std::string fWeight;
0033 std::string fSrc;
0034 bool fDefault{false};
0035
0036 public:
0037
0038 RFont() : RDrawable("font") {}
0039
0040 RFont(const std::string &family, const std::string &fname = "", const std::string &fmt = "woff2") : RFont()
0041 {
0042 SetFamily(family);
0043 SetFile(fname, fmt);
0044 }
0045
0046 void SetFamily(const std::string &family) { fFamily = family; }
0047 const std::string &GetFamily() const { return fFamily; }
0048
0049 void SetStyle(const std::string &style) { fStyle = style; }
0050 const std::string &GetStyle() const { return fStyle; }
0051
0052 void SetWeight(const std::string &weight) { fWeight = weight; }
0053 const std::string &GetWeight() const { return fWeight; }
0054
0055 void SetDefault(bool dflt = true) { fDefault = dflt; }
0056 bool GetDefault() const { return fDefault; }
0057
0058 void SetUrl(const std::string &url, const std::string &fmt = "woff2");
0059 void SetFile(const std::string &fname, const std::string &fmt = "woff2");
0060 void SetSrc(const std::string &src);
0061
0062 const std::string &GetSrc() const { return fSrc; }
0063 };
0064
0065 }
0066 }
0067
0068 #endif