| Conditions | 1 |
| Paths | 1 |
| Total Lines | 34 |
| Code Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 7 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function getData(XlsFont $font) |
||
| 18 | { |
||
| 19 | $dyHeight = $font->getSize() * 20; // Height of font (1/20 of a point) |
||
| 20 | $icv = $font->getColor(); // Index to color palette |
||
| 21 | $bls = $font->getBold(); // Bold style |
||
| 22 | $sss = $font->getScript(); // Superscript/subscript |
||
| 23 | $uls = $font->getUnderline(); // Underline |
||
| 24 | $bFamily = 0x00; // Font family |
||
| 25 | $bCharSet = 0x00; // Character set |
||
| 26 | |||
| 27 | $cch = strlen($font->getName()); // Length of font name |
||
| 28 | |||
| 29 | $reserved = 0x00; // Reserved |
||
| 30 | |||
| 31 | $data = pack( |
||
| 32 | "vvvvvCCCCC", |
||
| 33 | $dyHeight, |
||
| 34 | $this->calcGrbit($font), |
||
| 35 | $icv, |
||
| 36 | $bls, |
||
| 37 | $sss, |
||
| 38 | $uls, |
||
| 39 | $bFamily, |
||
| 40 | $bCharSet, |
||
| 41 | $reserved, |
||
| 42 | $cch |
||
| 43 | ); |
||
| 44 | |||
| 45 | $encoding = 0; |
||
| 46 | $data .= pack("C", $encoding); |
||
| 47 | $data .= $font->getName(); |
||
| 48 | |||
| 49 | return $this->getFullRecord($data); |
||
| 50 | } |
||
| 51 | |||
| 69 |