class HexaPDF:: Type:: FontType0
Parent | HexaPDF::Type::Font |
---|
Represents a composite PDF font.
Composites fonts wrap a descendant CIDFont
and use CIDs to identify glyphs. A CID can be encoded in one or more bytes and an associated CMap specifies how this encoding is done. Composite fonts also allow for vertical writing mode and support TrueType as well as OpenType fonts.
See: PDF2.0 s9.7
Field Definitions
Name | Type/Allowed Values | Required | Default Value |
---|---|---|---|
Type | Symbol | true | :Font |
ToUnicode | HexaPDF::Stream or Hash | false | nil |
Subtype | Symbol | true | :Type0 |
BaseFont | Symbol | true | nil |
Encoding | HexaPDF::Stream or Symbol or Hash | true | nil |
DescendantFonts | HexaPDF::PDFArray or Array | true | nil |
Public Instance Methods
Returns the bounding box of the font or nil
if it is not found.
Decodes the given string into an array of CIDs.
Returns the CID font of this type 0 font.
Returns true
if the font is embedded.
Returns the font descriptor of the descendant font.
Returns the embeeded font file object or nil
if the font is not embedded.
Returns the UTF-8 string for the given code, or calls the configuration option ‘font.on_missing_unicode_mapping’ if no mapping was found.
Returns the unscaled width of the given CID in glyph units, or 0 if the width for the code point is missing.
Returns whether word spacing is applicable when using this font.
Note that the return value is cached when accessed the first time.
See: PDF2.0 s9.3.3
Returns the writing mode which is either :horizontal or :vertical.