INNER CODE UNIT · Rust

FONT_RATIO

matiaskorhonen/paper-age · src/builder.rs:19

const FONT_RATIO: f32 = 3.0 / 5.0;

const CODE_FONT_BYTES: &[u8] = include_bytes!("assets/fonts/IBMPlexMono-Regular.ttf");
const TITLE_FONT_BYTES: &[u8] = include_bytes!("assets/fonts/IBMPlexMono-Medium.ttf");

/// Container for all the data required to insert elements into the PDF
pub struct Document {
    /// The printpdf PDF document
    pub doc: PdfDocument,

    /// Operations to perform on the page
    ops: Vec<Op>,

    /// The medium weight font handle
    pub title_font: PdfFontHandle,

    /// The regular weight font handle
    pub code_font: PdfFontHandle,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…