Jump to content

dgywft

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Bangkok

dgywft's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am having troubles loading an xml file, without it just out displaying all the information right away into my php document. Example, i have a php file that runs a command line call to generate some xml, the file name on the server is like fontxml.php (header set to xml though), and its output is like this (when viewing the page source): <?xml version="1.0" encoding="UTF-8" ?> <report> <fonts> <font> <commonName>Arial</commonName> <nativeName>Arial</nativeName> <fixedWidth>no</fixedWidth> <fixedSizes>no</fixedSizes> <copyright>Copyright © 2010 by Apple.</copyright> </font> </fonts> </report> My problem is, I want to display just the "commonName" value into a certain page design. When I do an include, the entire xml data is just opened into my document right away. I have tried loading with simplexml methods, nothing works. Any ideas on this?
  2. No, I mean like actually create the entire image that outlines the letter designs in the font. Anyone know how to or ever seen any scripts to document a font like this? Imagemagick has one script, but its not like this and its suppperrrrr slow..
  3. Has anyone out there ever used PHP to grab the font information of a opentype or truetype font file? For example, create a character, glyph map of all the letter designs in a font? I see many font sites do this, but I have tried doing this with imagemagick, result was way to slow and crashed out most the time. Here are a few examples I have found of working examples: http://fontshop.com/fonts/font_rend.php?idt=f&id=224932&rbe=cmap&acs=1&acs_p=1&acs_pt=32 http://new.myfonts.com/fonts/boris-marinov/dimitrina/thin/characters.html Any ideas? I have been trying for months, no results yet.. [attachment deleted by admin]
  4. This is checking a sku number in my site. It them runs that function with the sku to see what type of product, then set the folder name (mm,print,eps), then return that value at end of function. Then back to my actual page thats running the function, I run it in that statement, then use the variable ($theImagePath) next line in a if statement: - $theImagePath = $serverPath ."/img/". getFolder($sku). "/" . $sku . "/"; if( file_exists($theImagePath) ) {
  5. Hey guys, I am having an issue making my own function. I want to run the following function: function getFolder($sku) { if ( (strpos($sku, "P") === 0) || (strpos($sku, "P")) ) { $imgfolder = "print"; } if ( (strpos($sku, "E") === 0) || (strpos($sku, "E")) ) { $imgfolder = "eps"; } if ( (strpos($sku, "T") === 0) || (strpos($sku, "T")) ) { $imgfolder = "type"; } if ( (strpos($sku, "C") === 0) || (strpos($sku, "C")) ) { $imgfolder = "cloth"; } if ( (strpos($sku, "A") === 0) || (strpos($sku, "A")) ) { $imgfolder = "art"; } if ( (strpos($sku, "M") === 0) || (strpos($sku, "M")) ) { $imgfolder = "mm"; } return $imgfolder; } The function will not work as written here: $theImagePath = "/img/". getFolder($sku) . "/" . $sku . "/"; Can anyone provide some pointers on the proper way to run this function as needed?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.