File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -915,7 +915,7 @@ export class PDFDocument {
915915 * ```
916916 * @param font The input data for a font.
917917 * @param options The options to be used when embedding the font.
918- * @returns Resolves with the embedded font.
918+ * @returns The embedded font represented as `PDFFont` .
919919 */
920920 embedFont (
921921 font : StandardFonts | string | Uint8Array | ArrayBuffer ,
@@ -954,11 +954,14 @@ export class PDFDocument {
954954
955955 /**
956956 * Embed a fontkit `TTFFont` instance into this document.
957- * This always performs font subsetting.
957+ *
958+ * NOTE: `options.subset` must be `true`, because the non-subset font embedder requires
959+ * the raw font bytes which are not available from a `TTFFont` instance.
958960 *
959961 * @param font The `TTFFont` to subset and embed.
960962 * @param options Additional embedding options (the `subset` option must be `true` or omitted).
961- * @returns Resolves with the embedded font.
963+ * @returns The embedded font represented as `PDFFont`.
964+ * @throws If `options.subset` is not `true`.
962965 */
963966 embedTTFFont (
964967 font : TTFFont ,
You can’t perform that action at this time.
0 commit comments