Expand description
PDF Dope Card Generation Module
Generates printable dope cards in Glenn’s proven field-ready format. Format: Two-column layout with Range (yd or m) and Drop/Wind/Lead in MIL or MOA (selected via DopeCardConfig::unit_label; values pre-converted by the caller) Color coding: Black=Range, Red=Drop, Green=Wind, Blue=Lead Row striping for improved readability.
0.33.0 decision-support Plan B Task 10: moved from a ballistics-binary-private module
(mod pdf_dope_card; in main.rs) into this library behind the pdf feature, and
rewritten to consume &[crate::card::CardRow] instead of this module’s own
DopeCardRow { range_yd: u32, .. } – the u32-yards field couldn’t express the
non-integer ranges Task 11’s adaptive card engine (crate::card) produces. The caller
now states the row range’s unit explicitly via RangeUnit; see its doc comment.
Structs§
- Dope
Card Config - Configuration for the dope card PDF
Enums§
- Font
Size Preset - Preset font size profiles for dope cards
- Range
Unit - Which unit
CardRow::rangeis expressed in for this card. Selects only the Range column’s sub-header text (“Yd” / “M”) – row values are never converted here, same “the caller already converted it” conventionCardRowitself documents.
Constants§
- FONT_
SCALE_ RANGE - The
font_scalebandgenerate_dope_card_pdfhonours; anything outside it is clamped into it (seedope_card_rows_per_page, which clamps identically so a page count and the document it describes cannot disagree). - UNPRINTABLE_
SUBSTITUTE - What a character the card font cannot draw is printed as.
Functions§
- calculate_
density_ altitude - Calculate density altitude from environmental conditions
- dope_
card_ page_ count - Pages
generate_dope_card_pdfemits forrow_countrows atfont_scale. - dope_
card_ rows_ per_ page - Data rows the two-column table fits on one page at
font_scale. - generate_
dope_ card_ pdf - Generate a dope card PDF matching Glenn’s format with row striping.
- unprintable_
chars - The distinct characters of
textthis card’s font has no glyph for, in order of first use; empty when every character prints.