Skip to main content

to_bp

Function to_bp 

Source
pub fn to_bp(x: &str) -> f64
Expand description

A TeX/graphicx length in bp. Port of Perl to_bp + %BP_conversions (Util/Image.pm L198-210), including its true-prefix strip (truept) and its “unknown unit counts as bp” fallback. A value that is not a length at all yields 1, exactly as Perl’s else { return 1 } does.