Skip to content

Commit cef70f6

Browse files
devX2712Progi1984
authored andcommitted
ADD-Preserve shape richtext font face while loading file
Add reading typeface while load file in shape richt text Preserving loading to save
1 parent b237d34 commit cef70f6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/PhpPresentation/Reader/PowerPoint2007.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,8 +1283,14 @@ protected function loadParagraph(XMLReader $document, DOMElement $oElement, $oSh
12831283
if (is_object($oElementFontFormat) && $oElementFontFormat->hasAttribute('typeface')) {
12841284
$oText->getFont()->setName($oElementFontFormat->getAttribute('typeface'));
12851285
}
1286-
1287-
//} else {
1286+
// Font definition
1287+
$oElementFont = $document->getElement('a:latin', $oElementrPr);
1288+
if (is_object($oElementFont)) {
1289+
if ($oElementFont->hasAttribute('typeface')) {
1290+
$oText->getFont()->setName($oElementFont->getAttribute('typeface'));
1291+
}
1292+
}
1293+
//} else {
12881294
// $oText = $oParagraph->createText();
12891295

12901296
$oSubSubElement = $document->getElement('a:t', $oSubElement);

0 commit comments

Comments
 (0)