Page 1 of 1
How to manage fonts ?
Posted: Sat Aug 06, 2005 9:28 pm
by frandy
I modified ccs to display Andy font on my theme, looks fine at home because Andy font is installed on my pc. but another pc hasn't got the andy font installed and seems to use a default font.
is it possible to share fonts with automatic installation on hosts, in order to display original ccs ?
regards
Re: How to manage fonts ?
Posted: Sun Aug 07, 2005 1:37 am
by garvinhicking
There is no way to force non-standard fonts on other PCs.
The font you use must be installed on the PC of the person that is viewing your blog, and you cannot use CSSto "upload" a font to other machines.
Regards,
Garvin
Posted: Sun Aug 07, 2005 11:49 am
by frandy
Thank you garvin, but where can i find list of standard fonts ?
thanks a lot
Posted: Sun Aug 07, 2005 2:14 pm
by garvinhicking
Posted: Mon Aug 08, 2005 7:23 pm
by Frandy
Looks nice, thanks
I'll try that in a near future.
Posted: Wed Aug 10, 2005 1:48 pm
by Frandy
RobA wrote:If you want to use you own, or special fonts for emphasis, i.e. headings or titles, you can render them dynamically using php.
I recently set up my blog to do this using a font a had of my own printing for the entry headers.
An example and explanation is here
http://ffaat.pointclark.net/blog/archiv ... mages.html
Hi RobA,
Could you tell me please where to put files in serendipity tree installation (in template folder ?) ? (image.php and font.ttf)
Thanks a lot
Posted: Wed Aug 10, 2005 5:35 pm
by frandy
May be you should propose a plugin for serendipity

Posted: Tue Aug 16, 2005 10:58 pm
by Hi RoBA
Is it possible to use OTF font (openfyle font) instead of TTF ?
what code to replace if possible ?
Thanks
Frandy
Posted: Wed Aug 17, 2005 10:02 pm
by Frandy
RobA wrote:Frandy -
the GD library uses freetype, and I see that freetype 2 supports Open Type font glyphs
http://freetype.sourceforge.net/freetype2/ and php/GD can use freetype 2
http://ca.php.net/gd....
so it all depends on the version on your system...
I tried it using a ttf file from my W2K system that had a ttf extension but claimed to be an Open Type font and it worked.
-Rob A>
may be depending on font used, i had to convert my font from otf to ttf because of french caracters were not correctly printed (è,à,é...).
i modified your script in order to add transparency to text background. For example :
Code: Select all
// Create the image
$im = imagecreatetruecolor(abs($size[4]-$size[0])+2,$size[1]+abs($size[5])+2);
// Create some colors
$background = imagecolorallocate($im, 255, 251, 239);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
$orange = imagecolorallocate($im, 176, 0, 38);
// Add some shadow to the text
imagefill($im,0,0,$background);
$trans = imagecolortransparent($im,$background);
imagettftext($im, $px, 0, 1, abs($size[5])+1, $grey, $font, $text);
and works fine
Frandy