title: What is the better/memory-efficient way to implement this
body: <p>Suppose I have a <code>Font</code> class that looks like this:</p>
  
  <pre><code>const unsigned int MAX_CHAR = 256; //better than dynamic I think?
  
  struct BMchar
  {
      int x_ofs, y_ofs;
      _uint32 x, y;
      _uint32 width, height;
      _uint32 x_advance;
  };
  
  struct BMkerninfo
  {
      _ushort first, second;
      _ushort kerning;
  };
  
  class BM_FONT_CALL BMfont
  {
  public:
  
      BMfont();
      ~BMfont(); //what will I free?
  
      BMfont_Status Load(const char* fontName);
  
  public:
  
      float scale;
      _uint32 tabSize;
      _uint32 backTexture;
      _uint32 frontTexture;
      _uint32 textureSheet;
      bool enableMasking;
      bool hasBackground;
  
      _uint32 base;
      _uint32 lineHeight;
      _uint32 pages;
      _uint32 scaleW, scaleH;
      _uint32 kerninfo_count;
  
      BMkerninfo  *kerninfo; //unused
      BMchar chars[MAX_CHAR];
      float texCoordBuff[MAX_CHAR * 8];
  };
  </code></pre>
  
  <p>And I have a class <code>Label</code>:</p>
  
  <pre><code>class SWC_DLL SWC_Label
  {
  public:
  
      SWC_Label ();
  
  public:
  
      void ShowText (const Point&amp; basePoint, int baseW, int baseH);
  
  public:
  
      std::string text;
      Point   textCoord;
      BMfont  font;
      T_Alignment textAlignment;
  
  };
  </code></pre>
  
  <p>Then for all of this I worry about, as you see, the <code>BMfont</code> class <strong>uses lot of resources</strong>. I will inherit the class <code>SWC_Label</code> to a class <code>SWC_Button</code> (Yes a button, with a label/text on it).</p>
  
  <p>Now, I want this <code>SWC_Button</code> to have a feature of having a different font. What is the better and memory-efficient way to do things like this, should I make a limitations like: make a defined number of available font only (making static fonts in class label)?</p>
  
  <p>Note: I am making a UI using OpenGL</p>