Esempio n. 1
0
 /**
  * Parse properties for character style.
  * 
  * @param DOMElement $propertiesNode
  */
 private function parseProperties(DOMElement $propertiesNode)
 {
     $leadingNodes = $propertiesNode->getElementsByTagName('Leading');
     if ($leadingNodes->length == 1) {
         $leadingNode = $leadingNodes->item(0);
         $this->lineHeightUnit = $leadingNode->hasAttribute('type') ? $leadingNode->getAttribute('type') : 'unit';
         $this->lineHeightUnit = IdmlParserHelper::convertUnitIntoCssUnit($this->lineHeightUnit);
         $this->lineHeightValue = IdmlParserHelper::getTextContent($leadingNode);
     }
     $appliedFontNodes = $propertiesNode->getElementsByTagName('AppliedFont');
     if ($appliedFontNodes->length == 1) {
         $appliedFontNode = $appliedFontNodes->item(0);
         $this->appliedFont = IdmlParserHelper::getTextContent($appliedFontNode);
     }
 }