当前位置: 首页>>代码示例>>PHP>>正文


PHP Style::getFont方法代码示例

本文整理汇总了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;
 }
开发者ID:bestgoodz,项目名称:toko-baju,代码行数:13,代码来源:Worksheet.php

示例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;
 }
开发者ID:narixx,项目名称:zf2,代码行数:17,代码来源:Page.php

示例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();
 }
开发者ID:bestgoodz,项目名称:toko-baju,代码行数:46,代码来源:Style.php

示例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;
 }
开发者ID:bestgoodz,项目名称:toko-baju,代码行数:15,代码来源:HTML.php


注:本文中的Style::getFont方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。