# tablepress/3.4/libraries/vendor/PhpSpreadsheet/Reader/Xls/Style/CellFont.php

TablePress – Tables in WordPress made easy, version 3.4. 40 lines.

- Page: https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Reader/Xls/Style/CellFont.php
- Raw: https://pluginprobe.com/plugins/tablepress/3.4/raw/libraries/vendor/PhpSpreadsheet/Reader/Xls/Style/CellFont.php
- Modified: 2025-01-08T09:25:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Reader/Xls/Style/CellFont.php#L10-L20`.

```php
<?php

namespace TablePress\PhpOffice\PhpSpreadsheet\Reader\Xls\Style;

use TablePress\PhpOffice\PhpSpreadsheet\Style\Font;

class CellFont
{
	public static function escapement(Font $font, int $escapement): void
	{
		switch ($escapement) {
			case 0x0001:
				$font->setSuperscript(true);

				break;
			case 0x0002:
				$font->setSubscript(true);

				break;
		}
	}

	/**
	 * @var array<int, string>
	 */
	protected static array $underlineMap = [
		0x01 => Font::UNDERLINE_SINGLE,
		0x02 => Font::UNDERLINE_DOUBLE,
		0x21 => Font::UNDERLINE_SINGLEACCOUNTING,
		0x22 => Font::UNDERLINE_DOUBLEACCOUNTING,
	];

	public static function underline(Font $font, int $underline): void
	{
		if (array_key_exists($underline, self::$underlineMap)) {
			$font->setUnderline(self::$underlineMap[$underline]);
		}
	}
}

```
