/** * Returns a number between 0 and 1 inclusive that indicates the percentage * of characters in the string which are covered by glyphs in this font. * * Since no one font will contain glyphs for the entire Unicode character * range, this method can be used to help locate a suitable font when the * actual contents of the string are not known. * * Note that some fonts lie about the characters they support. Additionally, * fonts don't usually contain glyphs for control characters such as tabs * and line breaks, so it is rare that you will get back a full 1.0 score. * The resulting value should be considered informational only. * * @param string $string * @param string $charEncoding (optional) Character encoding of source text. * If omitted, uses 'current locale'. * @return float */ public function getCoveredPercentage($string, $charEncoding = '') { return $this->_descendantFont->getCoveredPercentage($string, $charEncoding); }