Issue 4008 - ? appears insted of "
Summary: ? appears insted of "
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: 641
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: ulf.stroehler
QA Contact: issues@sw
URL:
Keywords:
: 2816 4221 4482 5577 15623 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-04-13 10:45 UTC by mfellinger
Modified: 2004-06-08 18:15 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample file and screenshots showing smart quote oddities (38.10 KB, application/octet-stream)
2003-06-24 14:31 UTC, jdeisenberg
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mfellinger 2002-04-13 10:45:51 UTC
I can see the issue 1234 again in the 641D build on SuSE Linux 6.4 with X-Free
4.0.3 and KDE 2.1.2. Pressing SHIFT+2 on a german keyboard gives ? insted of ".
However, "Insert Special Character" gives the correct result, and the keyboard
works in any other application (mozilla, xemacs, kwrite).
Comment 1 t8m 2002-04-16 16:25:22 UTC
You have probably enabled 'replace standard quotes with custom quotes'
and you have set a font without them (non Truetype font).
Comment 2 stefan.baltzer 2002-05-06 13:11:00 UTC
Reassigned to Ulf.
Comment 3 ulf.stroehler 2002-05-06 14:05:59 UTC
The problem is the used font, which is most probably a (non-scalable)
fixed X-Font (helvetica, times). This font resides typically as a 13pt
fixed font. Therefor there are no glyphs available in standard size
12pt. When using this font e.g. in the Writer most probably it will be
replaced by a printer font with the same name, so that one can access
glyphs in different sizes than only 13pt. This replacement seems to be
circumvented when it comes to the autocorrection of double quotes to
custom quotes. 
As a first workaround you can either disable custom quotes in
Tools->AutoCorrect/AutoFormat: Custom Quotes or format your text to
the font size 13pt. In the latter case you should see correct custom
quotes.
US->HDU: I talked to the writer guys and they pointed me to vcl. Can
you at least confirm my findings and is there a solution you can think
of for this problem? 
Comment 4 hdu@apache.org 2002-05-06 14:38:04 UTC
 HDU->US: Glyph fallback to another font that has the requested glyph  
  works when our big Unicode font "Andale Sans UI" is available.  
  Unfortunately this font cannot be shipped with OOo. For many  
  fonts (e.g. locally installed ttf fonts) applications can reliably test  
  if a glyph for a character exists by using the  
  OutputDevice::GetFontCharmap() API and avoid a non-displayable  
  glyph. I think this may require quite a bit of effort though.  
  
Comment 5 ulf.stroehler 2002-05-06 15:36:24 UTC
That sounds like an expensive solution. But probably won't solve the
problem for fixed fonts, does it? Is there really no less expensive
way especially for handling the custom quotes in fixed fonts?
Shouldn't also double quotes be resident in the printer fonts? Or is
my assumption wrong? The more I think about this task, I arrive at the
conclusion that it belongs to the Writer guys.
US->HDU: If you agree, pls reassign to AMA.
Comment 6 hdu@apache.org 2002-05-06 15:54:17 UTC
> Shouldn't also double quotes be resident in the printer fonts?  
  
Yes the printer fonts are usually well equipped. This doesn't help  
to display them. 
 
By the way: What font exactly was selected? Is this an X11 font? 
 
Comment 7 ulf.stroehler 2002-05-10 10:28:37 UTC
Marcus, this question is for you:
> By the way: What font exactly was selected? Is this an X11 font? 
 
US->HDU: I'm pretty sure it is an X11 font, maybe Times (or the like),
as it is the standard document font in the OOWriter. BTW I can easily
reproduce this behaviour with Times, Helvetica as X11 fonts.
Comment 8 mfellinger 2002-05-10 21:02:27 UTC
The font used was Times. How can I tell if it is an X11 font?
Comment 9 hdu@apache.org 2002-05-14 13:47:22 UTC
It's not easy to tell if it's an X11 font, because the font subsystem 
tries to be very smart and hide all these details. But there are 
some indirect methods that should help with this: 
 
Use Insert->SpecialCharacter and select the Times font. 
If the "scrollthumb" on the right is very small compared to the 
size of the scrollbar and there are a lot of "empty characters" 
then it is an X11 font. 
 
I'm pretty sure that your font doesn't have characters at the 
unicode positions 0x201C, 0x201D and 0x201e which 
are the unicode positions for the smart quotes. Please check 
if this is the case. 
  
Comment 10 mfellinger 2002-05-15 00:28:51 UTC
Yeah, the scrollthumb is small and there are lots of empty character
positions. And positions 0x201C, 0x201D and 0x201E are empty. Just
confirmed it with 1.0
Comment 11 hdu@apache.org 2002-05-15 11:54:34 UTC
Ok, that explains it. The font you are using doesn't have the 
nice looking quotes. There are two solutions: 
- install and/or use a font with these quotes 
- disable them in Tools->Autocorrect->CustomQuotes 
Comment 12 hdu@apache.org 2002-05-16 16:56:35 UTC
So now the problem is understood and there is not much to  
do except maybe:  
HDU->AMA: should we default to disable smart quotes in OOo?  
  
Comment 13 t8m 2002-05-17 07:54:40 UTC
Please no. If you have properly installed Truetype fonts with the
smart quotes, it will work just fine.
Note that it is dependent on the issue 4366, because if you have
broken fontcache (as when you start the OOo 1.0 second time and you
didn't workarounded that bug), you'll see all fonts including
Truetypes as X fonts -> without smart quotes.
I think fixing that issue and release note would be sufficient.
Comment 14 t8m 2002-05-17 07:57:13 UTC
Or even better you could try to detect that the font hasn't smart
quotes and then switch them automatically off for newly entered
characters.
Or even even better :-) you could have reverse smart quotes mapping
which would display them just as the default ascii quotes. But it
could be confusing to user.
Comment 15 caolanm 2002-05-17 09:24:11 UTC
Reverse mapping smart quotes and hyphens as normal quotes and - when
they're not available sounds better than turning off smart quotes for
newly typed text, because imported documents already containing the
troublesome characters would still be displayed badly, e.g. word
import is blamed for importing those characters incorrectly...
http://www.linuxmuse.com/articles.php?action=section&article=17&num=3

But I don't know if reverse mapping would be really workable...
Comment 16 caolanm 2002-05-17 12:22:43 UTC
*** Issue 2816 has been marked as a duplicate of this issue. ***
Comment 17 oldfield 2002-05-21 02:43:22 UTC
 HDU->US: Glyph fallback to another font that has the requested glyph  
  works when our big Unicode font "Andale Sans UI" is available.  
  Unfortunately this font cannot be shipped with OOo. For many  
  fonts (e.g. locally installed ttf fonts) applications can reliably
test  
  if a glyph for a character exists by using the  
  OutputDevice::GetFontCharmap() API and avoid a non-displayable  
  glyph. I think this may require quite a bit of effort though.  
  
--

This is rather important for the Chinese version of OOo.  Here
we have a lot of "squares" when loading most Chinese documents
since glyph for most Chinese character is absent if the font of
the character has been set to an non-existing font on the "reader"
machine (but exist on the "creator" machine).
Comment 18 ooo 2002-05-27 10:20:15 UTC
*** Issue 4221 has been marked as a duplicate of this issue. ***
Comment 19 ooo 2002-05-27 10:21:44 UTC
*** Issue 4482 has been marked as a duplicate of this issue. ***
Comment 20 andreas.martens 2002-06-03 13:32:00 UTC
Hmm, I've to look for a practicable solution.
Comment 21 caolanm 2002-06-05 16:11:43 UTC
*** Issue 5577 has been marked as a duplicate of this issue. ***
Comment 22 caolanm 2002-06-21 09:40:17 UTC
*** Issue 5577 has been marked as a duplicate of this issue. ***
Comment 23 rblackeagle 2002-07-30 15:10:20 UTC
I note a possible fix (especially as I had the TTF fonts installed and still got this error, 
is to run spadmin and click on "Properties" for the printer (which is a strange place) 
and "Substitution Fonts" and remove things like "Times New Roman -> Times" and 
any other substitution for a font you actually have.
Comment 24 iandall 2002-07-31 05:43:11 UTC
Removing the substitute fonts doesn't fix anything for me. If issue
4482 really is a duplicate of this one, then the bug appeared sometime
between 641 (the suffix letter doesn't seem to be recorded anywhere)
and 1.0. Surely that narrows down the problem somewhat?
Comment 25 iandall 2002-07-31 06:28:16 UTC
Here is maybe a hint. If I do:
  showfont -server paprika:7100 -start 8211 -end 8211 -fn '*times new
roman*' 

I get 
[...]
FONT    -monotype-times new roman-bold-i-normal--12-120-75-75-p-54-ascii-0
[...]
char #8211 0x2013
Left: 0      Right: 0      Ascent: 0      Descent: 0      Width: 0
Nonexistent character

But if I do:
showfont -server paprika:7100 -start 8211 -end 8211 -fn '*times new
roman*iso*'
I get:
[...]
FONT    -monotype-times new
roman-bold-i-normal--12-120-75-75-p-54-iso8859-1
[...]
char #8211 0x2013
Left: 0      Right: 7      Ascent: 4      Descent: -3     Width: 7
#######

Which is what I expect. So, maybe the registry is not set
appropriately, or is getting lost at some point.
Comment 26 ooo 2003-01-08 14:16:31 UTC
*** Issue 4221 has been marked as a duplicate of this issue. ***
Comment 27 ooo 2003-01-08 14:19:00 UTC
*** Issue 4482 has been marked as a duplicate of this issue. ***
Comment 28 jdeisenberg 2003-06-24 14:31:52 UTC
Created attachment 7107 [details]
Sample file and screenshots showing smart quote oddities
Comment 29 jdeisenberg 2003-06-24 14:34:05 UTC
This bug appears to have returned in OpenOffice.org 1.1 Beta 2.
The attachment shows a sample file, with a screenshot from an earlier
version, and two screenshots taken a few days apart in 1.1 Beta.  The
first shows the ? instead of quotes; the second shows the quotes, but
misplaced. Note: I am running SuSE Linux 8.0, and have not changed any
fonts or installed/uninstalled any packages in between the two beta
screenshots.
Comment 30 ulf.stroehler 2003-07-03 11:05:16 UTC
The issue of "Custom Quotes" has experienced a change by the
introduction of a new feature in basis technology, namely
GlyphFallback (therefor changing the Component to 'gsl').
GlyphFallback roughly spoken substitutes a missing glyph in a font, by
the same glyph taken from a different font. That's what is happening here.
I'd like to emphasize again, that the main problem of "Custom Quotes"
on Linux are insufficient, because not scalable default fonts (Times
and Helvetica), which don't have the glyphs in the desired font size.
Thus the proper solution would be to have good fonts and make them the
default in OOo. 
This is one of the motivations to deliver fine TrueType fonts with OOo
in one of the next releases (don't ask me when). So stay tuned.

Back to GlyphFallback:
Obviously the font from which the glyphs are taken has a horizontal
spacing problem and/or a different font for the substitution should be
considered. 
Comment 31 ulf.stroehler 2003-07-03 11:07:51 UTC
*** Issue 15623 has been marked as a duplicate of this issue. ***
Comment 32 hdu@apache.org 2003-07-08 09:35:39 UTC
HDU->US: I overlooked this issue... you are right, if there are 
fallback fonts then glyph fallback takes care of this problem. 
Please verify in a recent build and close this task. 
Comment 33 stefan.baltzer 2003-09-08 17:50:46 UTC
SBA: No reaction for more than two months. Set to "Resolved Worksforme".
Comment 34 ulf.stroehler 2004-06-08 18:15:58 UTC
Smartquotes issue is solved. Verified in OOo 1.1.2 RC3 with the bugdoc
jdeisenberg provided. Thanks.
Closing