Red Hat Bugzilla – Bug 215905
Positioning of double quotes ("") around Hindi (& maybe other languages) characters is wrong (hi_IN)
Last modified: 2007-11-30 17:11:49 EST
Description of problem:
Positioning of double quotes ("") around Hindi characters is wrong (hi_IN).
Please check the screenshot. You'll see that in oo.o, the second quote gets
dislodged from the original height.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Open oowriter, select Lohit-hindi from fonts list & type "" (doublequotes)
2. Activate scim (hi-phonetic) & move the cursor back between the double quotes
3. type "k" (क) between those double quotes & watch the quotes move from their
As in screenshot
Created attachment 141357 [details]
Problem description and its counterpart in gedit
These are typographical quotes, not ascii quotes. To get ascii quotes, use
tools->autocorrect and disable custom quotes and type "" and stick the letter in
So we're looking at typographical (smart) quote marks here. So I suspect from
the screenshot in this case that the closing quote is in a different font that
the opening quote. This is a fairly complicated area. You have the ascii quote,
0x201C typographical quote open, and 0x201D typographical quote close. So the
various issues are
a) what language will the quote be considered, probably depends somewhat on context
b) what font is used for the language that the quote is in
c) what unicode code point the quote may have been autocorrected into.
So, back with "replace quotes" mode enabled, if you select the first quote what
does the fontbox say the font is, and also for the second quote what does the
fontbox say. Then select the whole set of three characters and what is the CTL
font and the western font in format->character ?
And finally what was the locale that oowriter was launched in ? I suspect that
from the screenshot that the first quote is in Lohit Hindi and the last quote is
in DejaVu. And the question is if anything can/should actually be done about it.
(In reply to comment #2)
> So, back with "replace quotes" mode enabled, if you select the first quote what
> does the fontbox say the font is,
and also for the second quote what does the
> fontbox say.
DejaVu LGC Sans
Then select the whole set of three characters and what is the CTL
> font and the western font in format->character ?
Please check the attached screenshot as I couldnt find anything like CTL in the
format->character dialog box.
> And finally what was the locale that oowriter was launched in ?
I suspect that
> from the screenshot that the first quote is in Lohit Hindi and the last quote is
> in DejaVu. And the question is if anything can/should actually be done about it.
A finding - If you look at the screenshot, you'll find that when I wrote a
series of combinations ("क"), the quotes were well aligned in the other two
Also, if I select (क) from any of the other two combinations (from the series
depicted in the screenshot), the fontbox says that its "DejaVu LGC Sans" font.
Created attachment 141364 [details]
Series of "क"
tools->options->language settings->languages enable CTL and asian. You're not
seeing the full story when mixing CTL script and western script if the display
mode is just to show the western font settings (which is what happens when the
locale is en_US so as to not confuse westerners :-))
Okay, I enabled the CTL & asian check boxes, restarted oowriter, but i'm getting
the same results.
yes, that won't change any behaviour except to show CTL/Asian info e.g. in
format->character. But now you should be able to report the results from
selecting the sequence of quote character quote and use format->character and
see the fonts being used for Western and CTL characters to see if the CTL font
is set to Deva Vu
Anyway, I know what the problem is, but there's nothing that can be done about it.
a) There is a font setting for CJK text, and one for CTL text and one for
b) Some symbols like quotes are "weak characters" which can belong to more than
c) If the CTL font and the Western font do not match and a quote is used, then
the script of the preceding text is taken to determine what font to use for the
So if launched under en_US then the default script and font is the Western one,
so the first quote with no preceding text is put in the western font, typing a
hindi letter uses the CTL font, another quote is then appended. The preceding
character is CTL and so the next quote is taken from the CTL font, and so the
quotes don't match eachother.
If OOo is launched in a hi_IN locale then the fonts are all set to "Lohit Hindi"
and the problem of mismatching fonts used for the quotes doesn't arise as the
fonts match eachother for CTL and Western.
To really complicate the mix, there is a auto-correct substitution which occurs
to replace simple " quotes with their typographical start and end quotes for
western text. And that also considers the script in use as the indicator as to
whether to use a start or end quote as the replacement or if to do no
replacement at atll. This will default to the base locale language when it's the
first quote used and there's no hint available as to what script is in use, and
will swap to the other language when there is enough context.
a) In a OOo launched in the hi_IN locale typing "ककककक" will give matching
quotes non-replaced, appending foo "english" will show typographical quotes
around the english text, but they will match. Adding कक"कक" will then revert to
non-typographic quotes, but they will match eachother because the script कक"कक"
will then revert to non-typographic quotes. And as the font is all Lohit Hindi
for western and CTL the same font is used for all text, even when in some
western-text influenced conditions typographical quotes have been substituted
b) In a OOo launched in the en_US locale typing "ककककक" will give mismatching
quotes because the first one was converted to a typographical quote from the
English font as text was assumed to be western by default, while the second one
will be an unconverted simple quote in Lohit Hindi as the influencing text is
CTL. Appending foo "english" will show typographical quotes around the english
text, but they will match. Adding कक"कक" will then revert to non-typographic
quotes, but they will match eachother because the script range can be considered
all CTL and the Lohit Hindi is used for the range.