[cairo-commit] cairo-perl/t CairoFt.t,NONE,1.1
Torsten Schoenfeld
commit at pdx.freedesktop.org
Wed Oct 24 09:32:08 PDT 2007
Committed by: tsch
Update of /cvs/cairo/cairo-perl/t
In directory kemper:/tmp/cvs-serv3018/t
Added Files:
CairoFt.t
Log Message:
* Cairo.pm
* Cairo.xs
* CairoFt.xs
* Makefile.PL
* cairo-perl.h
* cairo-perl.typemap
* examples/freetype-font.pl
* t/CairoFt.t: Add support for part of cairo's FreeType
integration API. Currently, that's just
Cairo::FtFontFace::create, which lets you create a cairo font face
from a FreeType font face.
--- NEW FILE: CairoFt.t ---
#!/usr/bin/perl
#
# Copyright (c) 2007 by the cairo perl team (see the file README)
#
# Licensed under the LGPL, see LICENSE file for more information.
#
# $Header: /cvs/cairo/cairo-perl/t/CairoFt.t,v 1.1 2007-10-24 16:32:05 tsch Exp $
#
use strict;
use warnings;
use Test::More;
use Cairo;
unless (Cairo::HAS_FT_FONT && eval 'use Font::FreeType; 1;') {
plan skip_all => 'need Cairo with FreeType support and Font::FreeType';
}
my $file = '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf';
unless (-r $file) {
plan skip_all => 'can\'t find font file';
}
plan tests => 2;
my $ft_face = Font::FreeType->new->face ($file);
my $cr_ft_face = Cairo::FtFontFace->create ($ft_face);
isa_ok ($cr_ft_face, 'Cairo::FontFace');
is ($cr_ft_face->status, 'success');
More information about the cairo-commit
mailing list