This commit is contained in:
wyn
2026-05-26 18:01:32 +08:00
parent fa878334cd
commit 7a3a1ed8c9
651 changed files with 4599 additions and 32312 deletions

View File

@@ -1,4 +1,5 @@
<?php
/**
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
@@ -29,7 +30,7 @@ class Settings
*/
public const ZIPARCHIVE = 'ZipArchive';
public const PCLZIP = 'PclZip';
public const OLD_LIB = \PhpOffice\PhpWord\Shared\ZipArchive::class; // @deprecated 0.11
public const OLD_LIB = Shared\ZipArchive::class; // @deprecated 0.11
/**
* PDF rendering libraries.
@@ -117,6 +118,20 @@ class Settings
*/
private static $defaultFontName = self::DEFAULT_FONT_NAME;
/**
* Default asian font name.
*
* @var string
*/
private static $defaultAsianFontName = self::DEFAULT_FONT_NAME;
/**
* Default font color.
*
* @var string
*/
private static $defaultFontColor = self::DEFAULT_FONT_COLOR;
/**
* Default font size.
*
@@ -354,6 +369,14 @@ class Settings
return self::$defaultFontName;
}
/**
* Get default font name.
*/
public static function getDefaultAsianFontName(): string
{
return self::$defaultAsianFontName;
}
/**
* Set default font name.
*/
@@ -368,6 +391,39 @@ class Settings
return false;
}
public static function setDefaultAsianFontName(string $value): bool
{
if (trim($value) !== '') {
self::$defaultAsianFontName = $value;
return true;
}
return false;
}
/**
* Get default font color.
*/
public static function getDefaultFontColor(): string
{
return self::$defaultFontColor;
}
/**
* Set default font color.
*/
public static function setDefaultFontColor(string $value): bool
{
if (trim($value) !== '') {
self::$defaultFontColor = $value;
return true;
}
return false;
}
/**
* Get default font size.
*