|
From: | D.L.D. |
Subject: | Re: [ft] php character map => filter unused characters? |
Date: | Fri, 04 Nov 2005 17:45:14 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050402 |
Hello i have placed the code for ttf reading on the page its messy and not complete yet think php is alike c i think there are only 2 commands to use freetype in php for ttf to imageimagettfbbox <http://nl2.php.net/manual/en/function.imagettfbbox.php> -- Give the bounding box of a text using TrueType fonts imagettftext <http://nl2.php.net/manual/en/function.imagettftext.php> -- Write text to the image using TrueType fonts
so im trying to read the ttf file myself to filter out unused characters for the charmap page
for my messy php code see http://www.phpenabled.com/ttf_fontlist/fontlist.php?font=Phones_NormalA.ttf greetings luberth address@hidden wrote:
Hi On Thu, 03 Nov 2005 13:29:47 +0100 "D.L.D." <address@hidden> wrote:is it possible to filter out the rectangle and unused character?Yes, it's almost possible, although there's no perfect solution. The rectangle you see is fallbacking glyph. According to Microsoft TrueType specification (see specification of "loca" table):By definition, index zero points to the "missing character," which is the character that appears if a character is not found in the font. The missing character is commonly represented by a blank box (such as ) or a space.So, if you exclude the character whose GlyphID=0, you can exclude the rectangle. But, keep it in your mind: there are CJK fonts whose GlyphID=0 is a space, and someCJK fonts uses it for the glyph for "fullwidth space" (which is defined charcode) too.In addition, for multibyte cmap handler of TrueType font is specified to fallback to GlyphID=0 when the handler receives undecodable byte sequence (see "cmap" specifcation). But, I could not find such solid algorithmic specification for cmap format 0 for ASCII/Latin-1.is there a way to do this in php? for example filter only the used characters of http://www.phpenabled.com/ttf_fontlist/fontlist.php?font=Phones_NormalA.ttfI'm unfamiliar with PHP - and don't know PHP has FreeType module or PHP uses independent TTF handler (aslike Fonts-TTF module of perl). Regards, mpsuzuki
-- __________________________ Greetings, Luberth Dijkman Bangert 23 1619GJ Andijk Netherlands Got it all under control! CStep Motion Controlled (Hobby CNC) www.Luberth.com CStep.luberth.com www.GravoMaster.com www.GravoSoft.com www.GravoFlex.com www.GravoPlex.com www.FreeVectorArt.com www.NamePlate.tk www.NaamPlaatje.tk www.Sticker.tk www.SnijSticker.tk www.PhpEnabled.com www.snipperdag.comLuberth Dijkman Andijk Netherlands **********************************************************
http://zuiderzeemuseum.netfirms.com/feedback/feedback.html PHP forum BulletinBoard for questions, suggestions, comments http://phpenabled.com/phpBB/**********************************************************
[Prev in Thread] | Current Thread | [Next in Thread] |