PDF::Font(3pm)

πŸ“¦
version 1.46 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– PDF::Font πŸ’–

okay bestie, so this is PDF::Font β€” the base font class for PDF::Create. that's the whole vibe. it's from the User Contributed Perl Documentation section of the manual (3pm, iykyk) and honestly? it's giving foundational. πŸŽ€

✨ VERSION ✨

Version 1.46 🫢


🌸 DESCRIPTION 🌸

so basically, PDF::Font is the base font class that supports all the font families PDF::Create has blessed and approved. it's not out here doing its own thing β€” it gets used inside the method init_widths() over in the package PDF::Create::Page. main character supporting role energy, fr fr. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here's how you'd actually use it, no cap:

use strict; use warnings;
use PDF::Font;

my $font = PDF::Font->new('Helvetica');
my $char_widths = $font->char_width;
print "Character width: ", $font->get_char_width(ord('A')), "\n";
print "Character  name: ", $font->get_char_name(ord('A')) , "\n";

πŸ‘‘ CONSTRUCTOR πŸ‘‘

it expects font_name as the only parameter β€” that's it, that's the whole asking price. and it can be literally one of these names, periodt:

  • Courier
  • Courier-Bold
  • Courier-BoldOblique
  • Courier-Oblique
  • Helvetica
  • Helvetica-Bold
  • Helvetica-BoldOblique
  • Helvetica-Oblique
  • Times-Bold
  • Times-BoldItalic
  • Times-Italic
  • Times-Roman
  • Symbol

⭐ METHODS ⭐

char_width()

returns an arrayref of all characters width (0..255) ✨

get_char_width($codepoint)

returns the character width for the given $codepoint πŸ’–

get_char_name($codepoint)

returns the character name for the given $codepoint πŸŽ€


πŸ’œ AUTHORS πŸ’œ

Mohammad S Anwar (MANWAR) <mohammad.anwar at yahoo.com> 🫢

πŸ”₯ REPOSITORY πŸ”₯

<https://github.com/manwar/pdf-create> β€” go look, bestie, it's right there 🏠

...

okay so, legal moment, but make it cute:

Copyright 1999-2001, Fabien Tassin. All rights reserved. It may be used and modified freely, but I do request that this copyright notice remain attached to the file. You may modify this module as you wish, but if you redistribute a modified version, please attach a note listing the modifications you have made.

Copyright 2007 Markus Baertschi

Copyright 2010 Gary Lieberman

πŸ’€ LICENSE πŸ’€

This is free software; you can redistribute it and / or modify it under the same terms as Perl 5.6.0. free as in go off, but stay within the rules πŸ’…


and that's the whole page, babe!! 🌈 this was perl v5.38.2, dated 2024-03-07, aka PDF::Font(3pm) β€” slay, bye, love u πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from