code: protected void setFontVariant(String newFontVariant)
      {
          if (fontVariant == null || !fontVariant.equals(newFontVariant))
          {
              FontVariant val[] = FontVariant.values();
  
              for (FontVariant aVal : val)
              {
                  if (aVal.toString().equals(newFontVariant))
                  {
                      fontVariant = newFontVariant;
                      invalidateCache();
                      return;
                  }
              }
  
          }
      }
docs: Sets the font variant.
  
  @param newFontVariant
  the new font variant