PdfContentFont constructor

PdfContentFont({
  1. String? resourceName,
  2. String? baseFont,
  3. String? subtype,
  4. bool composite = false,
  5. int codeByteLength = 1,
  6. Map<int, String>? toUnicode,
  7. Map<int, String>? differences,
  8. bool winAnsi = true,
  9. int firstChar = 0,
  10. List<double>? widths,
  11. Map<int, double>? cidWidths,
  12. double? defaultWidth,
  13. double? missingWidth,
})

Creates the description of a font.

Implementation

PdfContentFont({
  this.resourceName,
  this.baseFont,
  this.subtype,
  this.composite = false,
  int codeByteLength = 1,
  Map<int, String>? toUnicode,
  Map<int, String>? differences,
  this.winAnsi = true,
  this.firstChar = 0,
  List<double>? widths,
  Map<int, double>? cidWidths,
  double? defaultWidth,
  this.missingWidth,
})  : codeByteLength = codeByteLength.clamp(1, 2),
      toUnicode = toUnicode ?? const <int, String>{},
      differences = differences ?? const <int, String>{},
      widths = widths ?? const <double>[],
      cidWidths = cidWidths ?? const <int, double>{},
      defaultWidth = defaultWidth ?? (composite ? 1000 : 500);