/**
  * set the kerning values associated to a pair of groups
  * @param mixed $g1 the preceeding group
  * @param mixed $g2 the following group
  * @params numeric $kern  the kerning value
  */
 public function setKerningByGroup($g1, $g2, $kern)
 {
     if ($this->direction == -1) {
         foreach ($this->directions as $direction) {
             $this->font_metrics[$direction]->setKerningByGroup($g1, $g2, $kern);
         }
         parent::setKerningByGroup($g1, $g2, $kern);
     } else {
         $this->font_metrics[$this->direction]->setKerningByGroup($g1, $g2, $kern);
     }
 }