Skip to content

@pdfa-lab/fontkit / CFFPointer

Class: CFFPointer<TField> ​

Defined in: src/cff/cff-pointer.ts:33

Specialized CFF Dict stream pointer. Handles variable operands collected from the dictionary stack as dynamic lookahead offsets.

Extends ​

  • Pointer<TField>

Type Parameters ​

Type Parameter
TField extends FieldT<unknown>

Constructors ​

Constructor ​

new CFFPointer<TField>(type, options?): CFFPointer<TField>

Defined in: src/cff/cff-pointer.ts:36

Parameters ​

ParameterType
typeTField
optionsPointerTOptions

Returns ​

CFFPointer<TField>

Overrides ​

r.Pointer<TField>.constructor

Properties ​

PropertyModifierTypeInherited fromDefined in
offsetTypepublicnumberr.Pointer.offsetType@types/restructure/index.d.ts:300
parent?readonlyFieldT<any>r.Pointer.parent@types/restructure/index.d.ts:301
type?publicTFieldr.Pointer.type@types/restructure/index.d.ts:299

Methods ​

decode() ​

decode(stream, parent?, operands?): InferField<TField>

Defined in: src/cff/cff-pointer.ts:49

Intercepted decoder driven by CFFDict operand collection cascades.

Parameters ​

ParameterType
streamDecodeStream
parent?unknown
operands?number[]

Returns ​

InferField<TField>

Overrides ​

r.Pointer.decode


encode() ​

encode(stream, value, ctx): [Ptr]

Defined in: src/cff/cff-pointer.ts:68

Serializes or computes size configurations for structural dictionaries.

Parameters ​

ParameterType
streamEncodeStream | null
valueInferField<TField>
ctxunknown

Returns ​

[Ptr]

Overrides ​

r.Pointer.encode


fromBuffer() ​

fromBuffer(buf): number

Defined in: @types/restructure/index.d.ts:322

Parameters ​

ParameterType
bufUint8Array

Returns ​

number

Inherited from ​

r.Pointer.fromBuffer


size() ​

size(value?, ctx?): number

Defined in: @types/restructure/index.d.ts:318

Parameters ​

ParameterType
value?unknown
ctx?unknown

Returns ​

number

Inherited from ​

r.Pointer.size


toBuffer() ​

toBuffer(val?): Uint8Array

Defined in: @types/restructure/index.d.ts:323

Parameters ​

ParameterType
val?any

Returns ​

Uint8Array

Inherited from ​

r.Pointer.toBuffer