Hebrew font problem

Everything related to our flagship word processor.
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Hebrew font problem

Post by martin »

It probably would be a good idea to apply the Hebrew language attribute to any text that is actually Hebrew- that way he can have other features (eg: spellchecking and keyboard layout) taken care of automatically. However, that shouldn't be necessary for the text to lay out as RTL. Just using the proper Unicode characters should make the layout engine respect the direction of characters in his text.
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Hebrew font problem

Post by martin »

Oh, and as to how to add the Hebrew language attribute...
Ruchama wrote:edit: I think I have the answer - he should add "lang1037" in the macro to mark the hebrew text. right?
This is not necessary. The macros do not work with raw RTF, where a language code would be necessary. Looking at the template macro, just add an extra line after the font is removed, eg:

Code: Select all

Menu ':Format:Font:Remove Font Attribute'
Menu ':Format:Language:Hebrew'
William
Posts: 9
Joined: 2009-06-07 02:50:19

Re: Hebrew font problem

Post by William »

What you will want to do is build up a macro that knows what Hebrew characters should be displayed for what latin characters.
This is exactly what I have done in my program, which deal with raw RTF data. If the transformation can be done with Nisus macro, that would be great. I've seen the macro template, my question is how do I select all text with HebraicaII font attribute? In the template, there is a line Find '.+', 'Eua'. Since the comment says "Find all text marked in the old font", I guess this is to find text with specific font. Am I right? If so, what should I do for my case.
Just using the proper Unicode characters should make the layout engine respect the direction of characters in his text.
This is right, but the problem is the vowel points' shifting when I use Ezra SIL or SBL hebrew font. Ruchama suggests New Peninim MT, this is ok for vowel points, but the accent marker still have problem. I know this is not Nisus' problem but Apple's.

Now you know what I am concerned, if I choose latin code and use HebraicaII font, the problem is the direction when line wrap. Or if I choose Unicode, though the previous problem will be solve by system, the other problem is I can't find a suitable unicode font. Either way, I need to do conversion whether change the latin to unicode or the latin characters' sequence. And this is for me the simply part for this issue.

Do you have any suggestion? In the very beginning, I thought the "Directionality Marker" can solve the problem. But, till now, I even don't know what "Directionality Marker" will do. I've mentioned that I can see the symbol of the marker, but I did not see any change after the marker was inserted.
Ruchama
Posts: 213
Joined: 2006-08-19 18:35:27

Re: Hebrew font problem

Post by Ruchama »

if you perform "find" and use the wildcard "any character" then select it (in the find window) and apply attribute like a font, the found text will be the attributed text.
as for the accent markers, there is no solution really but to use Mellel. I would not recommend to you to continue using the old fonts. at some point you will need to exchange the files with someone and this will be impossible. move to unicode and use the software that deals with hebrew the best way. until apple will put the effort to include us back in the "desired" population... :(
William
Posts: 9
Joined: 2009-06-07 02:50:19

Re: Hebrew font problem

Post by William »

Thank you, Ruchama, you are right, the Melle is good for Hebrew. I just want to try if I can revers the latin characters with HebraicaII font. Can someone tell me, how to use directionality maker when I type "This is a reversed sentence" and get the result "This is sentence reversed a" ? Where to insert to? Insert which one? I've tried many combinations, but never success. :(
Ruchama
Posts: 213
Joined: 2006-08-19 18:35:27

Re: Hebrew font problem

Post by Ruchama »

First, I would like to redirect you to a macro that was written some weeks ago by Mark, where reverse text is performed. it is ready for download in this thread:
http://www.nisus.com/forum/viewtopic.ph ... ext#p15137

Second, Following what Martin said, I used this http://ocp.acadiau.ca/kpenner/convert.htm site to convert your text to unicode. I think they have some bugs in the transformation as some Nikud characters are wrongly transformed. but nevertheless, when I pasted the converted text back into your file, the direction was ok, with no hidden characters whatsoever. I enclose here a screen snapshot of your file after I have transformed part of it. ignore the mistakes (they are not mine :) ) just look at the direction.
Attachments
Picture 5.png
Picture 5.png (57.08 KiB) Viewed 8718 times
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: Hebrew font problem

Post by Kino »

William wrote:I've seen the macro template, my question is how do I select all text with HebraicaII font attribute? In the template, there is a line Find '.+', 'Eua'. Since the comment says "Find all text marked in the old font", I guess this is to find text with specific font. Am I right? If so, what should I do for my case.
1. Select the whole Find '.+', 'Eua'
2. Apply Format:Remove Attributes and Styles on it;
3. Apply Format:Font:HebraicaII on it.
Can someone tell me, how to use directionality maker when I type "This is a reversed sentence" and get the result "This is sentence reversed a" ?
What you want to mean is not clear to me. Enclose the whole sentence between U+202E and U+202C if you want to make it display as "ecnetnes desrever a si sihT".

Note that directional marks inserted by menu commands under Insert:Directionality Marker are so-to-say weak ones for controling the directionality of characters having neutral directionality. To change the directionality of LTR characters to RTL, you need U+202E.
See http://www.unicode.org/reports/tr9/.
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Hebrew font problem

Post by martin »

William wrote:I've seen the macro template, my question is how do I select all text with HebraicaII font attribute? In the template, there is a line Find '.+', 'Eua'. Since the comment says "Find all text marked in the old font", I guess this is to find text with specific font. Am I right? If so, what should I do for my case.
You are right. As Kino outlined above you want to select that "Find" line and apply your HebraicaII font.
This is right, but the problem is the vowel points' shifting when I use Ezra SIL or SBL hebrew font. Ruchama suggests New Peninim MT, this is ok for vowel points, but the accent marker still have problem. I know this is not Nisus' problem but Apple's.
Yes, this is unfortunately not something Nisus can solve, not even if you insert directionality markers. Apple's placement of Hebrew points/accents is simply incorrect for some fonts. Hopefully you can find a font that meets your needs.
William wrote:Now you know what I am concerned, if I choose latin code and use HebraicaII font, the problem is the direction when line wrap. Or if I choose Unicode, though the previous problem will be solve by system, the other problem is I can't find a suitable unicode font. Either way, I need to do conversion whether change the latin to unicode or the latin characters' sequence.
I really would recommend against using these pre-Unicode fonts with latin characters that require manual overrides of the direction and/or character order. They aren't going to translate well to other applications, and as you've seen, they cause problems when the font is unavailable (displaying as garbage instead of Hebrew).
William
Posts: 9
Joined: 2009-06-07 02:50:19

Re: Hebrew font problem

Post by William »

Thanks for all of your help. I found a solution for the font issue. It's very easy, just insert U+202E and U+202C to enclose the hebrew phrase, than it will be reversed, also the word order is correct when line wrap. However, the HebraicaII have 2 glyphs which latin character is '[' and ']'. This will have some problem, because in the RTL phrase, they exchanged. While I change them back, I got extra space for each '[', this will separate a single hebrew word to 2 or 3 words depends on how many '[' char the word have. So my solution is to use Yehudit font, Accordance's hebrew font, '[' and ']' are used to represent them self, not other alphabet. Here is the screenshot.
圖片 1.png
圖片 1.png (53.05 KiB) Viewed 8645 times
Post Reply