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 Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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 ?
[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 ..
Embed API
I want to embed the PHP interpreter on some C programs I have. Those programs generate static HTML and I thought that PHP will be the best engine for this task. First I search for the Embed API but there seems to be no documentation or tutorials on the subject except for a couple of references on a lecture that was given on the Intl' Conference. Have any of you made a C or C++ program embeding PHP as the interpreter?
Embed C With Php
i dont know whether i am asking the correct question or not but i hope you will get the basic idea out of it... i heard that people now a days embed C/C++ with php, and somebody gave me an example of cURL function.. so if really its possible to write code or a function in C/C++ and use it with php then please guide me through this process i would love to do so coz i am very good in C.
PHP Embed Sound
So I am using this: <embed src="soundfile.mp3" autostart="true" loop="true"></embed> But it is breaking my sound file, like pausing at the loop, then repalying. Any way to fix this? Maybe use PHP instead of HTML?
PHP + IE Embed Problem
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> <head> <titleMy title </title> </head> <body> on place un embed <embed id="embed1" alt="ne marche pas..." src="ws.php? projet=ppp&mode=mmm&fichier=fff.xml&fichierxsl=xxx.xsl" type="image/svg +xml" WIDTH="300" HEIGHT="300"></embed> on place un embed <embed id="embed2" src="ppp.svg" type="image/svg+xml" WIDTH="500" HEIGHT="500"></embed> etc.... </body> </html> -------------------------------------- I run an Apache web server and unfortunatly, the first embed (name="embed1") is never requested by IE. The second one (name="embed2") is load correctly. Can anyone explain me why ? Maybe IE doesn't recognise a correct file extension, what else ??? I have been testing lots and lots of changes, but never work with IE. It works fine with Firefox...
Embed PHP In Javascript
I know that javascript is executed client side, and that the PHP is processed first, server side - but wondered if anyone knows of a way to achieve the following. I have a javascript function: function requestProd{ document.imgProd.src = 'elements/products1.gif'; document.imgServ.src = 'elements/services0.gif'; document.imgEven.src = 'elements/events0.gif';} When I invoke this javascript function, I want to be able to set a session variable in PHP - eg. <? $_SESSION['pressed'] = 'prod'; ?> ie. I effectively want to execute this, whenever the above function is executed. This is because I have Onclick events in javascript which execute this - and I have similar functions that I want to set the same session variable to different values. This is to allow a PHP script I run later to know what option the user pressed.
Embed A Php Code Into Html
I want to embed a php code into my html file. But its not showing anything. The same code works when I rename the file as .php <html> <body> <?php echo "hi";?> </body> </html> This code works as hi.php3 but doesn work when I rename file to hi.html.
Embed Php Code In A Cgi Script
I have a form on a php site and I'm trying to send the information filled out in the form to an email address, aswell as sending the email I also want to display a thank you page. However I want the thank you page to be in php with includes and so on. So my question is how do I get a cgi to recognise php commands?
Embed AppleScript Into A PHP CL Script?
Is it possible to embed AppleScript into a PHP script written for the command-line PHP interpreter? I tried using the Heredoc method to put an applescript into a string variable then run it through the shell but I keep getting a parse error no matter what I try. For a short example, say I want to run this applescript from a PHP command line script:
Embed PHP Script In HTML Page...
The first page of my Internet website must be INDEX.HTM. But, if I want to embed some PHP code in this page, I must rename it to INDEX.PHP. Easy, but not simple, because INDEX.PHP will not load as the default startup-page of my website. So, my question is: How can I embed some PHP code within a normal HTML page (without using the ..PHP extension)?
How Do You Embed PHP Commands Inside Another PHP Variable Set?
I would like a very nice PHP shortcut to dynamically setting a variable value by embedding PHP commands inside, which is what I can easily do in TCL: set stuff "hello [if {[regexp {/dev} $env(HTTP_HOST)]} {set x " devworld"} else {set x " world"}]" in TCL this would set stuff to either "hello world" or, if you're in /dev "hello devworld" how can I accomplish this great TCL feature in PHP? I haven't found a way yet, everything I have done has so far produced parse errors: $stuff = "hello" . (if (preg_match('//dev/i', $HTTP_HOST)) { $stuff ..= ' devworld' } else { $stuff .= ' world' });
Embed SMS Wireless Messaging Into PHP Applications
I know wireless is a big topic these days, and combining wireless messaging and PHP is a great new advance. Our company, Simplewire, is involved in doing that. We've set up a free Developer Program where you guys can try out our PHP software which lets your application send wireless messages via SMS to cell phones and pagerws worldwide. You can join at URL and try it out.
Returning HTML As Word, How Do I Embed Images?
I'm sending html content to the client computer as "application/msword" using the following code (see further down): Is it possible to embed images in $docContent so it will be accessible in the client computer if he: 1. Saves the downloaded doc and. 2. Laiter open the document without being online? example code:
Need To Do A 'Post A Video' Site (embed Only.) Security Issues
I am about to start one of those post your favorite youtube/liveleak /... video. It will be vbulletin integrated and I need to make sure that my programmer doesn't forget anything that could cause me to get hacked or whatever. What things can get overlooked, yet are vital to security? Once again, the videos will be hosted by others. Would a "Allowed to post from" domain list be smart? They will also be ratings and comments (so I can get as much text as possible.)
Embed Lots Of Html Code In Php & Construct Objects In Php
I have a php file, it contains just a few php codes. The php codes I need to use is to construct an object, and use it several times, from html head until the last line of html code. I know I can construct the same object (I am using php5) several times, something like $object = new $class, and use several <?php $object->functionX ? ... <?php $object->functionZ ? to include php code in html code. However, to construct this object I have to call a remote server, and rely on its response, which is a bit slow. To construct it several times takes even more time, and I do not like that. So my questions are : 1) How can I embed a big chunk of html code in php without using something like echo "<a href="aaa.html">" all the time 2) Can I just construct an object one time and use it in different <? php ... ?blocks?
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);
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?
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.
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?
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 "??"
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.
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?
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?
Change Font Size
I need a little help in changing the output of a script with the font size, I am using a users online script, but the output of the font is not specified so it comes out as the browser default size. this is the echo statement // Show all users online if ($user==1) {echo $user.' user online'} else {echo $user.' users online'} ?> Is there a way to add something to this to output a differant font size, I am clueless with php, Not even sure if this is the bit of the script that will change this.
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:
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.
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
Fpdf Adding Font Problm
Have anyone experience problem when trying to add font on fpdf (window version) for type1 font?
Change Font Style In PDF-files
I'm trying to change the font style for Tahoma from normal to italic. I inserted Tahoma and TahomaBD. But I can't find anything about changing the style, but underline...
Image With Functions And Font Face.
does anybody know how to change font-face in Arial,Verdana etc. when i'm using image-functions of PHP? Font-Size is clear to me... $fontSize=2 imagestring($im, $fontSize, $px, 34+($i*1.2), $line, $orange);
Thoughts On Font-size Control
I have been researching some different techniques to controll font size on a webpage and offer users a way to easily manipulate the font and was curious as to what methods others were using/had used in the past for this sort of thing. I have been using static point font sizes on a stylesheet. With a script that swaps out the stylesheet for one with larger point sizes upon clicking a button. I chose this technique out of all the others I have seen because it seemed to offer the most compatability with slightly out of date browers etc. However the built in font controll from IE, Firefox etc. still wreaks havoc on my sites layout. I am worried about using em's as I just dont see how to make that work in conjunction with images that are far less plyable than the text and other design elements. is there any way to supress the view>textsize? Has anyone had success with em's? Or does anyone have an interesting way to tackle this problem?
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!!!!
How To Load Font At Client Side?
How to load font at client side..likeIf I am searching keywords "Hindi" in google search engine..So in the result page I can see the fonts are in hindi, even though hindi font is not installed @ my(client) side.. I dont want to install manually @ client side.. It would be directly handeled via server.. (like above example)so how its possible in php?
Adding Font Effects To A Very Small Php Bit
So I have this small PHP bit and I want a red and bold font on the line that says "This post has been deleted by:" but not sure how to get it in there. Here's the bit: $post = 'This post has been deleted by:'. $usr; $ta = array ('post' => $post,); $db_string = $this->ipsclass->DB->compile_db_update_string( $ta ); $this->ipsclass->DB->simple_exec_query( array( 'update' => 'posts', 'set' => $db_string, 'where' => 'pid'.$pid ) );
Dynamic CSS - Changing Font Size
I've written a bit of script that allows a user to change the font size on a web page. I am aware that this can be done via browser settings, but the client wants the feature on the web page. My script uses a cookie to keep the users font choice persistent. However, when I run the script, the web page doesn't recognize the users font choice unless I refresh the page. Once I refresh the page, everything works fine. So I'm confused as to why the browser doesn't recognize the font choice right away. Any suggestions? Code:
Imagettftext Error Cannot Open/Find Font
I uploaded the font to a folder I created called fonts, but it doesn't seem to wanna open. I tried CHMOD the file to 777 the folder to 777. I also tried leaving off the .ttf like someone in the manual suggests. No luck. Do .ttf files need to be uploaded in some special manner? (like a perl file). I basically copied the text from the php site and changed the file path to reflect my arrangement: PHP Code:
Chinese, Japanese Font Issues With Mail
Can anyone provide me the simplest working solution to send mails in a multilingual website that too with no issues relating to display of characters, as of now I have find a solution which is working quite well, which is to paste a japanese or chinese lang. sentences to an editor like dreamweaver in design mode and paste the generated char code eg. #1045 to the database table to create a mail template, this is working fine but a labour job. Can you provide me with a more intelligent solution? such as by setting the charSet or something else as of I am using the phpmailer class for the purpose...
Encoding/characterset/font Family Confusion
I could use a bit of guidance on the following matter. I am starting a new project now and must make some decisions regarding encoding. Environment: PHP4.3, Postgres7.4.3 I must be able to receive forminformation and store that in a database and later produce it on screen on the client (just plain HTML). Nothing special. I do this for many years, but I never paid a lot of attention to special characters. A few day ago I discovered that the euro-sign is not defined in all fontfamilies. They cannot produce the right sign no matter if I use € or the hexadecimal equivalent. After a little research I found I could put font-tags around the euro-sign with another font-family (Arial in this case) to get the Euro sign. I am completely graphical impaired, and only understand programmingcode (and HTML/JavaScript of course) , so this is a weak point on my side, hence this question. I target on Europe only at the moment (no need for Chineese charactersupport) That said, will the following setup make sense? Postgresql db encoding scheme: LATIN1 In the headers of all my HTML: content-type: text/html charset: iso-8859-1 A few related questions: 1) Will people be able to copy/paste info from other sources (like wordprocessing programs and other websites) into my forms? 2) Can I use regular expressions as I am used to (ASCII) in my PHP code? Will I match e acute, eurosign, etc? 3) Will the roundtrip describe here under have problems with normal expected european characters? client copies some text from some source -> paste in the form -> receive by PHP -> insert in Postgresql (or update) -> retrieve from postgresql -> display as HTML (with content-type: text/html charset: iso-8859-1) Is that OK? Any pitfalls? Should I maybe use UTF-8?
Font Color In Jpeg Image (nearly) Always Orange
I am trying to run a basic script that displays an existing jpeg image and writes some text over it. Sounds simple, but I cannot seem to be able to colour the font correctly. In the example below it should be black but it comes out orange. In fact, even if I change the colour to 0, 0, 255 it's orange. I've read in the PHP documentation (the user contributed notes) that there are issues with jpeg font colouring. But I've not seen any details. Can anyone shed light on this for me please? The example code below is called as a function. The $image variable is a path to the existing image file and the $ttf variable is a path to a TrueType font. The $text variable contains a text string. header("Content-type: image/jpeg"); $base_image = imagecreatefromjpeg($image); $font = $ttf; $fontcolor = imagecolorallocate($base_image, 0, 0, 0); imagettftext($base_image, 18, 0, 10, 100, $fontcolor, $font, $text); imagejpeg($base_image); imagedestroy($base_image);
Changing Font Size Of GDF Fonts Over PNG Image
I used imagecreatefrompng("ur.png"), and created a png image. And used imagestring($im, $fontgdf, $leftPos, $height, $text, $txtcolor); to write over the png image. I downloaded and used gdf fonts. Function imagestring() does not take fontsize as parameter, therefore i could not change the font size.
Postcript Library And Fonts - Printer Embedded Font
Ok..am about to embark on making PHP generate basic formatted reports to a postscript printer attached to the server. After many struggles I have the postscript extensions installed and have been reading the documentation to at least eliminate the most basic stupid questions. One stupid question remains: How do I select a (printer) embedded font?...
|