Pelle Svensson | 2 Jul 2008 17:56
Picon
Favicon

[ft] Rendering of Thai incorrect.


Hi,

I can't get trueetype to combine glyps correct in Thai, see attached png.
In following post they are combined but not fully correct.
http://lists.gnu.org/archive/html/freetype/2007-02/msg00008.html

In my case they are not combined at all

Questions.

- Has the combination process a dependence on kerning information in the font file.
- If there is no kerning dependence, how is the combination done. Is it inside freetype or is there other info
in the font file which is missing in my case.
- Do I need to do any special configure of freetype before build. I use version 2.3.7

My basic Fedora Core 6 shows the same error.
look at: http://thai.tourismthailand.org/about-thailand/
In Windows it is correct but in FC6 (Firefox 2.0.15) it's incorrect.

_________________________________________________________________
Skapa dina egna uttryckssymboler till Messenger!
www.windowslive.se/dinegensmiley
suzuki toshiya | 3 Jul 2008 16:23
Picon

Re: [ft] Rendering of Thai incorrect.

Hi,

I'm interested in, please repost with attached png. Do you have any
successfully rendered example by open source software (e.g. legacy
firefox or gtk+ application)?

Regards,
mpsuzuki

Pelle Svensson wrote:
> Hi,
>
> I can't get trueetype to combine glyps correct in Thai, see attached png.
> In following post they are combined but not fully correct.
> http://lists.gnu.org/archive/html/freetype/2007-02/msg00008.html
>
> In my case they are not combined at all
>
> Questions.
>
> - Has the combination process a dependence on kerning information in the font file.
> - If there is no kerning dependence, how is the combination done. Is it inside freetype or is there other
info in the font file which is missing in my case.
> - Do I need to do any special configure of freetype before build. I use version 2.3.7
>
> My basic Fedora Core 6 shows the same error.
> look at: http://thai.tourismthailand.org/about-thailand/
> In Windows it is correct but in FC6 (Firefox 2.0.15) it's incorrect.
>
> _________________________________________________________________
(Continue reading)

Aaron Winborn | 3 Jul 2008 21:32

[ft] freetype+gd with mac fonts?

i am attempting to create an image in php with gd, using freetype for 
fonts. i can get it working with a .ttf font, but have the mac version 
of another font that i want to use, and it doesn't load. i saw the 
warning at http://us.php.net/imagettftext about .ttf being automatically 
appended, but i'm prepending the font with a /path/ anyway, so it 
shouldn't matter. just to make sure, i tried the putenv('GDFONTPATH=' . 
realpath('.')); trick and also tried manually renaming the font with a 
.ttf extension, both to no avail.

i don't know mac's file standards, but i did notice there was a font 
GothBla in one folder, and ._GothBla in Gotham/__MACOSX, so i've tried 
all of this using both files.

any ideas of what to try next?

thanks,
aaron winborn
Aaron Winborn | 3 Jul 2008 22:15

[ft] freetype/gd with mac font

sorry if this is a repost; my dns went down in the middle of sending it.

i am attempting to create an image in php with gd, using freetype for 
fonts. i can get it working with a .ttf font, but have the mac version 
of a font that i want to use, and it doesn't load. i saw the warning at 
http://us.php.net/imagettftext about .ttf being automatically appended, 
but i'm prepending the font with a /path/ anyway, so it shouldn't 
matter. just to make sure, i tried the putenv('GDFONTPATH=' . 
realpath('.')); trick and also tried manually renaming the font with a 
.ttf extension, both to no avail

i don't know mac's file standards, but i did notice there was a font 
GothBla in one folder, and ._GothBla in Gotham/__MACOSX, so i've tried 
using both files

any ideas of what to try next?

thanks,
aaron
Ryan Schmidt | 4 Jul 2008 07:01
Favicon

Re: [ft] freetype+gd with mac fonts?


On Jul 3, 2008, at 14:32, Aaron Winborn wrote:

> i am attempting to create an image in php with gd, using freetype  
> for fonts. i can get it working with a .ttf font, but have the mac  
> version of another font that i want to use, and it doesn't load. i  
> saw the warning at http://us.php.net/imagettftext about .ttf being  
> automatically appended, but i'm prepending the font with a /path/  
> anyway, so it shouldn't matter. just to make sure, i tried the  
> putenv('GDFONTPATH=' . realpath('.')); trick and also tried  
> manually renaming the font with a .ttf extension, both to no avail.
>
> i don't know mac's file standards, but i did notice there was a  
> font GothBla in one folder, and ._GothBla in Gotham/__MACOSX, so  
> i've tried all of this using both files.
>
> any ideas of what to try next?

Are you doing this on a Macintosh or something else? I assume you  
need a Mac to do this.

Mac files can have two forks -- data and resource. Most every other  
OS considers a file to be just data. Old Mac fonts are in the  
resource fork however. On filesystems that don't support multiple  
forks, the two forks are broken out into two files -- GothBla is the  
data fork (probably empty?) and ._GothBla is the resource fork. I  
assume you need to combine these together so that you have a proper  
Mac resource file.
Aaron Winborn | 4 Jul 2008 14:40
Favicon

Re: [ft] freetype+gd with mac fonts?

That probably explains a lot. I'm running this on a linux web server. Is 
there anything I can do to merge the files into something that can be 
read by PHP in linux?

Thanks,
Aaron

Ryan Schmidt wrote:
>
> On Jul 3, 2008, at 14:32, Aaron Winborn wrote:
>
>> i am attempting to create an image in php with gd, using freetype for 
>> fonts. i can get it working with a .ttf font, but have the mac 
>> version of another font that i want to use, and it doesn't load. i 
>> saw the warning at http://us.php.net/imagettftext about .ttf being 
>> automatically appended, but i'm prepending the font with a /path/ 
>> anyway, so it shouldn't matter. just to make sure, i tried the 
>> putenv('GDFONTPATH=' . realpath('.')); trick and also tried manually 
>> renaming the font with a .ttf extension, both to no avail.
>>
>> i don't know mac's file standards, but i did notice there was a font 
>> GothBla in one folder, and ._GothBla in Gotham/__MACOSX, so i've 
>> tried all of this using both files.
>>
>> any ideas of what to try next?
>
> Are you doing this on a Macintosh or something else? I assume you need 
> a Mac to do this.
>
> Mac files can have two forks -- data and resource. Most every other OS 
(Continue reading)

mpsuzuki | 4 Jul 2008 16:18
Picon

Re: [ft] freetype+gd with mac fonts?

Hi,

# I thank Ryan for giving good guidance.

If you're unfamiliar with font file formats on Mac OS,
please note that FreeType2 does not support some very
very legacy bitmap-only fonts designed for MacOS.

If the font you want to use looks like zero-sized and
you can find some "pairing" data, it might be a suitcase
font which all font data is stored in its resource fork
(something like a metadata stream accessed by xattr()).
So, you have to copy its resource fork to another file
with appropriate pathname. Masatake Yamato had ever
implemented a fallback mechanism to lookup a file including
the contents of resource fork.

On non-Macintosh platform, when a file "XXX" exists but cannot
be opened as normal font file, next FreeType2 tries:

	1. open "XXX" as AppleDouble (including both of data/resource)
	2. open "XXX" as AppleSingle (including both of data/resource)
	3. open "._XXX" (UFS syntax on Mac OS X)
	4. open "XXX/..namedfork/rsrc" (new HFS+ syntax on Mac OS X)
	5. open "XXX/rsrc" (legacy HFS syntax on Mac OS X)
	6. open "resource.frk/XXX" (VFAT syntax of Mac OS)
	7. open ".resource/XXX" (CAP syntax to mount AppleShare volume)
	8. open "%XXX" (Linux syntax to mount HFS volume)
	9. open ".AppleDouble/XXX" (netatalk syntax to mount AppleShare volume)

(Continue reading)

George Williams | 4 Jul 2008 21:26
Favicon

Re: [ft] freetype+gd with mac fonts?

On Fri, 2008-07-04 at 05:40, Aaron Winborn wrote:
> That probably explains a lot. I'm running this on a linux web server. Is 
> there anything I can do to merge the files into something that can be 
> read by PHP in linux?
Linux does have support for HFS systems, but the program still needs to
know how to modify the filename to get a resource fork. FreeType can do
that magic.
  Binhex and macbinary are formats that can flatten the mac's multi-fork
structure into a single file -- but again your program needs to know how
to parse these files to get the relevant data out of them.
Pelle Svensson | 4 Jul 2008 15:35
Picon
Favicon

RE: [ft] Rendering of Thai incorrect.

Hi,

I have discovered the problem to be inside the font file.
Something is missing but I don't know what!


> Date: Thu, 3 Jul 2008 23:23:41 +0900
> From: mpsuzuki <at> hiroshima-u.ac.jp
> To: pelle2004 <at> hotmail.com
> CC: freetype <at> nongnu.org
> Subject: Re: [ft] Rendering of Thai incorrect.
>
> Hi,
>
> I'm interested in, please repost with attached png. Do you have any
> successfully rendered example by open source software (e.g. legacy
> firefox or gtk+ application)?
>
> Regards,
> mpsuzuki
>
> Pelle Svensson wrote:
> > Hi,
> >
> > I can't get trueetype to combine glyps correct in Thai, see attached png.
> > In following post they are combined but not fully correct.
> > http://lists.gnu.org/archive/html/freetype/2007-02/msg00008.html
> >
> > In my case they are not combined at all
> >
> > Questions.
> >
> > - Has the combination process a dependence on kerning information in the font file.
> > - If there is no kerning dependence, how is the combination done. Is it inside freetype or is there other info in the font file which is missing in my case.
> > - Do I need to do any special configure of freetype before build. I use version 2.3.7
> >
> > My basic Fedora Core 6 shows the same error.
> > look at: http://thai.tourismthailand.org/about-thailand/
> > In Windows it is correct but in FC6 (Firefox 2.0.15) it's incorrect.
> >
> > _________________________________________________________________
> > Skapa dina egna uttryckssymboler till Messenger!
> > www.windowslive.se/dinegensmiley
> >
> > _______________________________________________
> > Freetype mailing list
> > Freetype <at> nongnu.org
> > http://lists.nongnu.org/mailman/listinfo/freetype
> >
>

Den perfekta mixen av nöjesnyheter & livekonserter! MSN Video
_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype
mikau16 | 5 Jul 2008 21:54
Picon
Favicon

[ft] syntax error in header file: keyword used as a struct field


I have been unable to successfully compile a file that includes freetype.h
because that file uses both 'generic' and 'internal' to name two fields of a
struct. I find it odd that this problem is not showing up for many other
people. I found only two posts on the web complaining about the same thing.
One suggested solution is to use '#define ' to change the generic keyword,
before including the header file, and then using 'undef' immediately after.
But I'm worried that might cause problems to show up later.

Does anyone know how best to handle this issue?
--

-- 
View this message in context: http://www.nabble.com/syntax-error-in-header-file%3A-keyword-used-as-a-struct-field-tp18295697p18295697.html
Sent from the Freetype - User mailing list archive at Nabble.com.

Gmane