iText 9.8.0 API
iText.IO.Font.FontNames Class Reference

Stores naming and style information read from a font program. More...

Public Member Functions

virtual String[][]  GetNames (int id)
  Extracts the names of the font in all the languages available. More...
 
virtual String[][]  GetFullName ()
  Gets the full font names. More...
 
virtual String  GetFontName ()
  Gets the PostScript font name. More...
 
virtual String  GetCidFontName ()
  Gets the CID font name. More...
 
virtual String[][]  GetFamilyName ()
  Gets the font family names. More...
 
virtual String[][]  GetFamilyName2 ()
  Get extra family names. More...
 
virtual String  GetStyle ()
  Gets the font style name. More...
 
virtual String  GetSubfamily ()
  Gets the first available subfamily name. More...
 
virtual int  GetFontWeight ()
  Gets the normalized font weight. More...
 
virtual String  GetFontStretch ()
  Gets font stretch in css notation (font-stretch property). More...
 
virtual bool  AllowEmbedding ()
  Checks whether the font's embedding permissions allow embedding. More...
 
virtual bool  IsBold ()
  Checks the bold bit in the Macintosh style flags. More...
 
virtual bool  IsItalic ()
  Checks the italic bit in the Macintosh style flags. More...
 
virtual bool  IsUnderline ()
  Checks the underline bit in the Macintosh style flags. More...
 
virtual bool  IsOutline ()
  Checks the outline bit in the Macintosh style flags. More...
 
virtual bool  IsShadow ()
  Checks the shadow bit in the Macintosh style flags. More...
 
virtual bool  IsCondensed ()
  Checks the condensed bit in the Macintosh style flags. More...
 
virtual bool  IsExtended ()
  Checks the extended bit in the Macintosh style flags. More...
 
override String  ToString ()
 

Package Functions

virtual void  SetFontWeight (int weight)
  Sets font weight. More...
 
virtual void  SetFontStretch (String fontStretch)
  Sets font stretch in css notation (font-stretch property). More...
 
virtual void  SetAllNames (IDictionary< int, IList< String[]>> allNames)
  Sets the names grouped by OpenType name ID. More...
 
virtual void  SetFullName (String[][] fullName)
  Sets the full-name records. More...
 
virtual void  SetFullName (String fullName)
  Sets a single full name. More...
 
virtual void  SetFontName (String psFontName)
  Sets the PostScript font name. More...
 
virtual void  SetCidFontName (String cidFontName)
  Sets the CID font name. More...
 
virtual void  SetFamilyName (String[][] familyName)
  Sets the font family-name records. More...
 
virtual void  SetFamilyName2 (String[][] familyName2)
  Set extra family name used for better fonts match. More...
 
virtual void  SetFamilyName (String familyName)
  Sets a single font family name. More...
 
virtual void  SetStyle (String style)
  Sets the font style string. More...
 
virtual void  SetSubfamily (String subfamily)
  Sets a single subfamily name. More...
 
virtual void  SetSubfamily (String[][] subfamily)
  Sets the subfamily name records. More...
 
virtual void  SetMacStyle (int macStyle)
  Sets Open Type head.macStyle. More...
 
virtual int  GetMacStyle ()
  Gets the raw head.macStyle bit field. More...
 
virtual void  SetAllowEmbedding (bool allowEmbedding)
  Sets the embedding permission. More...
 

Package Attributes

IDictionary< int, IList< String[]> >  allNames
  Name records grouped by OpenType name ID. More...
 

Detailed Description

Stores naming and style information read from a font program.

Member Function Documentation

◆ AllowEmbedding()

virtual bool iText.IO.Font.FontNames.AllowEmbedding ( )
inlinevirtual

Checks whether the font's embedding permissions allow embedding.

Returns

true when embedding is permitted

◆ GetCidFontName()

virtual String iText.IO.Font.FontNames.GetCidFontName ( )
inlinevirtual

Gets the CID font name.

Returns
OpenType name ID 20 value, or null when unavailable

◆ GetFamilyName()

virtual String [][] iText.IO.Font.FontNames.GetFamilyName ( )
inlinevirtual

Gets the font family names.

Returns
name records for OpenType name ID 16 or 1, or null when unavailable

◆ GetFamilyName2()

virtual String [][] iText.IO.Font.FontNames.GetFamilyName2 ( )
inlinevirtual

Get extra family names.

Returns
name records for OpenType name ID 1, or null when unavailable

◆ GetFontName()

virtual String iText.IO.Font.FontNames.GetFontName ( )
inlinevirtual

Gets the PostScript font name.

Returns
PostScript name, or null when unavailable

◆ GetFontStretch()

virtual String iText.IO.Font.FontNames.GetFontStretch ( )
inlinevirtual

Gets font stretch in css notation (font-stretch property).

Returns
One of iText.IO.Font.Constants.FontStretches values.

◆ GetFontWeight()

virtual int iText.IO.Font.FontNames.GetFontWeight ( )
inlinevirtual

Gets the normalized font weight.

Returns
weight in the range represented by iText.IO.Font.Constants.FontWeights

◆ GetFullName()

virtual String [][] iText.IO.Font.FontNames.GetFullName ( )
inlinevirtual

Gets the full font names.

Returns
name records for OpenType name ID 4, or null when unavailable

◆ GetMacStyle()

virtual int iText.IO.Font.FontNames.GetMacStyle ( )
inlinepackagevirtual

Gets the raw head.macStyle bit field.

Returns
Macintosh style flags

◆ GetNames()

virtual String [][] iText.IO.Font.FontNames.GetNames ( int  id )
inlinevirtual

Extracts the names of the font in all the languages available.

Parameters
id the name id to retrieve in OpenType notation
Returns
not empty String[][] if any names exists, otherwise null.

◆ GetStyle()

virtual String iText.IO.Font.FontNames.GetStyle ( )
inlinevirtual

Gets the font style name.

Returns
style string

◆ GetSubfamily()

virtual String iText.IO.Font.FontNames.GetSubfamily ( )
inlinevirtual

Gets the first available subfamily name.

Returns
name ID 2 or 17 value, or an empty string when unavailable

◆ IsBold()

virtual bool iText.IO.Font.FontNames.IsBold ( )
inlinevirtual

Checks the bold bit in the Macintosh style flags.

Returns

true when bold is declared

◆ IsCondensed()

virtual bool iText.IO.Font.FontNames.IsCondensed ( )
inlinevirtual

Checks the condensed bit in the Macintosh style flags.

Returns

true when condensed is declared

◆ IsExtended()

virtual bool iText.IO.Font.FontNames.IsExtended ( )
inlinevirtual

Checks the extended bit in the Macintosh style flags.

Returns

true when extended is declared

◆ IsItalic()

virtual bool iText.IO.Font.FontNames.IsItalic ( )
inlinevirtual

Checks the italic bit in the Macintosh style flags.

Returns

true when italic is declared

◆ IsOutline()

virtual bool iText.IO.Font.FontNames.IsOutline ( )
inlinevirtual

Checks the outline bit in the Macintosh style flags.

Returns

true when outline is declared

◆ IsShadow()

virtual bool iText.IO.Font.FontNames.IsShadow ( )
inlinevirtual

Checks the shadow bit in the Macintosh style flags.

Returns

true when shadow is declared

◆ IsUnderline()

virtual bool iText.IO.Font.FontNames.IsUnderline ( )
inlinevirtual

Checks the underline bit in the Macintosh style flags.

Returns

true when underline is declared

◆ SetAllNames()

virtual void iText.IO.Font.FontNames.SetAllNames ( IDictionary< int, IList< String[]>>  allNames )
inlinepackagevirtual

Sets the names grouped by OpenType name ID.

Parameters
allNames names grouped by OpenType name ID

◆ SetAllowEmbedding()

virtual void iText.IO.Font.FontNames.SetAllowEmbedding ( bool  allowEmbedding )
inlinepackagevirtual

Sets the embedding permission.

Parameters
allowEmbedding

true when embedding is permitted

◆ SetCidFontName()

virtual void iText.IO.Font.FontNames.SetCidFontName ( String  cidFontName )
inlinepackagevirtual

Sets the CID font name.

Parameters
cidFontName OpenType name ID 20 value

◆ SetFamilyName() [1/2]

virtual void iText.IO.Font.FontNames.SetFamilyName ( String  familyName )
inlinepackagevirtual

Sets a single font family name.

Parameters
familyName preferred family name

◆ SetFamilyName() [2/2]

virtual void iText.IO.Font.FontNames.SetFamilyName ( String  familyName[][] )
inlinepackagevirtual

Sets the font family-name records.

Parameters
familyName records in platform, encoding, language, name order

◆ SetFamilyName2()

virtual void iText.IO.Font.FontNames.SetFamilyName2 ( String  familyName2[][] )
inlinepackagevirtual

Set extra family name used for better fonts match.

Parameters
familyName2 family name to set.

◆ SetFontName()

virtual void iText.IO.Font.FontNames.SetFontName ( String  psFontName )
inlinepackagevirtual

Sets the PostScript font name.

Parameters
psFontName PostScript name

◆ SetFontStretch()

virtual void iText.IO.Font.FontNames.SetFontStretch ( String  fontStretch )
inlinepackagevirtual

Sets font stretch in css notation (font-stretch property).

Parameters
fontStretch

iText.IO.Font.Constants.FontStretches.

◆ SetFontWeight()

virtual void iText.IO.Font.FontNames.SetFontWeight ( int  weight )
inlinepackagevirtual

Sets font weight.

Parameters
weight integer form 100 to 900. See iText.IO.Font.Constants.FontWeights.

◆ SetFullName() [1/2]

virtual void iText.IO.Font.FontNames.SetFullName ( String  fullName )
inlinepackagevirtual

Sets a single full name.

Parameters
fullName font full name

◆ SetFullName() [2/2]

virtual void iText.IO.Font.FontNames.SetFullName ( String  fullName[][] )
inlinepackagevirtual

Sets the full-name records.

Parameters
fullName records in platform, encoding, language, name order

◆ SetMacStyle()

virtual void iText.IO.Font.FontNames.SetMacStyle ( int  macStyle )
inlinepackagevirtual

Sets Open Type head.macStyle.

Sets Open Type head.macStyle.

iText.IO.Font.Constants.FontMacStyleFlags

Parameters
macStyle macStyle flag

◆ SetStyle()

virtual void iText.IO.Font.FontNames.SetStyle ( String  style )
inlinepackagevirtual

Sets the font style string.

Parameters
style style name

◆ SetSubfamily() [1/2]

virtual void iText.IO.Font.FontNames.SetSubfamily ( String  subfamily )
inlinepackagevirtual

Sets a single subfamily name.

Parameters
subfamily style subfamily name

◆ SetSubfamily() [2/2]

virtual void iText.IO.Font.FontNames.SetSubfamily ( String  subfamily[][] )
inlinepackagevirtual

Sets the subfamily name records.

Parameters
subfamily records in platform, encoding, language, name order

Member Data Documentation

◆ allNames

IDictionary > iText.IO.Font.FontNames.allNames
package

Name records grouped by OpenType name ID.