MCPcopy Create free account
hub / github.com/LibPDF-js/core / handleTf

Method handleTf

src/text/text-extractor.ts:192–202  ·  view source on GitHub ↗

* Handle Tf (set font and size) operator.

(operands: ContentToken[])

Source from the content-addressed store, hash-verified

190 * Handle Tf (set font and size) operator.
191 */
192 private handleTf(operands: ContentToken[]): void {
193 const fontName = this.getName(operands[0]);
194 const fontSize = this.getNumber(operands[1]);
195
196 if (fontName) {
197 const font = this.resolveFont(fontName);
198 this.state.font = font;
199 }
200
201 this.state.fontSize = fontSize;
202 }
203
204 /**
205 * Handle Tj (show string) operator.

Callers 1

processOperationMethod · 0.95

Calls 2

getNameMethod · 0.95
getNumberMethod · 0.95

Tested by

no test coverage detected