code: public int match(FontSpec font)
      {
          if (this.family.equalsIgnoreCase(font.family))
          {
              int ret = 100;
              
              if (this.weight == null)
                  ret++;
              else if  (representsBold(this.weight) == representsBold(font.weight))
                  ret += 10;
              
              if (this.style == null)
                  ret++;
              else if (this.style == font.style)
                  ret += 10;
              
              return ret;
          }
          else
              return 0;
      }
docs: Check whether the specified font corresponds to this font specification.
  @param font The font properties (it shouldn't contain any {@code null} values
  @return The match score (0 = no match, greater is better)