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.
Product's homepage
Requirements:
· Perl
Download Font::FreeType::Glyph 0.03 Free
Tags: font typefaces , font glyphs , Perl module , font , FreeType , glyphs ,
, = sub, sub , bitmap, sub , sub, glyph, font, image, perl, $glyph =, loaded, glyphs, using, $glyph, it's, extract, vector, render, outline, include·, methodsthings, requirements, ·, glyph_from_char_code

No comments:
Post a Comment