Re[2]: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions

2003-02-07 Thread Tom Rogers
Hi,

Friday, February 7, 2003, 10:45:31 PM, you wrote:
AH   I don't think this is good idea.
AH date_sunset(), date_sunrise() are better.


AH Andrey


AH - Original Message -
AH From: moshe doron [EMAIL PROTECTED]
AH To: [EMAIL PROTECTED]
AH Sent: Friday, February 07, 2003 2:37 PM
AH Subject: Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions


 well, what about  sun_set(), sun_rise()?

 moshe
 --


 Andi Gutmans [EMAIL PROTECTED] wrote in message
AH [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  At 12:47 PM 2/7/2003 +0200, moshe doron wrote:
  Andi Gutmans [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I haven't been following this whole discussion.
However, the function names should follow the coding standards and
AH be
   named
something like date_sunrise(), date_sunset() (or whatever other
AH prefix
makes sense).
   
  
  here is part of my replay to Leon Atkinson:
Also, shouldn't sunrise() and sunset() be cal_sunrise() and
AH cal_sunset()?
   
  well, since sunset()  sunrise() have aspects more then cal_* related,
AH i
  thought the right place is standard.
  
  new astronomy extension, or linking against exisint lib, 'll be
AH overhead
  since i want use it on the calendar extension, that is build by default
AH on VC.
 
  Even functions in standard have a prefix. Only ancient ones don't and we
  didn't fix them for BC reasons.
 
  Andi
 




time_sunset time_sunrise would make more sense :)

-- 
regards,
Tom


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Re: [PHP] Does function ImageTTFText work with php 4.1.2 and freetype 2.0.5?

2002-03-04 Thread Tom Rogers

Hi
The following worked for me with gd gd-2.0.1 php-4.1.2  freetype-2.0.5

?php
Header(Content-type: image/jpeg);
$im = @imagecreate (400, 30);
$black = ImageColorAllocate ($im, 0, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);
ImageTTFText ($im, 20, 0, 10, 20, $white, 
/usr/local/jdk1.3.1_01/jre/lib/fonts/LucidaBrightDemiBold.ttf, 
Testing... Omega: #937;);
ImageJPEG($im);
ImageDestroy ($im);
?

(putting html in the jpeg output didn't work for me :)

for other people having trouble getting this to work here are the various 
settings that worked for me on linux:

gd-2.0.1 Makefile...
CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -DHAVE_XPM
LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lXpm -lm
INCLUDEDIRS=-I. -I/usr/local/jpeg-6b 
-I/usr/include/freetype2  -I/usr/include/X11  -I/usr/X11R6/include/X11 
-I/usr/include

freetype-2.0.5 was built with:
make setup CFG=--prefix=/usr

and php was configured with:
./configure \
--prefix=/usr \
--with-apache=/usr/src/apache_1.3.23 \
--enable-trans-sid \
--with-swf=/usr \
--with-vpopmail=/usr/local/apache \
--with-jpeg-dir=/usr/src/jpeg-6b \
--with-tiff-dir=/usr/src/tiff-v3.5.5 \
--with-png-dir=/usr/src/libpng-1.2.0 \
--with-zlib-dir=/usr/src/zlib \
--with-xpm-dir=/usr/X11R6 \
--with-pdflib \
--with-mysql=/usr/local/mysql \
--enable-static-pddflib \
--enable-ftp \
--with-gd=/usr \
--enable-gd-native-tt \
--enable-gd-imgstrttf \
--with-freetype-dir=/usr/include/freetype2 \
--with-mcrypt=/usr/src/mcrypt-2.5.10 \
--with-mhash=/usr/src/mhash-0.8.9 \
--with-pspell=/usr \
--enable-track-vars

Hope this helps
Tom




At 08:01 AM 5/03/2002, Ziying Sherwin wrote:

We installed php 4.1.2 with freetype 2.0.5 library support on our Solaris
2.8 machine using gcc 2.95.2. However, the php function ImageTTFText()
stopped to work properly with the new installation.

We used the following sample code from php web site for testing:

?php

   Header(Content-type: image/jpeg);

   $im = @imagecreate (400, 30);
   $black = ImageColorAllocate ($im, 0, 0, 0);
   $white = ImageColorAllocate ($im, 255, 255, 255);
   ImageTTFText ($im, 20, 0, 10, 20, $white, 
 /usr/openwin/lib/X11/fonts/TrueType/TimesNewRoman.ttf, Testing... 
 Omega: #937;);

   echo html titleTTF result/titlecenter body 
 bgcolor=\white\/centerhr ;
   echo PIMG SRC=\.ImageJPEG($im).\ ;

   ImageDestroy ($im);
?

But there is no text generated in the image. When we tried to use cyberbit
fonts to generate a UTF-8 string, we kept getting the warning message and
no image file is generated.

The same code works with php 4.0.1 and freetype 1.3.1 library. So is it a
problem with php 4.1.1 and freetype 2 library? Is there anyone who 
successfully used php 4.1.2 with freetype 2 library?

I am not on the mailing list, please send emails to [EMAIL PROTECTED]

Thanks,
Ziying Sherwin




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php