Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Static Public Member Functions | Data Fields | Static Protected Member Functions
Zend_Pdf_Font Class Reference

Static Public Member Functions

static fontWithName ($name, $embeddingOptions=0)
 
static fontWithPath ($filePath, $embeddingOptions=0)
 

Data Fields

const TYPE_UNKNOWN = 0
 
const TYPE_STANDARD = 1
 
const TYPE_TYPE_1 = 2
 
const TYPE_TRUETYPE = 3
 
const TYPE_TYPE_0 = 4
 
const TYPE_CIDFONT_TYPE_0 = 5
 
const TYPE_CIDFONT_TYPE_2 = 6
 
const FONT_COURIER = 'Courier'
 
const FONT_COURIER_BOLD = 'Courier-Bold'
 
const FONT_COURIER_OBLIQUE = 'Courier-Oblique'
 
const FONT_COURIER_ITALIC = 'Courier-Oblique'
 
const FONT_COURIER_BOLD_OBLIQUE = 'Courier-BoldOblique'
 
const FONT_COURIER_BOLD_ITALIC = 'Courier-BoldOblique'
 
const FONT_HELVETICA = 'Helvetica'
 
const FONT_HELVETICA_BOLD = 'Helvetica-Bold'
 
const FONT_HELVETICA_OBLIQUE = 'Helvetica-Oblique'
 
const FONT_HELVETICA_ITALIC = 'Helvetica-Oblique'
 
const FONT_HELVETICA_BOLD_OBLIQUE = 'Helvetica-BoldOblique'
 
const FONT_HELVETICA_BOLD_ITALIC = 'Helvetica-BoldOblique'
 
const FONT_SYMBOL = 'Symbol'
 
const FONT_TIMES_ROMAN = 'Times-Roman'
 
const FONT_TIMES = 'Times-Roman'
 
const FONT_TIMES_BOLD = 'Times-Bold'
 
const FONT_TIMES_ITALIC = 'Times-Italic'
 
const FONT_TIMES_BOLD_ITALIC = 'Times-BoldItalic'
 
const FONT_ZAPFDINGBATS = 'ZapfDingbats'
 
const NAME_COPYRIGHT = 0
 
const NAME_FAMILY = 1
 
const NAME_STYLE = 2
 
const NAME_ID = 3
 
const NAME_FULL = 4
 
const NAME_VERSION = 5
 
const NAME_POSTSCRIPT = 6
 
const NAME_TRADEMARK = 7
 
const NAME_MANUFACTURER = 8
 
const NAME_DESIGNER = 9
 
const NAME_DESCRIPTION = 10
 
const NAME_VENDOR_URL = 11
 
const NAME_DESIGNER_URL = 12
 
const NAME_LICENSE = 13
 
const NAME_LICENSE_URL = 14
 
const NAME_PREFERRED_FAMILY = 16
 
const NAME_PREFERRED_STYLE = 17
 
const NAME_SAMPLE_TEXT = 19
 
const NAME_CID_NAME = 20
 
const WEIGHT_THIN = 100
 
const WEIGHT_EXTRA_LIGHT = 200
 
const WEIGHT_LIGHT = 300
 
const WEIGHT_NORMAL = 400
 
const WEIGHT_MEDIUM = 500
 
const WEIGHT_SEMI_BOLD = 600
 
const WEIGHT_BOLD = 700
 
const WEIGHT_EXTRA_BOLD = 800
 
const WEIGHT_BLACK = 900
 
const WIDTH_ULTRA_CONDENSED = 1
 
const WIDTH_EXTRA_CONDENSED = 2
 
const WIDTH_CONDENSED = 3
 
const WIDTH_SEMI_CONDENSED = 4
 
const WIDTH_NORMAL = 5
 
const WIDTH_SEMI_EXPANDED = 6
 
const WIDTH_EXPANDED = 7
 
const WIDTH_EXTRA_EXPANDED = 8
 
const WIDTH_ULTRA_EXPANDED = 9
 
const EMBED_DONT_EMBED = 0x01
 
const EMBED_DONT_SUBSET = 0x02
 
const EMBED_DONT_COMPRESS = 0x04
 
const EMBED_SUPPRESS_EMBED_EXCEPTION = 0x08
 

Static Protected Member Functions

static _extractTrueTypeFont ($dataSource, $embeddingOptions)
 

Detailed Description

Definition at line 39 of file Font.php.

Member Function Documentation

◆ _extractTrueTypeFont()

static _extractTrueTypeFont (   $dataSource,
  $embeddingOptions 
)
staticprotected

Attempts to extract a TrueType font from the data source.

If the font parser throws an exception that suggests the data source simply doesn't contain a TrueType font, catches it and returns null. If an exception is thrown that suggests the TrueType font is corrupt or otherwise unusable, throws that exception. If successful, returns the font object.

Parameters
Zend_Pdf_FileParserDataSource$dataSource
integer$embeddingOptionsOptions for font embedding.
Returns
Zend_Pdf_Resource_Font_OpenType_TrueType May also return null if the data source does not appear to contain a TrueType font.
Exceptions
Zend_Pdf_Exception

Definition at line 695 of file Font.php.

696  {
697  try {
698  #require_once 'Zend/Pdf/FileParser/Font/OpenType/TrueType.php';
699  $fontParser = new Zend_Pdf_FileParser_Font_OpenType_TrueType($dataSource);
700 
701  $fontParser->parse();
702  if ($fontParser->isAdobeLatinSubset) {
703  #require_once 'Zend/Pdf/Resource/Font/Simple/Parsed/TrueType.php';
704  $font = new Zend_Pdf_Resource_Font_Simple_Parsed_TrueType($fontParser, $embeddingOptions);
705  } else {
706  #require_once 'Zend/Pdf/Resource/Font/CidFont/TrueType.php';
707  #require_once 'Zend/Pdf/Resource/Font/Type0.php';
708  /* Use Composite Type 0 font which supports Unicode character mapping */
709  $cidFont = new Zend_Pdf_Resource_Font_CidFont_TrueType($fontParser, $embeddingOptions);
710  $font = new Zend_Pdf_Resource_Font_Type0($cidFont);
711  }
712  } catch (Zend_Pdf_Exception $e) {
713  /* The following exception codes suggest that this isn't really a
714  * TrueType font. If we caught such an exception, simply return
715  * null. For all other cases, it probably is a TrueType font but has
716  * a problem; throw the exception again.
717  */
718  $fontParser = null;
719  #require_once 'Zend/Pdf/Exception.php';
720  switch ($e->getCode()) {
721  case Zend_Pdf_Exception::WRONG_FONT_TYPE: // break intentionally omitted
722  case Zend_Pdf_Exception::BAD_TABLE_COUNT: // break intentionally omitted
724  return null;
725 
726  default:
727  throw new Zend_Pdf_Exception($e->getMessage(), $e->getCode(), $e);
728  }
729  }
730  return $font;
731  }

◆ fontWithName()

static fontWithName (   $name,
  $embeddingOptions = 0 
)
static

Returns a Zend_Pdf_Resource_Font object by full name.

This is the preferred method to obtain one of the standard 14 PDF fonts.

The result of this method is cached, preventing unnecessary duplication of font objects. Repetitive calls for a font with the same name will return the same object.

The $embeddingOptions parameter allows you to set certain flags related to font embedding. You may combine options by OR-ing them together. See the EMBED_ constants defined in Zend_Pdf_Font for the list of available options and their descriptions. Note that this value is only used when creating a font for the first time. If a font with the same name already exists, you will get that object and the options you specify here will be ignored. This is because fonts are only embedded within the PDF file once.

If the font name supplied does not match the name of a previously instantiated object and it is not one of the 14 standard PDF fonts, an exception will be thrown.

Parameters
string$nameFull PostScript name of font.
integer$embeddingOptions(optional) Options for font embedding.
Returns
Zend_Pdf_Resource_Font
Exceptions
Zend_Pdf_Exception
Todo:
It would be cool to be able to have a mapping of font names to file paths in a configuration file for frequently used custom fonts. This would allow a user to use custom fonts without having to hard-code file paths all over the place. Table this idea until Zend_Config is ready.

Definition at line 463 of file Font.php.

464  {
465  /* First check the cache. Don't duplicate font objects.
466  */
467  if (isset(Zend_Pdf_Font::$_fontNames[$name])) {
468  return Zend_Pdf_Font::$_fontNames[$name];
469  }
470 
479  /* Not an existing font and no mapping in the config file. Check to see
480  * if this is one of the standard 14 PDF fonts.
481  */
482  switch ($name) {
484  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/Courier.php';
486  break;
487 
489  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/CourierBold.php';
491  break;
492 
494  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/CourierOblique.php';
496  break;
497 
499  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/CourierBoldOblique.php';
501  break;
502 
504  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/Helvetica.php';
506  break;
507 
509  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBold.php';
511  break;
512 
514  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/HelveticaOblique.php';
516  break;
517 
519  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBoldOblique.php';
521  break;
522 
524  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/Symbol.php';
526  break;
527 
529  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/TimesRoman.php';
531  break;
532 
534  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/TimesBold.php';
536  break;
537 
539  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/TimesItalic.php';
541  break;
542 
544  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/TimesBoldItalic.php';
546  break;
547 
549  #require_once 'Zend/Pdf/Resource/Font/Simple/Standard/ZapfDingbats.php';
551  break;
552 
553  default:
554  #require_once 'Zend/Pdf/Exception.php';
555  throw new Zend_Pdf_Exception("Unknown font name: $name",
557  }
558 
559  /* Add this new font to the cache array and return it for use.
560  */
561  Zend_Pdf_Font::$_fontNames[$name] = $font;
562  return $font;
563  }
const FONT_TIMES_ROMAN
Definition: Font.php:158
const FONT_COURIER_BOLD_OBLIQUE
Definition: Font.php:110
const FONT_COURIER_BOLD
Definition: Font.php:94
const FONT_HELVETICA_OBLIQUE
Definition: Font.php:131
const FONT_TIMES_ITALIC
Definition: Font.php:174
const FONT_HELVETICA_BOLD_OBLIQUE
Definition: Font.php:142
const FONT_COURIER_OBLIQUE
Definition: Font.php:99
const FONT_SYMBOL
Definition: Font.php:153
const FONT_HELVETICA
Definition: Font.php:121
const FONT_TIMES_BOLD_ITALIC
Definition: Font.php:179
const FONT_ZAPFDINGBATS
Definition: Font.php:184
const FONT_HELVETICA_BOLD
Definition: Font.php:126
const FONT_COURIER
Definition: Font.php:89
const FONT_TIMES_BOLD
Definition: Font.php:169
if(!isset($_GET['name'])) $name
Definition: log.php:14

◆ fontWithPath()

static fontWithPath (   $filePath,
  $embeddingOptions = 0 
)
static

Returns a Zend_Pdf_Resource_Font object by file path.

The result of this method is cached, preventing unnecessary duplication of font objects. Repetitive calls for the font with the same path will return the same object.

The $embeddingOptions parameter allows you to set certain flags related to font embedding. You may combine options by OR-ing them together. See the EMBED_ constants defined in Zend_Pdf_Font for the list of available options and their descriptions. Note that this value is only used when creating a font for the first time. If a font with the same name already exists, you will get that object and the options you specify here will be ignored. This is because fonts are only embedded within the PDF file once.

If the file path supplied does not match the path of a previously instantiated object or the font type cannot be determined, an exception will be thrown.

Parameters
string$filePathFull path to the font file.
integer$embeddingOptions(optional) Options for font embedding.
Returns
Zend_Pdf_Resource_Font
Exceptions
Zend_Pdf_Exception

Definition at line 590 of file Font.php.

591  {
592  /* First check the cache. Don't duplicate font objects.
593  */
594  $filePathKey = md5($filePath);
595  if (isset(Zend_Pdf_Font::$_fontFilePaths[$filePathKey])) {
596  return Zend_Pdf_Font::$_fontFilePaths[$filePathKey];
597  }
598 
599  /* Create a file parser data source object for this file. File path and
600  * access permission checks are handled here.
601  */
602  #require_once 'Zend/Pdf/FileParserDataSource/File.php';
603  $dataSource = new Zend_Pdf_FileParserDataSource_File($filePath);
604 
605  /* Attempt to determine the type of font. We can't always trust file
606  * extensions, but try that first since it's fastest.
607  */
608  $fileExtension = strtolower(pathinfo($filePath, PATHINFO_EXTENSION));
609 
610  /* If it turns out that the file is named improperly and we guess the
611  * wrong type, we'll get null instead of a font object.
612  */
613  switch ($fileExtension) {
614  case 'ttf':
615  $font = Zend_Pdf_Font::_extractTrueTypeFont($dataSource, $embeddingOptions);
616  break;
617 
618  default:
619  /* Unrecognized extension. Try to determine the type by actually
620  * parsing it below.
621  */
622  $font = null;
623  break;
624  }
625 
626 
627  if ($font === null) {
628  /* There was no match for the file extension or the extension was
629  * wrong. Attempt to detect the type of font by actually parsing it.
630  * We'll do the checks in order of most likely format to try to
631  * reduce the detection time.
632  */
633 
634  // OpenType
635 
636  // TrueType
637  if (($font === null) && ($fileExtension != 'ttf')) {
638  $font = Zend_Pdf_Font::_extractTrueTypeFont($dataSource, $embeddingOptions);
639  }
640 
641  // Type 1 PostScript
642 
643  // Mac OS X dfont
644 
645  // others?
646  }
647 
648 
649  /* Done with the data source object.
650  */
651  $dataSource = null;
652 
653  if ($font !== null) {
654  /* Parsing was successful. Add this font instance to the cache arrays
655  * and return it for use.
656  */
657  $fontName = $font->getFontName(Zend_Pdf_Font::NAME_POSTSCRIPT, '', '');
658  Zend_Pdf_Font::$_fontNames[$fontName] = $font;
659  $filePathKey = md5($filePath);
660  Zend_Pdf_Font::$_fontFilePaths[$filePathKey] = $font;
661  return $font;
662 
663  } else {
664  /* The type of font could not be determined. Give up.
665  */
666  #require_once 'Zend/Pdf/Exception.php';
667  throw new Zend_Pdf_Exception("Cannot determine font type: $filePath",
669  }
670 
671  }
static _extractTrueTypeFont($dataSource, $embeddingOptions)
Definition: Font.php:695
const NAME_POSTSCRIPT
Definition: Font.php:224
const CANT_DETERMINE_FONT_TYPE
Definition: Exception.php:323

Field Documentation

◆ EMBED_DONT_COMPRESS

const EMBED_DONT_COMPRESS = 0x04

Embed, but do not compress the font in the PDF document.

Definition at line 402 of file Font.php.

◆ EMBED_DONT_EMBED

const EMBED_DONT_EMBED = 0x01

Do not embed the font in the PDF document.

Definition at line 392 of file Font.php.

◆ EMBED_DONT_SUBSET

const EMBED_DONT_SUBSET = 0x02

Embed, but do not subset the font in the PDF document.

Definition at line 397 of file Font.php.

◆ EMBED_SUPPRESS_EMBED_EXCEPTION

const EMBED_SUPPRESS_EMBED_EXCEPTION = 0x08

Suppress the exception normally thrown if the font cannot be embedded due to its copyright bits being set.

Definition at line 408 of file Font.php.

◆ FONT_COURIER

const FONT_COURIER = 'Courier'

Name of the standard PDF font Courier.

Definition at line 89 of file Font.php.

◆ FONT_COURIER_BOLD

const FONT_COURIER_BOLD = 'Courier-Bold'

Name of the bold style of the standard PDF font Courier.

Definition at line 94 of file Font.php.

◆ FONT_COURIER_BOLD_ITALIC

const FONT_COURIER_BOLD_ITALIC = 'Courier-BoldOblique'

Convenience constant for a common misspelling of FONT_COURIER_BOLD_OBLIQUE.

Definition at line 116 of file Font.php.

◆ FONT_COURIER_BOLD_OBLIQUE

const FONT_COURIER_BOLD_OBLIQUE = 'Courier-BoldOblique'

Name of the bold and italic style of the standard PDF font Courier.

Definition at line 110 of file Font.php.

◆ FONT_COURIER_ITALIC

const FONT_COURIER_ITALIC = 'Courier-Oblique'

Convenience constant for a common misspelling of FONT_COURIER_OBLIQUE.

Definition at line 105 of file Font.php.

◆ FONT_COURIER_OBLIQUE

const FONT_COURIER_OBLIQUE = 'Courier-Oblique'

Name of the italic style of the standard PDF font Courier.

Definition at line 99 of file Font.php.

◆ FONT_HELVETICA

const FONT_HELVETICA = 'Helvetica'

Name of the standard PDF font Helvetica.

Definition at line 121 of file Font.php.

◆ FONT_HELVETICA_BOLD

const FONT_HELVETICA_BOLD = 'Helvetica-Bold'

Name of the bold style of the standard PDF font Helvetica.

Definition at line 126 of file Font.php.

◆ FONT_HELVETICA_BOLD_ITALIC

const FONT_HELVETICA_BOLD_ITALIC = 'Helvetica-BoldOblique'

Convenience constant for a common misspelling of FONT_HELVETICA_BOLD_OBLIQUE.

Definition at line 148 of file Font.php.

◆ FONT_HELVETICA_BOLD_OBLIQUE

const FONT_HELVETICA_BOLD_OBLIQUE = 'Helvetica-BoldOblique'

Name of the bold and italic style of the standard PDF font Helvetica.

Definition at line 142 of file Font.php.

◆ FONT_HELVETICA_ITALIC

const FONT_HELVETICA_ITALIC = 'Helvetica-Oblique'

Convenience constant for a common misspelling of FONT_HELVETICA_OBLIQUE.

Definition at line 137 of file Font.php.

◆ FONT_HELVETICA_OBLIQUE

const FONT_HELVETICA_OBLIQUE = 'Helvetica-Oblique'

Name of the italic style of the standard PDF font Helvetica.

Definition at line 131 of file Font.php.

◆ FONT_SYMBOL

const FONT_SYMBOL = 'Symbol'

Name of the standard PDF font Symbol.

Definition at line 153 of file Font.php.

◆ FONT_TIMES

const FONT_TIMES = 'Times-Roman'

Convenience constant for a common misspelling of FONT_TIMES_ROMAN.

Definition at line 164 of file Font.php.

◆ FONT_TIMES_BOLD

const FONT_TIMES_BOLD = 'Times-Bold'

Name of the bold style of the standard PDF font Times.

Definition at line 169 of file Font.php.

◆ FONT_TIMES_BOLD_ITALIC

const FONT_TIMES_BOLD_ITALIC = 'Times-BoldItalic'

Name of the bold and italic style of the standard PDF font Times.

Definition at line 179 of file Font.php.

◆ FONT_TIMES_ITALIC

const FONT_TIMES_ITALIC = 'Times-Italic'

Name of the italic style of the standard PDF font Times.

Definition at line 174 of file Font.php.

◆ FONT_TIMES_ROMAN

const FONT_TIMES_ROMAN = 'Times-Roman'

Name of the standard PDF font Times.

Definition at line 158 of file Font.php.

◆ FONT_ZAPFDINGBATS

const FONT_ZAPFDINGBATS = 'ZapfDingbats'

Name of the standard PDF font Zapf Dingbats.

Definition at line 184 of file Font.php.

◆ NAME_CID_NAME

const NAME_CID_NAME = 20

PostScript CID findfont name.

Definition at line 288 of file Font.php.

◆ NAME_COPYRIGHT

const NAME_COPYRIGHT = 0

Full copyright notice for the font.

Definition at line 192 of file Font.php.

◆ NAME_DESCRIPTION

const NAME_DESCRIPTION = 10

Description of the font. May contain revision information, usage recommendations, features, etc.

Definition at line 245 of file Font.php.

◆ NAME_DESIGNER

const NAME_DESIGNER = 9

Name of the designer of the font.

Definition at line 239 of file Font.php.

◆ NAME_DESIGNER_URL

const NAME_DESIGNER_URL = 12

URL of the font designer (NAME_DESIGNER).

Definition at line 256 of file Font.php.

◆ NAME_FAMILY

const NAME_FAMILY = 1

Font family name. Used to group similar styles of fonts together.

Definition at line 197 of file Font.php.

◆ NAME_FULL

const NAME_FULL = 4

Full font name. Usually a combination of the NAME_FAMILY and NAME_STYLE strings.

Definition at line 213 of file Font.php.

◆ NAME_ID

const NAME_ID = 3

Unique font identifier.

Definition at line 207 of file Font.php.

◆ NAME_LICENSE

const NAME_LICENSE = 13

Plain language licensing terms for the font.

Definition at line 261 of file Font.php.

◆ NAME_LICENSE_URL

const NAME_LICENSE_URL = 14

URL of more detailed licensing information for the font.

Definition at line 266 of file Font.php.

◆ NAME_MANUFACTURER

const NAME_MANUFACTURER = 8

Name of the font manufacturer.

Definition at line 234 of file Font.php.

◆ NAME_POSTSCRIPT

const NAME_POSTSCRIPT = 6

PostScript name for the font. This is the name used to identify fonts internally and within the PDF file.

Definition at line 224 of file Font.php.

◆ NAME_PREFERRED_FAMILY

const NAME_PREFERRED_FAMILY = 16

Preferred font family. Used by some fonts to work around a Microsoft Windows limitation where only four fonts styles can share the same NAME_FAMILY value.

Definition at line 273 of file Font.php.

◆ NAME_PREFERRED_STYLE

const NAME_PREFERRED_STYLE = 17

Preferred font style. A more descriptive string than NAME_STYLE.

Definition at line 278 of file Font.php.

◆ NAME_SAMPLE_TEXT

const NAME_SAMPLE_TEXT = 19

Suggested text to use as a representative sample of the font.

Definition at line 283 of file Font.php.

◆ NAME_STYLE

const NAME_STYLE = 2

Font style within the font family. Examples: Regular, Italic, Bold, etc.

Definition at line 202 of file Font.php.

◆ NAME_TRADEMARK

const NAME_TRADEMARK = 7

Font trademark notice. This is distinct from the NAME_COPYRIGHT.

Definition at line 229 of file Font.php.

◆ NAME_VENDOR_URL

const NAME_VENDOR_URL = 11

URL of the font vendor. Some fonts may contain a unique serial number embedded in this URL, which is used for licensing.

Definition at line 251 of file Font.php.

◆ NAME_VERSION

const NAME_VERSION = 5

Version number of the font.

Definition at line 218 of file Font.php.

◆ TYPE_CIDFONT_TYPE_0

const TYPE_CIDFONT_TYPE_0 = 5

CID font containing a PostScript Type 1 font. These fonts are used only to construct Type 0 composite fonts and can't be used directly

Definition at line 75 of file Font.php.

◆ TYPE_CIDFONT_TYPE_2

const TYPE_CIDFONT_TYPE_2 = 6

CID font containing a TrueType font or an OpenType font containing TrueType outlines. These fonts are used only to construct Type 0 composite fonts and can't be used directly

Definition at line 81 of file Font.php.

◆ TYPE_STANDARD

const TYPE_STANDARD = 1

One of the standard 14 PDF fonts.

Definition at line 54 of file Font.php.

◆ TYPE_TRUETYPE

const TYPE_TRUETYPE = 3

A TrueType font or an OpenType font containing TrueType outlines.

Definition at line 64 of file Font.php.

◆ TYPE_TYPE_0

const TYPE_TYPE_0 = 4

Type 0 composite font.

Definition at line 69 of file Font.php.

◆ TYPE_TYPE_1

const TYPE_TYPE_1 = 2

A PostScript Type 1 font.

Definition at line 59 of file Font.php.

◆ TYPE_UNKNOWN

const TYPE_UNKNOWN = 0

Unknown font type.

Definition at line 49 of file Font.php.

◆ WEIGHT_BLACK

const WEIGHT_BLACK = 900

Black (Heavy) font weight.

Definition at line 336 of file Font.php.

◆ WEIGHT_BOLD

const WEIGHT_BOLD = 700

Bold font weight.

Definition at line 326 of file Font.php.

◆ WEIGHT_EXTRA_BOLD

const WEIGHT_EXTRA_BOLD = 800

Extra-bold (Ultra-bold) font weight.

Definition at line 331 of file Font.php.

◆ WEIGHT_EXTRA_LIGHT

const WEIGHT_EXTRA_LIGHT = 200

Extra-light (Ultra-light) font weight.

Definition at line 301 of file Font.php.

◆ WEIGHT_LIGHT

const WEIGHT_LIGHT = 300

Light font weight.

Definition at line 306 of file Font.php.

◆ WEIGHT_MEDIUM

const WEIGHT_MEDIUM = 500

Medium font weight.

Definition at line 316 of file Font.php.

◆ WEIGHT_NORMAL

const WEIGHT_NORMAL = 400

Normal (Regular) font weight.

Definition at line 311 of file Font.php.

◆ WEIGHT_SEMI_BOLD

const WEIGHT_SEMI_BOLD = 600

Semi-bold (Demi-bold) font weight.

Definition at line 321 of file Font.php.

◆ WEIGHT_THIN

const WEIGHT_THIN = 100

Thin font weight.

Definition at line 296 of file Font.php.

◆ WIDTH_CONDENSED

const WIDTH_CONDENSED = 3

Condensed font width. Typically 75% of normal.

Definition at line 354 of file Font.php.

◆ WIDTH_EXPANDED

const WIDTH_EXPANDED = 7

Expanded font width. Typically 125% of normal.

Definition at line 374 of file Font.php.

◆ WIDTH_EXTRA_CONDENSED

const WIDTH_EXTRA_CONDENSED = 2

Extra-condensed font width. Typically 62.5% of normal.

Definition at line 349 of file Font.php.

◆ WIDTH_EXTRA_EXPANDED

const WIDTH_EXTRA_EXPANDED = 8

Extra-expanded font width. Typically 150% of normal.

Definition at line 379 of file Font.php.

◆ WIDTH_NORMAL

const WIDTH_NORMAL = 5

Normal (Medium) font width.

Definition at line 364 of file Font.php.

◆ WIDTH_SEMI_CONDENSED

const WIDTH_SEMI_CONDENSED = 4

Semi-condensed font width. Typically 87.5% of normal.

Definition at line 359 of file Font.php.

◆ WIDTH_SEMI_EXPANDED

const WIDTH_SEMI_EXPANDED = 6

Semi-expanded font width. Typically 112.5% of normal.

Definition at line 369 of file Font.php.

◆ WIDTH_ULTRA_CONDENSED

const WIDTH_ULTRA_CONDENSED = 1

Ultra-condensed font width. Typically 50% of normal.

Definition at line 344 of file Font.php.

◆ WIDTH_ULTRA_EXPANDED

const WIDTH_ULTRA_EXPANDED = 9

Ultra-expanded font width. Typically 200% of normal.

Definition at line 384 of file Font.php.


The documentation for this class was generated from the following file: