Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / select-font-face.php
blobdba1bdf02706edc77930467f02be8839695f7e29
1 <?
2 $TEXT_SIZE = 12;
3 $sur = new CairoImageSurface(FORMAT_ARGB32, 192, 16);
4 $con = new CairoContext($sur);
5 $con->save ();
6 $con->setSourceRgb ( 1.0, 1.0, 1.0); /* white */
7 $con->paint ();
8 $con->restore ();
10 $con->setSourceRgb ( 0, 0, 0); /* black */
12 $con->selectFontFace ( "Bitstream Vera Serif",
13 FONT_SLANT_NORMAL,
14 FONT_WEIGHT_NORMAL);
15 $con->setFontSize ( $TEXT_SIZE);
17 $con->moveTo ( 0, $TEXT_SIZE);
18 $con->showText ( "i-am-serif");
20 $con->selectFontFace ( "Bitstream Vera Sans",
21 FONT_SLANT_NORMAL,
22 FONT_WEIGHT_NORMAL);
23 $con->showText ( " i-am-sans");
25 $con->selectFontFace ( "Bitstream Vera Sans Mono",
26 FONT_SLANT_NORMAL,
27 FONT_WEIGHT_NORMAL);
28 $con->showText ( " i-am-mono");
29 $sur->writeToPng("select-font-face-php.png");