MCPcopy
hub / github.com/koodo-reader/koodo-reader / getXfaFontDict

Function getXfaFontDict

public/lib/pdfjs/pdf.worker.mjs:30975–30994  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

30973 return newWidths;
30974}
30975function getXfaFontDict(name) {
30976 const widths = getXfaFontWidths(name);
30977 const dict = new Dict(null);
30978 dict.set("BaseFont", Name.get(name));
30979 dict.set("Type", Name.get("Font"));
30980 dict.set("Subtype", Name.get("CIDFontType2"));
30981 dict.set("Encoding", Name.get("Identity-H"));
30982 dict.set("CIDToGIDMap", Name.get("Identity"));
30983 dict.set("W", widths);
30984 dict.set("FirstChar", widths[0]);
30985 dict.set("LastChar", widths.at(-2) + widths.at(-1).length - 1);
30986 const descriptor = new Dict(null);
30987 dict.set("FontDescriptor", descriptor);
30988 const systemInfo = new Dict(null);
30989 systemInfo.set("Ordering", "Identity");
30990 systemInfo.set("Registry", "Adobe");
30991 systemInfo.set("Supplement", 0);
30992 dict.set("CIDSystemInfo", systemInfo);
30993 return dict;
30994}
30995
30996;// ./src/core/ps_parser.js
30997

Callers 2

translateFontMethod · 0.85
loadXfaFontsMethod · 0.85

Calls 3

setMethod · 0.95
getXfaFontWidthsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected