Discussion:
ARABIC TEXT , written from right to left , from a Word doc in a bilingual -spanish & arab.
(too old to reply)
A***@adobeforums.com
2005-05-07 10:24:04 UTC
Permalink
I´m dealing to import an arabic text in a bilingual publication: spanish and arabic.
If anyone could help me to do the best.
Thanks.
Ana from Argentina
T***@adobeforums.com
2005-05-07 11:23:32 UTC
Permalink
You need the ID ME edition for that; the standard edition cannot handle RTL-scripts. Look at www.adobeme.com or www.winsoft.fr.

Teus de Jong
S***@adobeforums.com
2005-05-07 11:23:38 UTC
Permalink
You need to be using InDesign ME. www.winsoft.fr/.

InDesign is not designed to handle right-to-left languages.
S***@adobeforums.com
2005-05-07 11:24:16 UTC
Permalink
Congratulations, Teus. We posted at precisely the same minute!
T***@adobeforums.com
2005-05-07 11:40:12 UTC
Permalink
Steve, ain't that a coincidence. Must be because I'm typesetting a bible at the moment. :-)

Teus de Jong
K***@adobeforums.com
2005-05-07 20:27:37 UTC
Permalink
Ana

As Steve and Teus wrote, you need the Middle Eastern edition to get full
right-to-left support. But if you're willing to go the cheap route (and
you've got someone who reads Arabic to proofread for you), you can use a
script to reverse the character order of each line. Olav Kvern posted this a
while back:

----------------------------------------------

Here's a quick-and-dirty JavaScript that will reverse the order of the
characters on each line in the selected story.



//ReverseCharacters.js
//An InDesign CS JavaScript
//
//Reverses the order of the characters in each line of text in the selected
story.
//
var myStory;
if(app.documents.length != 0){
if(app.activeDocument.stories.length != 0){
switch(app.selection[0].constructor.name){
case "TextFrame":
case "Text":
case "InsertionPoint":
myStory = app.selection[0].parentStory;
myReverseCharacters(myStory);
break;
}
}
}
function myReverseCharacters(myStory){
var myLine, myTextStyleRange;
for(var myCounter = myStory.lines.length-1; myCounter >= 0; myCounter --){
myLine = myStory.lines.item(myCounter);
if((myLine.characters.item(-1).contents.charAt(0) == "\r")&&(myLine.length >
1)){
myLine = myLine.characters.itemByRange(0, -2);
}
if(myLine.length > 1){
myLine.contents = myReverseString(myLine.contents);
}
}
}
function myReverseString(myString){
var myReversedString = "";
for (var myCharacterCounter = myString.length-1; myCharacterCounter >=0;
myCharacterCounter --){
myReversedString += myString.charAt(myCharacterCounter);
}
return myReversedString;
}

To use this script, copy it out of the message and into a text editor
(Notepad works). Save the file as plain text with the file extension .js to
the Scripts folder inside the Presets folder inside your InDesign folder (if
the Scripts folder does not already exist, create it). In InDesign, display
the Scripts palette. You should see the script you just saved. Select a text
frame and run the script. InDesign should reverse the order of the
characters in each line of the story containing the text frame.

This script doesn't know about text having multiple formats in a line--it'll
mess those up. But I thought it would demonstrate that you could solve your
problem with scripting.

(Also Note: Some Asian languages are--or can be--read right-to-left.)

Thanks,

Ole
T***@adobeforums.com
2005-05-08 16:15:44 UTC
Permalink
Kenneth,

For Arab this is a recipe for disaster. This would work for very simple Hebrew (and maybe other RTL) texts, but not for Arab: here almost all characters have different forms depending on the position of the character (standalone, beginning, middle, end). Only programs who support RTL-scripts will use the right ones in the right place. Also, cursivity is missing: the characters are not connected in the right way. And what with required ligatures?

So Ana, do not try to do it this way, unless only a few simple Arab words are involved.

Teus de Jong
K***@adobeforums.com
2005-05-09 02:18:52 UTC
Permalink
Teus

I never did anything in Arabic, and my only experience with anything Middle
Eastern was a book of Hebrew poetry I did this way. Since it was poetry, I
didn't have to worry about text wrap. I guess I was imagining text supplied
in Word and just placed in Indesign.

Wouldn't that solve this problem? I mean, the different character forms
would already have been chosen by the author in Word, right? Please tell me
more about cursivity...isn't that more something that would be built into
the font?

I don't want to persuade Ana to use the RTL script...I just want to learn.

Thanks
Ken Benson
T***@adobeforums.com
2005-05-09 11:47:34 UTC
Permalink
Kenneth,

I am not pretending to be the expert on this. But I did typeset Arab-Dutch and Dutch-Arab dictionaries (together 2200 pages). And at the moment I am typesetting a bilingial edition of Ecclesiastes: Hebrew on the left pages, Dutch translation on the right. Here are some points that are relevant:

1. As I said, you can do simple Hebrew by reverting characteers. But only if you don't need diacritics and punctuation for vocalization and cantillation (as used in Biblical Hebrew).

2. A RTL-aware program decides which variant of a letter in Arab must be used at a certain point. It than can use the OT-tables to choose that variant (see 3).

3. Yes, almost all information is in the OpenType fontinfo, but the application must be able to read this info. E.g. special tables are used to choose the right character in Arab: isol, init, medi and fina. So the text in Word (or ID ME) contains the same unicode for a character; the program chooses via OpenType info the right form. It is obvious this cannot be done if the characters are in reverse order. Also, the program decides if a character is RTL or LTR, which is very important for multilingual publication (as in this case Spanish and Arab): the program changes the text direction where needed. (From this it is obvious where this can go wrong: in places where the text changes from one language to another and a character is used which can belong to both.)

4. For cursivity the mark and pos tables are used. This makes it possible to attach characters at predefined points. Also, if Arab text is aligned, the letter spacing is not adjusted: a 'line' (kashida) is used to make the character wider.

5. For characters with a lot of diacritics, lookahead tables are used, e.g. to position diacritics and cantillation marks above and below characters. A program must be able to handle those OT-tables.

Teus de Jong.
K***@adobeforums.com
2005-05-09 12:04:29 UTC
Permalink
Post by T***@adobeforums.com
2. A RTL-aware program decides which variant of a letter in Arab must be
used at a certain point. It than can use the OT-tables to choose that
variant (see 3).


I'm probably just missing something basic, but in this case (where the user
is just taking Arabic text from a Word file) wouldn't the variants already
have been chosen? Isn't Word the "RTL-aware" app here? If you copy a
paragraph of Arabic text from Word and then paste it in Indesign, do you get
something different (beside RTL going to LTR)?

Ken Benson
T***@adobeforums.com
2005-05-09 12:17:26 UTC
Permalink
Ken,

Yes, you are missing something. Word is an RTL-aware app. But this means only that Word chooses the right form of characters in context via the OT-table. The character itself does not change. E.g. in the text is the unicode <0628>, the Arab letter bah. Depending on the context, Word chooses the right form to display and print.

A simple comparison: if you use an OpenType font with proportionally oldstyle figures in it, ID uses oldstyle figures if you choose that option from the OpenType pallette. But this does not mean it changes the character. If you export to RTF, Word will show you just lining figures.

Teus de Jong.
K***@adobeforums.com
2005-05-09 12:46:43 UTC
Permalink
Thanks for coming down to my level, Teus. This makes sense.

Ken Benson
A***@adobeforums.com
2005-05-10 19:19:12 UTC
Permalink
Thanks to all of you,
I´m specially grateful for your interest.
I ´ve got a trial for the Middle East version for 30 days .
I´ve installed the IN DESIGN ME from the website. Everything´s OK till that point.
Again when I want to place the text from the Word.doc. it doesnt recognize one of the fonts in which the document is written.
The fonts are a bundle of True Type with this denomination HQPB5, HQPB1, HQPB5. They are specially used to write the Sacred texts.
Please I need now a little more help to know why the Adobe In Design doesn´t recognize a True Type font or in which way I could place this text, perhaps as an image?
Ana from Argentina
K***@adobeforums.com
2005-05-10 19:30:09 UTC
Permalink
In what way does Indesign "not recognize" this font? Does it give you an
error message? Are you getting the dreaded pink rectangles? Is it missing?
Maybe you just don't have it loaded. In the Word file (in Word), go to
Tools|Options|Compatibility|Font Substitution. Does it show this font as
being substituted?

Ken Benson
T***@adobeforums.com
2005-05-10 20:24:25 UTC
Permalink
And if you have the fonts installed, check if they are OpenType or old TrueType fonts. If they are OpenType, you can use the OpenType options of ID ME, otherwise it will be difficult to get all diacritics and other signs in the right place. I'm sorry, but the name of the fonts suggests they are rather amateur-like. (I have never seen those names before, and there are a lot of 'home made' Arabic fonts on the web, mostly made with more religious zeal than technical font knowledge.)

Teus de Jong
A***@adobeforums.com
2005-05-10 23:15:11 UTC
Permalink
Yes indeed
These fonts are from a program that takes paragraphs from The Holy Qur´an and puts them in Word. They are really old.
I only know that this job is possible because I saw the english-arab version of the book, which was made in Lebanon. We cannot afford to do this for our publishing. Anyway, as I´m not a professional I ask you to see what we could to do with the Adobe Me. So if I could send you the font and the text, perhaps there is another suggestion you could give to me.
Thanks
Ana
J***@adobeforums.com
2005-05-11 01:29:03 UTC
Permalink
I've faced this problem before, but with Farsi, not Arabic. If I recall correctly, I used Pars Negar: I copied text straight out of the application and pasted into ID. Pars Negar, and programs like it, do not rely on Uniscribe or Cooltype or whatever; they insert the correct glyphs (initial/medial/final) and then place it on the clipboard as a LTR string. So, word wrap will be broken, and each line will end with a hard return, but you won't get the problem where every single letter shows up in ID as the isolated form, or where the glyphs are pasted in reverse order.

I've never used ID ME (my nonprofit can't afford it), so I can't tell you how to get your archaic font working in it. However, if it is a really old font, you might not be able to use it in ID, and finding an application like Pars Negar might do the trick. However, you'll probably have to match the characters one by one to the (wierd, archaic, proprietary) Pars Negar encoding in a font definition file. I'm an old pro at manipulating archaic font encodings, so this looks really easy to me; it might not be.

If you decide to forego the ID ME route, and you need an application like the one I described, let me know; I might be able to track one down for you.
A***@adobeforums.com
2005-05-11 16:41:57 UTC
Permalink
I´m receiving all the possibilities you could offer in order to get this job done.
Also I´m working for my community and I cannot afford expensive solutions.
How could I get the "PARS NEGAR"? Let me know, please.

These fonts which I need to copy are enclosed in an old CD of the Sacred Qur´an that is distributed in Egypt.
ANA from Argentina
T***@adobeforums.com
2005-05-11 17:53:44 UTC
Permalink
Ana,

This is the most curious documents and fonts I have ever seen. In the fonts all characters are defined in the private use area. (fontlab even crashed when I loaded one of the fonts.) All characters within a word are left-to-right, but the spaces are right-to-left. Also the paragraph direction must be right-to-left.

Indesign CS ME will not place the files correctly. However, I have found a workaround for you, but it is quite a hassle.

1. Place the document in the normal (English) Indesign. You should see Arabic characters, but in the wrong order. Save this Indesign Document.

2. Load the document in the ME-version of Indesign.

3. Select the Arabic text.

4. Replace the spaces in the selection by right to left spaces.

5. In the Paragraph palette set the paragraph with Arabic text to Right to left direction: the words are reversed now, and the text can be read.

6. Right align the paragraph.

This is all I can do.

Teus de Jong.
A***@adobeforums.com
2005-05-11 17:59:10 UTC
Permalink
Ken
I´m just seeing your reply and your answer.
There were so many messages posted all together that I ´m just seeing yours right now.
First of all.
1 I checked the Word file and the option : font substitution. It says that all the fonts in the document are available, no need to substitute fonts.

2- There are indeed some pink rectangles in the InDesign document but mixed with also other strange characters.What evidences the " dreaded pink rectangles" ?

The problem is only with those paragraph written in that special font , the "HQPB4.ttf",HQPB1.ttf.These are passages of the Sacred Qur´an and we are asked to maintain the same font, not to substitute it.

The rest of the document is written in Goudy and Traditional Arabic and these paragraphs show everything in order.
K***@adobeforums.com
2005-05-11 18:49:04 UTC
Permalink
It sounds like Teus has got you covered, but I was curious to know in what
way does Indesign not recognize the font. Something is happening, but you
haven't told us what it is. Do you get an error message? Font missing,
maybe?

The pink crossed rectangles are characters not available in the font being
used, something that would be consistent with a missing font. IOW, the font
is used in Word, and Unicode characters are formatted with that font. You
import the document into Indesign, which does not show that font as being
available. Since Indesign does not know the font is available, it
substitutes another font, but that other font has empty Unicode positions
that are being referenced by the "missing" font. The empty positions show up
as pink crossed rectangles.

Is this what's happening?

Ken Benson
T***@adobeforums.com
2005-05-11 19:06:46 UTC
Permalink
Ken,

I saw the same in ID ME CS: characters from this fonts are not imported correctly (no pink tringles, just plain wrong). Maybe this is beacause they are in such a strange place (the F000-F100 area in the unicode table) and ID ME tries to match them with some proprietry font they do support. However, I'll keep an eye on this in version CS2: this should not happen.

Teus

Loading...