Re: I can't enable smartquotes in my AW for some reason


Subject: Re: I can't enable smartquotes in my AW for some reason
From: WJCarpenter (bill-abisource@carpenter.ORG)
Date: Wed Nov 15 2000 - 12:41:10 CST


wjc> For debugging SmartQuotes stuff, I recommend changing the
wjc> RemapGlyphsTable to characters you know you have. For example,
wjc> this setting uses single and double angle brackets:
wjc>
wjc> RemapGlyphsTable="‘<’>“«”»"

vlad> Since I use LANG=en, no non-english fonts are loaded, so I
vlad> should get the same result as others get. But I don't see any
vlad> substitution of plain quotes with nice quotes at all.
 
Sorry for the confusion. I should have been more explicit. With
LOCALE=en and the default fonts shipped with AbiWord on Unix, you get
deceptive results about SmartQuotes. Those fonts don't have the
appropriate glyphs for SmartQuotes, so RemapGlyphs maps them back to
the straight quote versions. That's why I recommend a custom setting
for RemapGlyphsTable on Unix (and other platforms if there is any
doubt) when debugging SmartQuote-related stuff.

vlad> I've attached a trace log of session in which I typed "Abccd"
vlad> <CR> and smartquotes were not engaged (though they are enabled
vlad> obviously). Could anybody see and tell whether it's OK? Also,
vlad> could anyone for whom smartquotes work attach the log of the
vlad> same session with their AW where smartquotes really work?

From the debug output, it looks like the right stuff is happening, at
least in the SmartQuotes engine. Here are some comments on selected
lines:

Reading the preferences file values:

  DEBUG: DEFAULT RemapGlyphsMasterSwitch |1|1|
  DEBUG: DEFAULT RemapGlyphsNoMatterWhat |0|0|
  DEBUG: DEFAULT RemapGlyphsDefault |&#x00B0;|°|
  DEBUG: DEFAULT RemapGlyphsTable |&#x2018;`&#x2019;'&#x201c;&quot;&#x201d;&quot;|‘`’'“"”"|
  DEBUG: DEFAULT SmartQuotesEnable |1|1|

The following is from the RemapGlyphs code showing the internal table
it uses. It matches the stuff from the RemapGlyphsTable preference
item above:

  DEBUG: GR_Graphics::remapGlyph() refreshing cached values
  DEBUG: RemapGlyphsTable[0] 0x2018 -> 0x0060
  DEBUG: RemapGlyphsTable[1] 0x2019 -> 0x0027
  DEBUG: RemapGlyphsTable[2] 0x201c -> 0x0022
  DEBUG: RemapGlyphsTable[3] 0x201d -> 0x0022

Here is where you typed the double quote:

  DEBUG: fl_BlockLayout::doclistener_insertSpan(), len=1, c=|"|

Here is where the SmartQuote engine considers the double quote:

  DEBUG: FL_DocLayout::considerSmartQuoteCandidateAt(8406b30, 0) |"|

Here is says it decided to replace it with a U+201c, a SmartQuote glyph:

  DEBUG: before 6, after 11, replace 201c

So, the right stuff is happening in the SmartQuote engine.
Undoubtedly, the RemapGlyphs stuff is mapping it back to straight
quotes, but I don't see that in the debug log (I don't recall if
RemapGlyphs still has its UT_DEBUGMSG stuff enabled).

-- 
bill@carpenter.ORG (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3



This archive was generated by hypermail 2b25 : Wed Nov 15 2000 - 12:37:24 CST