Closed Bug 80577 Opened 21 years ago Closed 20 years ago

Order of words reversed in Hebrew site on Mac


(Core :: Layout: Text and Fonts, defect)

Mac System 8.5
Not set





(Reporter: smontagu, Assigned: ftang)




(Keywords: intl)


(6 files)

I was sent the attached screen shots by

Each word is displayed correctly, but the order of the words is reversed. 
For example the Hebrew equivalent of WHAT'S NEW, which should be rendered 


is rendered

The first thing to try in fixing this is to port the IBMBIDI changes in 
gfx/src/windows/nsRenderingContextWin.cpp to 

simon- Please attach nwe screen shot in GIF or JPEG. I somehow cannot view tiff. 
Also, could you attach the CORRECT screen shot here so I can compare if I write 
some new code. 
reassing to ftang
Assignee: nhotta → ftang
mark it as assigned
Attaching new screenshots. For testing I suggest you use the Hebrew testpage 
that Mimi prepared for Andreas, which has text in Hebrew with images of the 
expected rendering.
I am confsued. Which screen shots are right, which are wrong ?
  attachment 34529 [details] -- walla
  attachment 34530 [details] -- msn

  attachment 34531 [details] -- walla

I didn't attach a RIGHT screenshot of, because the content of the 
site keeps changing.
no time to work on mac arabic/hewbrew . move to future.
Target Milestone: --- → Future
Changing QA contact to

Changing component to "Bidi..." and adding intl keyword.
Component: Internationalization → BiDi Hebrew & Arabic
Keywords: intl
QA Contact: andreasb → giladehven
*** Bug 94633 has been marked as a duplicate of this bug. ***
*** Bug 93665 has been marked as a duplicate of this bug. ***
*** Bug 81943 has been marked as a duplicate of this bug. ***
*** Bug 81020 has been marked as a duplicate of this bug. ***
From dupe:
------- Additional Comments From Simon Montagu 2001-05-18 11:52 -------
What I was trying to say was that the Hebrew in your screenshot has been
ordered with base direction left-to-right instead of right-to-left. In
Windows when mRightToLeftText is true in nsRenderingContextWin.cpp we call
SetTextAlign with TA_RTLREADING, which sets the base direction for the
device context's native reordering to right-to-left. You have to find the
equivalent API for Mac and call it.
------- Additional Comments From Simon Montagu 2001-05-21 15:51 -------
What I meant was the base (paragraph) direction used when the platform invokes 
its own implementation of the Bidi algorithm. This is important, because it 
determines whether a logical text like


is rendered

TGHIRYPOC 2000 TFOSORCIM   <--- with LTR base direction


TFOSORCIM 2000 THGIRYPOC   <--- with RTL base direction

In Windows this is set by calling SetTextAlign with the flag TA_RTLREADING (by 
the way the comment in the source of nsRenderingContextWin.cpp is not 
synchronized with the code -- I'll file a separate bug on that).
OS: other → Mac System 8.5
Blocks: 95860
*** Bug 96305 has been marked as a duplicate of this bug. ***
Mass-move all BiDi Hebrew and Arabic qa to me, 
Thank you Gilad for your service to this component, and best of luck to you 
in the future.

QA Contact: giladehven → zach
*** Bug 108331 has been marked as a duplicate of this bug. ***
On system 10, I see this in some places but not others. not sure if this is 
the same bug? adding attachment
Blocks: 115710
probably could be fixed by bug 116976 and bug 116982
Depends on: 116976, 116982
Target Milestone: Future → mozilla0.9.8
I believe the following three patch should fix most mac os hewbrew problem

big endian issue in nsFrame.cpp
see latest patch in

big endian issue in nsBidiImp.cpp

turn off hebrew reordering and do not report hint on mac gfx
this should be fixed right now. If you see some speical case which are not
right. Please file seperate bug for the speical case and assign to smontagu first. 
Closed: 20 years ago
Resolution: --- → FIXED
Blocks: 104060
No longer blocks: 104060
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.