本文整理汇总了PHP中Style::getFont方法的典型用法代码示例。如果您正苦于以下问题:PHP Style::getFont方法的具体用法?PHP Style::getFont怎么用?PHP Style::getFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::getFont方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setDefaultStyle
/**
* Set default style - should only be used by IReader implementations!
*
* @deprecated
* @param Style $value
* @throws Exception
* @return Worksheet
*/
public function setDefaultStyle(Style $pValue)
{
$this->_parent->getDefaultStyle()->applyFromArray(array('font' => array('name' => $pValue->getFont()->getName(), 'size' => $pValue->getFont()->getSize())));
return $this;
}
示例2: setStyle
/**
* Set the style to use for future drawing operations on this page
*
* @param \Zend\Pdf\Style $style
* @return \Zend\Pdf\Page
*/
public function setStyle(Style $style)
{
$this->_style = $style;
$this->_addProcSet('Text');
$this->_addProcSet('PDF');
if ($style->getFont() !== null) {
$this->setFont($style->getFont(), $style->getFontSize());
}
$this->_contents .= $style->instructions($this->_pageDictionary->Resources);
return $this;
}
示例3: _writeCellStyleDxf
/**
* Write Cell Style Dxf
*
* @param Shared_XMLWriter $objWriter XML Writer
* @param Style $pStyle Style
* @throws Exception
*/
private function _writeCellStyleDxf(Shared_XMLWriter $objWriter = null, Style $pStyle = null)
{
// dxf
$objWriter->startElement('dxf');
// font
$this->_writeFont($objWriter, $pStyle->getFont());
// numFmt
$this->_writeNumFmt($objWriter, $pStyle->getNumberFormat());
// fill
$this->_writeFill($objWriter, $pStyle->getFill());
// alignment
$objWriter->startElement('alignment');
$objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal());
$objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical());
$textRotation = 0;
if ($pStyle->getAlignment()->getTextRotation() >= 0) {
$textRotation = $pStyle->getAlignment()->getTextRotation();
} else {
if ($pStyle->getAlignment()->getTextRotation() < 0) {
$textRotation = 90 - $pStyle->getAlignment()->getTextRotation();
}
}
$objWriter->writeAttribute('textRotation', $textRotation);
$objWriter->endElement();
// border
$this->_writeBorder($objWriter, $pStyle->getBorders());
// protection
if ($pStyle->getProtection()->getLocked() != Style_Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != Style_Protection::PROTECTION_INHERIT) {
$objWriter->startElement('protection');
if ($pStyle->getProtection()->getLocked() != Style_Protection::PROTECTION_INHERIT) {
$objWriter->writeAttribute('locked', $pStyle->getProtection()->getLocked() == Style_Protection::PROTECTION_PROTECTED ? 'true' : 'false');
}
if ($pStyle->getProtection()->getHidden() != Style_Protection::PROTECTION_INHERIT) {
$objWriter->writeAttribute('hidden', $pStyle->getProtection()->getHidden() == Style_Protection::PROTECTION_PROTECTED ? 'true' : 'false');
}
$objWriter->endElement();
}
$objWriter->endElement();
}
示例4: _createCSSStyle
/**
* Create CSS style
*
* @param Style $pStyle Style
* @return array
*/
private function _createCSSStyle(Style $pStyle)
{
// Construct CSS
$css = '';
// Create CSS
$css = array_merge($this->_createCSSStyleAlignment($pStyle->getAlignment()), $this->_createCSSStyleBorders($pStyle->getBorders()), $this->_createCSSStyleFont($pStyle->getFont()), $this->_createCSSStyleFill($pStyle->getFill()));
// Return
return $css;
}