Help for this page

Select Code to Download


  1. or download this
    use Font::TTFMetrics;
    
    my $resolution = 72; # 72dpi typical, 96, 100, 120 common
    ...
    
    printf "Width of `%s' is %.2f font units, or %d pixels\n",
           $string, $font_units, $pixels;