李帅

1.修复一些bug

......@@ -228,7 +228,7 @@ class AdminMakeImmerse implements ShouldQueue
if ($item->content){
if ($item->source){
$contents[] = [
"text" => $this->autoEnter($item->content, $font_size, $this->output_width) . "\n" . $this->autoCenter($item->source, $font_size, $this->output_width),
"text" => $this->autoEnter($item->content, $font_size, $this->output_width) . "\n" . $item->source,
"tag" => "source"
];
}else{
......@@ -399,7 +399,7 @@ class AdminMakeImmerse implements ShouldQueue
public function autoEnter($string, $font_width, $video_width)
{
$video_width = $video_width - 2 * $font_width; // 两侧留出空隙
$video_width = $video_width - 1 * $font_width; // 两侧留出空隙
$row_count = floor($video_width / $font_width);
echo $string . "#" . $row_count . PHP_EOL;
$str_len = mb_strlen($string);
......@@ -418,7 +418,7 @@ class AdminMakeImmerse implements ShouldQueue
public function autoCenter($string, $font_width, $video_width)
{
$video_width = $video_width - 2 * $font_width; // 两侧留出空隙
$video_width = $video_width - 1 * $font_width; // 两侧留出空隙
$row_count = floor($video_width / $font_width);
$arr = explode("\n", $string);
$title = $arr[0] ?? " ";
......
......@@ -692,7 +692,7 @@ class UserMakeImmerse implements ShouldQueue
public function autoEnter($string, $font_width, $video_width)
{
$video_width = $video_width - 2 * $font_width; // 两侧留出空隙
$video_width = $video_width - 1 * $font_width; // 两侧留出空隙
$row_count = floor($video_width / $font_width);
echo $row_count;
$str_len = mb_strlen($string);
......@@ -711,7 +711,7 @@ class UserMakeImmerse implements ShouldQueue
public function autoCenter($string, $font_width, $video_width)
{
$video_width = $video_width - 2 * $font_width; // 两侧留出空隙
$video_width = $video_width - 1 * $font_width; // 两侧留出空隙
$row_count = floor($video_width / $font_width);
$arr = explode("\n", $string);
$title = $arr[0];
......