[Typo3-dev] RE: Typo3-dev Digest, Vol 19, Issue 5

Mike Meir mike at gateseven.co.uk
Sat Apr 2 13:19:29 CEST 2005


Dear Ahmed

If you are using Freetype 2, you need to be aware that it does not contain any code to process open type fonts. AFAIK, it is "simply" a glyph rasteriser. There is opentype support in packages like Pango, which themseves rely on Freetype 2. 

You might find that replacing Freetype 2 with Freetype 1 (which does contain code to manage opentype fonts) would solve the problem, but there again, it might not ...

All the contextual forms for Arabic are encoded in Unicode, in the Arabic Extended-A block. In a font such as Times New Roman included with WinXP thse encodings are used, so the glyphs can be addressed directly, as well as though opentype shaping.

Assuming you don't want your menus to include vowel signs, it should not be too difficult to extend the code you wrote to reverse the characters also to shape the text.

I'm happy to offer any assistance I can: I've developed a number of shaping engines in the past, but I'm no php guru.

Best Wishes


Mike Meir
Director, Gate Seven 

-----Original Message-----

Message: 6
Date: Fri, 01 Apr 2005 19:32:44 +0200
From: Jes?s H0rmigo <cyNOSPAM at ya.com>
Subject: Re: [Typo3-dev] GIFBUILDER Right-To-Left capability on TEXT
	properties
To: typo3-dev at lists.netfielders.de
Message-ID:
	<mailman.1.1112376769.11179.typo3-dev at lists.netfielders.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dear Joey,

Thank you a lot for the hint. This did the re-order of the fonts as you 
expected. Now they are on the correct possition.

This function is as well available on example_callfunction.php inside 
the directory media/scripts so I picked it from there.

The only issue remaining is that for example in Arabic (I am not arabic 
and can't read Arabic as well) the fonts layout change depending on 
which is the font they have near to it. I guess an Arabic reader would 
be able now to understand that, but the connection between fonts is not 
properly done.

I guess for example in HEBREW there is not connection between the fonts 
and they are just displayed RTL, but Arabic is a bit different.

Now I am looking if this can be done by IM (I guess that no as I saw in 
a few forums), and if not then I will check if there is any function 
that can check which are the fonts near the other and re-assing the font 
to connect properly to the next one.

Thank you a lot for your help. Once I have all this information compiled 
I will post a FAQ for this topic.

Any help will be very welcome.

Thank you a lot,

Jesús H.


JoH wrote:
>>I've asked in the main english list about Right-To-Left capabilities
>>and if it possible to do RTL text with GIFBUILDER (i.e.: Arabic).
>>
>>Nobody has replied and I guess it is because it is not possible by
>>now. I've checked intensively TSRef and other sources but couldn't
>>find anything similar that could help me to archieve this.
> 
> 
> If I got you right, the letters are displayed in the correct order but from
> left to right instead of right to left.
> Since all GIFBUILDER objects have the same properties the following will
> apply to GMENUs as well:
> 
> If you have something like this
> 
> 10 = TEXT
> 10.text.field = title
> 
> you can use stdWrap properties on TEXT.text like this:
> 
> Write a small PHP-function to flip the text direction.
> Save it in a file text_rearranger.php (usually in media/scripts/).
> 
> includeLibs.something = media/scripts/text_rearranger.php
> 
> 10 = TEXT
> 10.text.field = title
> 10.text.preUserFunc = right_to_left_function_name
> 
> Then your function will rearrange the text before it is used in the
> GIFBUILDER.
> 
> Joey
> 










More information about the TYPO3-dev mailing list