Showing
2 changed files
with
5 additions
and
5 deletions
... | @@ -228,7 +228,7 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -228,7 +228,7 @@ class AdminMakeImmerse implements ShouldQueue |
228 | if ($item->content){ | 228 | if ($item->content){ |
229 | if ($item->source){ | 229 | if ($item->source){ |
230 | $contents[] = [ | 230 | $contents[] = [ |
231 | - "text" => $this->autoEnter($item->content, $font_size, $this->output_width) . "\n" . $this->autoCenter($item->source, $font_size, $this->output_width), | 231 | + "text" => $this->autoEnter($item->content, $font_size, $this->output_width) . "\n" . $item->source, |
232 | "tag" => "source" | 232 | "tag" => "source" |
233 | ]; | 233 | ]; |
234 | }else{ | 234 | }else{ |
... | @@ -399,7 +399,7 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -399,7 +399,7 @@ class AdminMakeImmerse implements ShouldQueue |
399 | 399 | ||
400 | public function autoEnter($string, $font_width, $video_width) | 400 | public function autoEnter($string, $font_width, $video_width) |
401 | { | 401 | { |
402 | - $video_width = $video_width - 2 * $font_width; // 两侧留出空隙 | 402 | + $video_width = $video_width - 1 * $font_width; // 两侧留出空隙 |
403 | $row_count = floor($video_width / $font_width); | 403 | $row_count = floor($video_width / $font_width); |
404 | echo $string . "#" . $row_count . PHP_EOL; | 404 | echo $string . "#" . $row_count . PHP_EOL; |
405 | $str_len = mb_strlen($string); | 405 | $str_len = mb_strlen($string); |
... | @@ -418,7 +418,7 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -418,7 +418,7 @@ class AdminMakeImmerse implements ShouldQueue |
418 | 418 | ||
419 | public function autoCenter($string, $font_width, $video_width) | 419 | public function autoCenter($string, $font_width, $video_width) |
420 | { | 420 | { |
421 | - $video_width = $video_width - 2 * $font_width; // 两侧留出空隙 | 421 | + $video_width = $video_width - 1 * $font_width; // 两侧留出空隙 |
422 | $row_count = floor($video_width / $font_width); | 422 | $row_count = floor($video_width / $font_width); |
423 | $arr = explode("\n", $string); | 423 | $arr = explode("\n", $string); |
424 | $title = $arr[0] ?? " "; | 424 | $title = $arr[0] ?? " "; | ... | ... |
... | @@ -692,7 +692,7 @@ class UserMakeImmerse implements ShouldQueue | ... | @@ -692,7 +692,7 @@ class UserMakeImmerse implements ShouldQueue |
692 | 692 | ||
693 | public function autoEnter($string, $font_width, $video_width) | 693 | public function autoEnter($string, $font_width, $video_width) |
694 | { | 694 | { |
695 | - $video_width = $video_width - 2 * $font_width; // 两侧留出空隙 | 695 | + $video_width = $video_width - 1 * $font_width; // 两侧留出空隙 |
696 | $row_count = floor($video_width / $font_width); | 696 | $row_count = floor($video_width / $font_width); |
697 | echo $row_count; | 697 | echo $row_count; |
698 | $str_len = mb_strlen($string); | 698 | $str_len = mb_strlen($string); |
... | @@ -711,7 +711,7 @@ class UserMakeImmerse implements ShouldQueue | ... | @@ -711,7 +711,7 @@ class UserMakeImmerse implements ShouldQueue |
711 | 711 | ||
712 | public function autoCenter($string, $font_width, $video_width) | 712 | public function autoCenter($string, $font_width, $video_width) |
713 | { | 713 | { |
714 | - $video_width = $video_width - 2 * $font_width; // 两侧留出空隙 | 714 | + $video_width = $video_width - 1 * $font_width; // 两侧留出空隙 |
715 | $row_count = floor($video_width / $font_width); | 715 | $row_count = floor($video_width / $font_width); |
716 | $arr = explode("\n", $string); | 716 | $arr = explode("\n", $string); |
717 | $title = $arr[0]; | 717 | $title = $arr[0]; | ... | ... |
-
Please register or login to post a comment