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

Method encodeTextToGids

src/fonts/embedded-font.ts:250–252  ·  view source on GitHub ↗

* Encode text to glyph IDs for PDF content stream. * * This is an internal method used when writing to the PDF. * With CIDToGIDMap /Identity, the content stream must contain GIDs. * * @internal

(text: string)

Source from the content-addressed store, hash-verified

248 * @internal
249 */
250 encodeTextToGids(text: string): number[] {
251 return this.trackAndEncode(text).map(e => e.gid);
252 }
253
254 /**
255 * Convert a code point to its glyph ID.

Callers 2

encodeTextForFontFunction · 0.80
encodeTextForFontMethod · 0.80

Calls 2

trackAndEncodeMethod · 0.95
mapMethod · 0.80

Tested by

no test coverage detected