How to manage fonts ?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
frandy

How to manage fonts ?

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How to manage fonts ?

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
frandy

Post by frandy »

Thank you garvin, but where can i find list of standard fonts ?

thanks a lot
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Frandy

Post by Frandy »

Looks nice, thanks
I'll try that in a near future.
Frandy

Post 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
frandy

Post by frandy »

May be you should propose a plugin for serendipity ;-)
Hi RoBA

Post by Hi RoBA »

Is it possible to use OTF font (openfyle font) instead of TTF ?
what code to replace if possible ?

Thanks

Frandy
Frandy

Post 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 :lol:

Frandy
Post Reply