Font::FreeType::Glyph

Font::FreeType::Glyph is a Perl module that contains glyphs from font typefaces loaded from Font::FreeType.
Download

Font::FreeType::Glyph Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Geoff Richards
  • Publisher web site:
  • http://search.cpan.org/~geoffr/Daizu-0.3/lib/Daizu/Preview.pm

Font::FreeType::Glyph Tags


Font::FreeType::Glyph Description

Font::FreeType::Glyph is a Perl module that contains glyphs from font typefaces loaded from Font::FreeType. Font::FreeType::Glyph is a Perl module that contains glyphs from font typefaces loaded from Font::FreeType.SYNOPSIS use Font::FreeType; my $freetype = Font::FreeType->new; my $face = $freetype->face('Vera.ttf'); $face->set_char_size(24, 24, 100, 100); my $glyph = $face->glyph_from_char('A'); my $glyph = $face->glyph_from_char_code(65); # Render into an array of strings, one byte per pixel. my ($bitmap, $left, $top) = $glyph->bitmap; # Read vector outline. $glyph->outline_decompose( move_to => sub { ... }, line_to => sub { ... }, conic_to => sub { ... }, cubic_to => sub { ... }, );This class represents an individual glyph (character image) loaded from a font. See Font::FreeType::Face for how to obtain a glyph object, in particular the glyph_from_char_code() and glyph_from_char() methods.Things you an do with glyphs include:· Get metadata about the glyph, such as the size of its image and other metrics.· Render a bitmap image of the glyph (if it's from a vector font) or extract the existing bitmap (if it's from a bitmap font), using the bitmap() method.· Extract a precise description of the lines and curves that make up the glyph's outline, using the outline_decompose() method. Requirements: · Perl


Font::FreeType::Glyph Related Software