Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





To Install A New Font While View Page!!!!


I am working with chinese fonts and experienced the difficulty as a user to view that page in chinese... How can i add (or install )chinese fonts to the user's system while the user try to view that page!!!!




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
How Do You Tell If A Page View Is A Direct Hit, Iframe View, Or Other
How can one tell if a hit on a PHP page was generated from an iframe, object/img tag, or a direct hit?

View Replies !   View Related
Read True Type Font (ttf) Tags (font Name...)
I try to acces to the font name of my ttf fonts using a php script
with the file name.
I've found a script reading idv tags from mp3 files, but it's too
specific.
Can anyone say me how to read a ttf file in php ?

View Replies !   View Related
[GD] Could Not Find/open Font - Font Problem
I know this subject was up several times but Icant get it work
use gd2 on win32
<?
putenv('GDFONTPATH=f:swdfont');
$font = "f:/swd/font/arial.ttf";
$im = imagecreate (250, 28);
$black = ImageColorAllocate ($im, 0, 0, 0);
$yellow = ImageColorAllocate ($im, 235, 235, 51);
ImageTTFText ($im, 20, 0, 10, 20, $yellow, $font,
"comming text or not?");
ImagePNG($im,test.png);
?>
<img src="test.png" alt="image">

but I allway get error about not finding font ..

View Replies !   View Related
How To Convert True Type Font To Swf Font??
I want convert type type font(*.ttf) to swf font(*.l, *.f)

/usr/share/php/swffonts/Curl-Roman.f
/usr/share/php/swffonts/Curl-Roman.l
/usr/share/php/swffonts/Haeberli.f
/usr/share/php/swffonts/Haeberli.l
........
........

other font not found swffonts directory..
I should like to use other font at swf_definefont()..

how to convert true type font ??

View Replies !   View Related
View The Source Of Another Page
From www.whatever.com/index.php how can I get the source for www.anothersite.com/page.php ?

View Replies !   View Related
Mac IE- Customer Can Not View Page
I have an irate customer who is running IE 5.2 on Mac. She can not view the webpage:

She just gets a blank screen.

I set up many CSS styles in beginning of code, I think the issue is located there. Can someone take a look at code and give me their thoughts? I have no problem viewing page in IE 6.0, Netscape, or Firefox.

View Replies !   View Related
Regular Expressions - Scan A Html Page For Color And Size Of Font
What I would like to do is scan a different html page for say size="2" colour="000000" text and output it in a format of my choice. This is what i have so far: Code:

View Replies !   View Related
Cant View Data On My PHP Page From MySql DB.
Im working on a character generator for a PHP game Im trying to get going but Im having trouble getting data from my mySql database. I created the table and added all the columns using this file:

View Replies !   View Related
View The Source Of A Web Page Using A Script?
This is probably some really basic operation, but how do I view the source
of a web page using a php script.

For example I want to have a variable, say

$url = "www.google.com";

Then I want to echo its source code, so that I have a page showing:

<html>
<head><title>Whatever</title></head>
<body>
..
..
</body>
</html>

View Replies !   View Related
Simple Page View Counter
I have been working on a page view counter. Now I haver researched google five times already and can't find a script that calculates a specific page's hits (not the whole site's page htis). So I made my own. Here is the code. I have tried it and it doesn't seem to work. Code:

View Replies !   View Related
View The Source Code From A Php Page
Is there a way to view the source code from a php page and see the php? If there is, isn't that really bad? Aren't there a lot of websites out there that could be really messed up if someone could see the php part of the page?

View Replies !   View Related
View Only The Main Page Script
How can I prevent users from browsing to any page they want to on my website by typing in the URL to it in the address bar? I only want them to be able to access the main page (index.php) .

View Replies !   View Related
Sessions :: You Are Not Authorized To View This Page
PHP Code:

session_start();
$_SESSION['user']=$username;

then on the next page, i tried to check the existence of the content of the said session variable with the following code: PHP Code:

if(empty($_SESSION['user'])) {
      echo "you are not authorized to view this page";
}.

View Replies !   View Related
Delete Option From My View Records Page
I have a list of things I need to do with my database - but this is my next hurdle - the delete query within my view records page. I want to be able to click on a button or link to delete a record in a table. I was envisaging that each record would have a delete button or link next to it and clicking that would remove it. Here is the script I have created to view "Devices": PHP Code:

View Replies !   View Related
Drag And Drop File To Page View
I want to coding drag and drop but it has more problem. I wanna drag file from desktop and drop into page view then page view show description and file size, can I? Instead of browse from file by use button. How should I do about this?

View Replies !   View Related
Redirects The User Back To The View Page
i am facing a strange problem of redirection. After the user fills up the form, i submit the data to save.php file and at the end i have a header which redirects the user back to the view page.Below is the code of save.php: Code:

View Replies !   View Related
How Can I View Full Table (like In PhpMyAdmin) From My Database On My Php Page?
how can i view full table (like in phpMyAdmin) from my database on my php page? Lets imagine i have a table called models and it has columns called model_id, model_name. What script should i use to print all table on the page?

View Replies !   View Related
Tikiwiki: Tiki-install.ph Blank Page
Just in case anyone searchs on this topic. I kept
getting a blank page running a fresh install of
tikiwiki 1.9.x tiki-install.ph. Downgrading to 1.8.x
gave me a mysql_connect() error which tipped
me off to the problem. I was running a fresh load
of FC 4 which had a php, php_pear and mysql but
not a php_mysql connector. Doing a rpm query
should show at least:

# rpm -qa | grep php
php-mysql-5.0.4-10.5 <== this was missing
php-5.0.4-10.5
php-pear-5.0.4-10.5

Solution was to do a "yum install php-mysql".

It'd be nice if tiki-install.ph did some sort of test
that 1.8.x appears to have been doing.

View Replies !   View Related
Libtool: Install: Error: Cannot Install `libphp5.la' To A Directory Not Ending In /va
I am trying to install php on a Solaris 9 box. Here is my configure statement: Code:

View Replies !   View Related
Use For Install Like /install Or Install.php Or Setup.
I am trying to install a php script and there is nothing about what to use for install like /install or install.php or setup. I have tried to contact the developer email sends back.

View Replies !   View Related
PHP Install Core Dump "make Install" PEAR On Solaris 9
php has been configured with the following two configure lines and
core's during "make install" on the PEAR section. Is there something
simple i'm missing? Any help would be appreciated.

Environment:

Solaris 9
php 5.2.1
GNU Make 3.81
gcc 4.1.1

../configure --prefix=/opt/foo/php5 --enable-force-cgi-redirect --
enable-discard-path --enable-fastcgi --with-curl=/opt/foo --enable-
sockets --with-zlib=/opt/foo --with-libxml-dir=/opt/foo --with-
openssl=/opt/foo --with-nsapi=/opt/foo/sunone/current --enable-ftp --
with-ldap=/opt/foo/openldap --with-snmp=/opt/foo/net-snmp --enable-
soap --with-xsl=/opt/foo --enable-libgcc --with-mysql=/opt/foo/mysql --
with-pear .....

View Replies !   View Related
PS Font
I have been trying to use .pfb fonts (Type 1) to generate dynamic
images. However the text in the images is very aliased and blurred.
This is of course not because of the font or the font style itself.
Please let me know if you have any ideas or opinions about it. Code
snippet:

$SIZE = 14;
$FONT_PATH = "/usr/X11R6/lib/X11/fonts/Type1/hell.pfb";
$FONT = ImagePSLoadFont($FONT_PATH);
$im = ImageCreate(100, 100);
$white = ImageColorAllocate($im, 255, 255, 255);
$gray = ImageColorAllocate($im, 134, 134, 134);

// draw
ImagePSText($im, $str, $FONT, $SIZE, $gray, $gray, 0, $SIZE,0,0,0,16);
ImagePSFreeFont($FONT);

View Replies !   View Related
Can You Arc A Font With PHP?
I am writing a program with the GD library and need to arc a font like Photoshop does. I know how to write text, slant a font, etc., but I cannot figure out how to arc it and do other things. Is this possible with PHP?

View Replies !   View Related
Using A Different Font
I like this font called trebuchet ms. I think most computers have it. but I don't know how to get it to go on my website. I have even uploaded the font.

View Replies !   View Related
With Includes / Font Tag
I was wondering how I would be able to strip the <font> tags from a file
when I include it so it can take on the characteristics of my own stylesheet
instead of the font tag attributes.

View Replies !   View Related
Font In GD Library?
Is it possible to select a font in the GD library?

View Replies !   View Related
PHP Font Boundingbox Help
I'm trying to understand how to work with bounding boxes around text with
the GD2 library. I thought I understood the concepts and wrote a simple
program to make sure. Here it is:

<?php
putenv('GDFONTPATH=c:windowsfonts');
$bbox=imagettfbbox(10,0,"arial.ttf","Hello World");
echo "upper left ($bbox[6],$bbox[7])-----upper right
($bbox[4],$bbox[5])<br><br>";
echo "lower left ($bbox[0],$bbox[1])-----lower right ($bbox[2],$bbox[3])";
?>

The idea is for me to find out the bounding box coordinates for a Hellow
World message. The output produced has me very confused though. It shows
the coordinates as follows:

upper left (-1,-10)-----upper right (66,-10)
lower left (-1,-1)-----lower right (66,-1)

I understand how the lower left coordinate can be -1,-1, and the lower right
coordinate seems logical, too.

How, though, can the upper coordinates have y values of -10? That's below
the baseline! It would seem logical that since I specified a font size of
10 my Y coordinates on the top would be roughly 10 more than the y
coordinates of the lower corners. So, I'd expect the upper coordinates to
be something like (-1,10) and (66,10). Where is the negative 10 coming
from?

View Replies !   View Related
Embed A Font
How do I embed a font onto a remote user's machine? Say he dont have a Papyrus but I want him to view the webpage using the Papyrus font.

View Replies !   View Related
How To Change Font In GD?
How can I change the font in GD?

View Replies !   View Related
Add A New Font To Editor
I want to add a new font to the editor(Innovaeditor).. I changed the font name in editor side and add that font in my fonts folder in control panel...
But the name of the font is like this "??"

View Replies !   View Related
Custom Font
Is there a way to use custom fonts if you upload the font to the server?

View Replies !   View Related
Font Theme
i have a themes.php file which has a variable called themeselection. that variable is set equal to a certain theme. then there's a switch statement that finds out which theme is selected and sets variables accordingly.

Well all of the variables work and change the theme except for two variables. the $face - for font face and $textcolor for the textcolor.

I took a look at the source that its generating and it has an empty space like this:

<font face=' ' color=' '>

Like i said these are the only two that are having this problem. any thoughts?

View Replies !   View Related
Adding A Font
i got this gd code from php.net all works grate, But i wanted to add a font so i
downloadded a font and it's called font.ttf now i need to no how to add it to the
below code, each time i try i get a long funny error. The font and picture are in the same folder as this code any advise please cheer. Like i say without the font i can see the picture and the letters on top. why dont this work.

<?php
header("Content-type: image/png");
$string="hell i am redarrow";
$im    = imagecreatefrompng("mat_picture.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px    = (imagesx($im) - 7.5 * strlen($string)) / 2;
//font needs to be added.
//$font = imageloadfont("font.ttf");
// some were on this line the varable font needs adding.
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
?>

View Replies !   View Related
How Do I Add A Font To An ImageString?
ImageString($im, 15, 1, 1, "Song: $song", $color);

How do I set it so that the font it uses is Verdana

View Replies !   View Related
Font Issue Using GD
I am developing a script that places multiple lines of text on an image. The goal is to be able to set the font, font size and color for each line. Code:

View Replies !   View Related
Css - Font Tags
tearing apart some very, very messy code and cleaning up. I have a few very basic error functions that return a string. Is it bad style to not incorporate my style sheet for the fonts (i.e. there are font tags on these phrases).

View Replies !   View Related
Gd Font Size
how to fix this so I can make the font large, right now I think the largest is 5 and it cant go larger. I need real large text to be printed Code:

View Replies !   View Related
Font Layout With PHP
Is there any way to use PHP for my Font layout. I want to take a sentance and curve it to follow the contour of an object. I know I can do this as an overlay in PSP, but that would add the the size of the page file and also mean possabily another file for the server to load on request.

View Replies !   View Related
ImageString: How Do I Use A Font That Is Not One Of The Default 5?
I am playing with imagegd for generating images, and was wondering if there is a way I could use a font that is not one of the default 5? I remember reading somewhere about a TT font library for imagegd, but don't remember the specifics. If someone could point me in the right direction I would appreciate it.

View Replies !   View Related
Making PDFs With PHP - How Do I Add Another Font?
Does anyone have experience adding new fonts to FPDF? The package comes with helvetica, times and courier; I'd like to make PDFs that use Copperplate Gothic.

View Replies !   View Related
GD & Text / Font Tricks Anyone?
Does anyone know any tricks->(Read: code) for creating different font effects using the GD Lib. I know how to create images using ttf fonts but they all pretty plain and boring. Shading Effects, Glows, Shadows etc?

View Replies !   View Related
Fixed Font Size
I making a web site where people can change the font size with a form on
a seperate page. I store the value in session-variables and read them
every time a page is loaded.

I wonder if it is possible to prevent people changing the fontsize with
Mozilla or IE menu's? Can anyone tell me more about this?

View Replies !   View Related
Font Path For Images Using A Mac OSX
all can anyone tell me the fontpath for the mac osx, i dont mind for
which font say Arial. It is compulsory for the function: imagefttext.

View Replies !   View Related
Change Font GD Extension
I found a tutorial on how to write text onto an existing image, but now I am having trouble changing the font of the outputted text. Code:

View Replies !   View Related
Windows -> UNIX Font
i programmed a security image thing, but i programmed it on my computer, so it's taking it's fonts from C:WINDOWSfonts

the webserver i am trying to implement it on is UNIX..can anyone help on what to set the font path at to load a font? and what's a good font to use? i want to use a serif font since the terminal ones are easier to read via bots.

View Replies !   View Related
Font Size In Imagestring()
How do you change the font size when using imagestring() ??

I know you can choose between 1 and 5 but since I added in a font, I do not know how to specify the font size

Here is my code:

imagestring($captcha, 5, 20, 10, $string, $colour);

but as soon as i replace the 5 with my $font, it becomes tiny

View Replies !   View Related
Dynamic Font Images
I've noticed that the ImageTTFText()/ImageTTFBox() functions actually works with all fonts (PostScript type 1 & True Type) without a problem on Windows.

Whilst all TTF fonts work with Linux using the same function (as do many PostScript Type 1 fonts) there are a number of PostScript fonts that fail to work and just return an error:

Warning: imagettfbbox(): Could not find/open font in
/home/user/public_html/test/image2.php on line 38

I was hoping someone could enlighten me as to why a number of PostScript fonts don't work on linux using the above functions (not the correct ImagePSText() ), yet some fonts do work.

Is there a library that I need to install on the Linux Machine? Code:

View Replies !   View Related
Setting Font And Size
How do I set the font and font size for this code below?

header("Content-type: application/msword");
header("Content-disposition: attachment; filename="$fname"");
header("Content-length: " . strlen($mitch));
header("Content-transfer-encoding: ascii");
header("Pragma: no-cache");
header("Expires: 0");

View Replies !   View Related
Upload A Font File.
I want to insert a text on the image while I upload it....when I try to do it the text is displayed till the end of the image and then stops the rest of it is not displayed..I know that I am supposed to do a word wrap with it but I donno how that is done with an image.

View Replies !   View Related
Captcha Font Size
i finally created a captcha image with this file:

<?
session_start();
header("Content-Type: image/jpeg");
// *** Send a generated image to the browser ***
die(create_image());
// *** Function List ***
function create_image()
{
   // *** Generate a passcode using md5
   //   (it will be all lowercase hex letters and numbers ***
   $md5 = md5(rand(0,9999));
   $pass = substr($md5, 10, 5);

   // *** Set the session cookie so we know what the passcode is ***
   $_SESSION["pass"] = $pass;

   // *** Create the image resource ***
   $image = ImageCreatetruecolor(100, 70);

   // *** We are making two colors, white and black ***
   $clr_white = ImageColorAllocate($image, 255, 255, 255);
   $clr_black = ImageColorAllocate($image, 0, 0, 0);

   // *** Make the background black ***
   imagefill($image, 0, 0, $clr_black);

   // *** Set the image height and width ***
   imagefontheight(150);
   imagefontwidth(150);

   // *** Add the passcode in white to the image ***
   imagestring($image, 5, 30, 3, $pass, $clr_white);

   // *** Throw in some lines to trick those cheeky bots! ***
   imageline($image, 5, 1, 50, 20, $clr_white);
   imageline($image, 60, 1, 96, 20, $clr_white);



   // *** Return the newly created image in jpeg format ***
   return imagejpeg($image);

   // *** Just in case... ***
   imagedestroy($image);
}
?>


i can't find font size finction ??

and i've changed this line values but nothing changes here, what this is fo ?

   // *** Set the image height and width ***
   imagefontheight(150);
   imagefontwidth(150);

View Replies !   View Related
Pear::File_PDF -- No Font Set?
I have a little hello world demo, but it does not seem to work.

First I will post the code; then explain the error.

$p = &File_PDF::factory('P', 'mm', 'A4');
$p->setinfo('title', 'This is the title of the pdf');
$p->setinfo('subject', 'The Subject');
$p->setinfo('creator', 'Who made this?');

$p->open();
$p->addPage();
$p->setXY(50 , 15);
$p->setFont('arial', '' , 20);
$p->write(0 , 'this is a test, please work');
$p->output('mytest.pdf', false);
$p->close();


So, I goto the .php file that I've created and the save/open pdf file window pops up as expected. I click open to view the file -- however, when I open it under Linux all I get is the title.

when I go to view this file under windows; adobe gives me the error 'font has not been set'

I've then gone and done a tail error_log in my httpd logs and nothing appears to be wrong.

View Replies !   View Related
Font Problems In EzPDF
I use ezPDF like this

$pdf = new Cezpdf('a4','potrait');

$tmp = array(
'b'=>'Courier-Bold.AFM',
'i'=>'Courier-Oblique.AFM',
'bi'=>'Courier-BoldOblique.AFM',
'ib'=>'Courier-BoldOblique.AFM',
'bb'=>'Times-Roman.afm' );
$pdf->setFontFamily('Courier.AFM',$tmp);

$codeFont = 'fonts/Courier.AFM'
$pdf->selectFont($codeFont);

$pdf->addText(.....

The problem is that I cannot change the font, it remains to be Helvetica... the fonts folder is present, moving the files and checking whether they are corrupt does not change anything.

Can anyone explain? Or send their way of doing this?

->Secondly, where do I get a newer version of ezPDF, I have 0.9 for now.

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved