1 | <?php |
||
17 | trait FontTrait |
||
18 | { |
||
19 | /** |
||
20 | * Available cannot embed font policy values |
||
21 | * |
||
22 | * @var string[] |
||
23 | */ |
||
24 | protected static $cannotEmbedFontPolicyValues = [ |
||
25 | DistillerParametersInterface::CANNOT_EMBED_FONT_POLICY_OK, |
||
26 | DistillerParametersInterface::CANNOT_EMBED_FONT_POLICY_WARNING, |
||
27 | DistillerParametersInterface::CANNOT_EMBED_FONT_POLICY_ERROR |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * Get argument value |
||
32 | * |
||
33 | * @param string $name |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | abstract protected function getArgumentValue($name); |
||
38 | |||
39 | /** |
||
40 | * Set argument |
||
41 | * |
||
42 | * @param string $argument |
||
43 | * |
||
44 | * @return $this |
||
45 | */ |
||
46 | abstract protected function setArgument($argument); |
||
47 | |||
48 | /** |
||
49 | * Get cannot embed font policy |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getCannotEmbedFontPolicy() |
||
62 | |||
63 | /** |
||
64 | * Set cannot embed font policy |
||
65 | * |
||
66 | * @param string $cannotEmbedFontPolicy |
||
67 | * |
||
68 | * @param \InvalidArgumentException |
||
69 | * |
||
70 | * @return $this |
||
71 | */ |
||
72 | public function setCannotEmbedFontPolicy($cannotEmbedFontPolicy) |
||
82 | |||
83 | /** |
||
84 | * Whether to embed all fonts |
||
85 | * |
||
86 | * @return bool |
||
87 | */ |
||
88 | public function isEmbedAllFonts() |
||
97 | |||
98 | /** |
||
99 | * Set embed all fonts flag |
||
100 | * |
||
101 | * @param string $embedAllFonts |
||
102 | * |
||
103 | * @return $this |
||
104 | */ |
||
105 | public function setEmbedAllFonts($embedAllFonts) |
||
111 | |||
112 | /** |
||
113 | * Get max subset pct |
||
114 | * |
||
115 | * @return int |
||
116 | */ |
||
117 | public function getMaxSubsetPct() |
||
126 | |||
127 | /** |
||
128 | * Set max subset pct |
||
129 | * |
||
130 | * @param int $maxSubsetPct |
||
131 | * |
||
132 | * @return $this |
||
133 | */ |
||
134 | public function setMaxSubsetPct($maxSubsetPct) |
||
140 | |||
141 | /** |
||
142 | * Whether to subset fonts |
||
143 | * |
||
144 | * @return bool |
||
145 | */ |
||
146 | public function getSubsetFonts() |
||
155 | |||
156 | /** |
||
157 | * Set subset fonts flag |
||
158 | * |
||
159 | * @param bool $subsetFonts |
||
160 | * |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function setSubsetFonts($subsetFonts) |
||
169 | } |
||
170 |