@pdfa-lab/fontkit / CFFDict
Class: CFFDict<T> ​
Defined in: src/cff/cff-dict.ts:78
Handles binary decoding and encoding of Compact Font Format (CFF) key-value dictionaries.
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T extends DictData | DictData |
Implements ​
FieldT<DictData>
Indexable ​
[
key:string]:unknown
Constructors ​
Constructor ​
new CFFDict<
T>(ops?):CFFDict<T>
Defined in: src/cff/cff-dict.ts:85
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
ops | CFFOpDefinition[] | [] |
Returns ​
CFFDict<T>
Properties ​
| Property | Modifier | Type | Defined in |
|---|---|---|---|
fields | public | Record<string, CFFOpDefinition> | src/cff/cff-dict.ts:82 |
length | public | number | src/cff/cff-dict.ts:83 |
ops | public | CFFOpDefinition[] | src/cff/cff-dict.ts:81 |
Methods ​
decode() ​
decode(
stream,parent):T
Defined in: src/cff/cff-dict.ts:172
Parameters ​
| Parameter | Type |
|---|---|
stream | DecodeStream |
parent | CFFDict |
Returns ​
T
Implementation of ​
FieldT.decode
encode() ​
encode(
stream,dict,parent?):void
Defined in: src/cff/cff-dict.ts:267
Parameters ​
| Parameter | Type |
|---|---|
stream | EncodeStream |
dict | T |
parent? | CFFTraversalContext |
Returns ​
void
Implementation of ​
FieldT.encode
fromBuffer() ​
fromBuffer(
_buf):never
Defined in: src/cff/cff-dict.ts:311
Parameters ​
| Parameter | Type |
|---|---|
_buf | Uint8Array |
Returns ​
never
Implementation of ​
FieldT.fromBuffer
size() ​
size(
dict,parent?,includePointers?):number
Defined in: src/cff/cff-dict.ts:229
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
dict | T | undefined |
parent? | CFFTraversalContext | undefined |
includePointers? | boolean | true |
Returns ​
number
Implementation of ​
FieldT.size
toBuffer() ​
toBuffer():
never
Defined in: src/cff/cff-dict.ts:315
Returns ​
never
Implementation of ​
FieldT.toBuffer