Blame view

addons/antis/library/PhpWord/Writer/Word2007/Part/FontTable.php 4.8 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
  <?php

  /**

   * This file is part of PHPWord - A pure PHP library for reading and writing

   * word processing documents.

   *

   * PHPWord is free software distributed under the terms of the GNU Lesser

   * General Public License version 3 as published by the Free Software Foundation.

   *

   * For the full copyright and license information, please read the LICENSE

   * file that was distributed with this source code. For the full list of

   * contributors, visit https://github.com/PHPOffice/PHPWord/contributors.

   *

   * @see         https://github.com/PHPOffice/PHPWord

   * @copyright   2010-2018 PHPWord contributors

   * @license     http://www.gnu.org/licenses/lgpl.txt LGPL version 3

   */

  

  namespace PhpOffice\PhpWord\Writer\Word2007\Part;

  

  /**

   * Word2007 font table writer: word/fontTable.xml

   *

   * @todo Generate content dynamically

   * @since 0.10.0

   */

  class FontTable extends AbstractPart

  {

      /**

       * Write fontTable.xml.

       *

       * @return string

       */

      public function write()

      {

          $str = '';

          $str .= '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';

          $str .= '<w:fonts ' .

              'xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" ' .

              'xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">';

  

          $str .= '<w:font w:name="Times New Roman">';

          $str .= '<w:panose1 w:val="02020603050405020304" />';

          $str .= '<w:charset w:val="00" />';

          $str .= '<w:family w:val="roman" />';

          $str .= '<w:pitch w:val="variable" />';

          $str .= '<w:sig w:usb0="E0002AFF" w:usb1="C0007841" w:usb2="00000009" w:usb3="00000000" ' .

              'w:csb0="000001FF" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '<w:font w:name="Courier New">';

          $str .= '<w:panose1 w:val="02070309020205020404" />';

          $str .= '<w:charset w:val="00" />';

          $str .= '<w:family w:val="modern" />';

          $str .= '<w:pitch w:val="fixed" />';

          $str .= '<w:sig w:usb0="E0002AFF" w:usb1="C0007843" w:usb2="00000009" w:usb3="00000000" ' .

              'w:csb0="000001FF" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '<w:font w:name="Wingdings">';

          $str .= '<w:panose1 w:val="05000000000000000000" />';

          $str .= '<w:charset w:val="02" />';

          $str .= '<w:family w:val="auto" />';

          $str .= '<w:pitch w:val="variable" />';

          $str .= '<w:sig w:usb0="00000000" w:usb1="10000000" w:usb2="00000000" w:usb3="00000000" ' .

              'w:csb0="80000000" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '<w:font w:name="Symbol">';

          $str .= '<w:panose1 w:val="05050102010706020507" />';

          $str .= '<w:charset w:val="02" />';

          $str .= '<w:family w:val="roman" />';

          $str .= '<w:pitch w:val="variable" />';

          $str .= '<w:sig w:usb0="00000000" w:usb1="10000000" w:usb2="00000000" w:usb3="00000000" ' .

              'w:csb0="80000000" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '<w:font w:name="Arial">';

          $str .= '<w:panose1 w:val="020B0604020202020204" />';

          $str .= '<w:charset w:val="00" />';

          $str .= '<w:family w:val="swiss" />';

          $str .= '<w:pitch w:val="variable" />';

          $str .= '<w:sig w:usb0="E0002AFF" w:usb1="C0007843" w:usb2="00000009" w:usb3="00000000" ' .

              'w:csb0="000001FF" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '<w:font w:name="Cambria">';

          $str .= '<w:panose1 w:val="02040503050406030204" />';

          $str .= '<w:charset w:val="00" />';

          $str .= '<w:family w:val="roman" />';

          $str .= '<w:pitch w:val="variable" />';

          $str .= '<w:sig w:usb0="A00002EF" w:usb1="4000004B" w:usb2="00000000" w:usb3="00000000" ' .

              'w:csb0="0000019F" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '<w:font w:name="Calibri">';

          $str .= '<w:panose1 w:val="020F0502020204030204" />';

          $str .= '<w:charset w:val="00" />';

          $str .= '<w:family w:val="swiss" />';

          $str .= '<w:pitch w:val="variable" />';

          $str .= '<w:sig w:usb0="E10002FF" w:usb1="4000ACFF" w:usb2="00000009" w:usb3="00000000" ' .

              'w:csb0="0000019F" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '<w:font w:name="Garamond">';

          $str .= '<w:panose1 w:val="02020404030301010803" />';

          $str .= '<w:charset w:val="00" />';

          $str .= '<w:family w:val="roman" />';

          $str .= '<w:pitch w:val="variable" />';

          $str .= '<w:sig w:usb0="00000287" w:usb1="00000002" w:usb2="00000000" w:usb3="00000000" ' .

              'w:csb0="0000009F" w:csb1="00000000" />';

          $str .= '</w:font>';

  

          $str .= '</w:fonts>';

  

          return $str;

      }

  }