class HexaPDF::Type::FontType1

Parent

Represents a Type1 font.

PDF provides 14 built-in fonts that all PDF readers must understand. These 14 fonts are known as the “Standard 14 Fonts” and are all Type1 fonts. HexaPDF supports these fonts.

Field Definitions

NameType/Allowed ValuesRequiredDefault Value
TypeSymboltrue:Font
ToUnicodeHexaPDF::Stream or Hashfalsenil
NameSymbolfalsenil
FirstCharIntegerfalsenil
LastCharIntegerfalsenil
WidthsHexaPDF::PDFArray or Arrayfalsenil
FontDescriptorHexaPDF::Type::FontDescriptor or Hashfalsenil
EncodingHexaPDF::Dictionary or Symbol or Hashfalsenil
SubtypeSymboltrue:Type1
BaseFontSymboltruenil

Public Instance Methods

bounding_box()

Returns the bounding box of the font or nil if it is not found.

Calls superclass method HexaPDF::Type::Font#bounding_box
font_wrapper()

Overrides the default to provide a font wrapper in case none is set and the font is one of the standard fonts.

See: Font#font_wrapper

Calls superclass method HexaPDF::Type::Font#font_wrapper
symbolic?()

Returns true if the font is a symbolic font, false if it is not, and nil if it is not known.

Calls superclass method HexaPDF::Type::FontSimple#symbolic?
width(code)

Returns the unscaled width of the given code point in glyph units, or 0 if the width for the code point is missing.

Calls superclass method HexaPDF::Type::FontSimple#width