{{tag>category:"OpenInsight 32-Bit" author:"Oystein Reigem" author:"[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]" author:"The Sprezzatura Group" author:"Pat McNerthney" author:"Donald Wakefield"}}
[[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]]
==== Problem with 8-bit characters in edit box. Both 16- and 32-bit (OpenInsight 32-Bit) ====
=== At 28 APR 2004 06:55:00AM Oystein Reigem wrote: ===
I just made a weird and disturbing discovery.
It seems under certain circumstances OI is confused about character widths in controls. The circumstances are:
- Edit box (but not edit line)
- 8-bit characters (e.g, é, ø, æ)
- Certain fonts (those with no True Type or other symbol in the font list; are they called system fonts?), e.g, the standard MS Sans Serif
- Non-regular style (i.e, Bold, Italic, or Bold Italic)
It looks like OI has two different versions, or representations, of the text in the edit box. One version looks absolutely normal. The other version is wider.
Here are examples of what I see:
I key in a text line that contains 8-bit characters. Each time a 7-bit character is followed by an 8-bit character the caret advances an extra pixel. The resulting text looks normal, but the caret travels ahead of the keyed-in characters.
Sometimes I can see characters that are stretched an extra pixel.
I place the caret in the middle of the line that looks normal. The caret slices right through a character, because it sits relative to the characters of the wider version of the text.
I select a portion of the line. A section of the line is highlighted. Again the selection and highlighting is relative to a wider version of the text, so the end points of the selection/highlighting slice right through characters. And in the highlighted section the wider version "shows through".
I currently use OI 4.1.2, but the problem is not confined to this version. Checking several versions of OI I find the problem in both 16- and 32-bit OI. The versions I've tested are 3.6.1, 4.0.3, 4.1.2, and some beta version of 7.0 in ANSI mode. (Has Tahoma Regular taken over for MS Sans Serif Bold as the standard font in 7.0?)
I've done my testing on three different computers, running Win 2K and XP.
It's unbelievable I haven't seen this before.
It's unbelievable no clients of mine have complained.
What about you other "international" developers?
I'd be thankful if other developers would try to reproduce the problem, be they "international" or not. If you have trouble finding 8-bit letters on your keyboard please copy and paste from here:
bá bé bí
æ æ æ æ æ
H
sker D
møfrø
- Oystein -
----
=== At 29 APR 2004 07:16AM Oystein Reigem wrote: ===
Please. Shouldn't take long time for somebody to test.
- Oystein -
----
=== At 29 APR 2004 07:47AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: ===
Oystein,
MS Sans Serif
Bold Italic
W2K UK English
OI 4.13 ANSI
Can't say I see any problem with just Bold or Regular fonts but the Italic does seem off a little; however, I think this is more of a font issue than an OI one. Does this problem appear in other apps?
Tahoma has indeed replaced MS Sans Serif as the default font in OI7, to bring it into line with default Windows display schemes (W2K, WinXP)
[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 29 APR 2004 07:55AM The Sprezzatura Group wrote: ===
Well with bold italic the letter seem to [i]lean into[/i] the cursor... unsure about this selection thing though. Does this happen on all of your monitors? I'd assume it was a Windows rather than an OI thing though...
Thanks for reminding me of a HMHB track by the way - "Irk the purists" with a memorable line "H
sker D
D
D
, Captain Beefheart, ELO" sung to the tune of Agadoo...
The Sprezzatura Group
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 30 APR 2004 06:40AM Oystein Reigem wrote: ===
Sprezzatura,
Here's a few screen dumps of the phenomenon. Hope this makes it clearer what I'm talking about:
In the first dump I key in a sequence "æ" space "æ" space "æ" space "æ"... . The text itself looks completely normal but as I key the caret is travelling progressively further ahead of the current character. The caret seems to relate to a different, wider version of the characters of the text:
[img]http://gandalf.aksis.uib.no/oystein/1/1.png[/img]
Here I do exactly the same keying procedure. This time some characters stretch as I key. (A character doesn't stretch immediately after it's been keyed. It happens a few keystrokes later.) This is the wider version of the characters I'm talking about:
[img]http://gandalf.aksis.uib.no/oystein/1/2.png[/img]
I haven't figured out exactly the circumstances under which the normal version shows and when the wider one appears instead. Sometimes it's a mix of the two.
But when it is the normal version that shows, I know I can get the wider version to show by doing a selection. The unselected part of the line shows normal, but in the selected part it's like the wider version shines through:
[img]http://gandalf.aksis.uib.no/oystein/1/3.png[/img]
I've observed the problem on a total of four PCs, running Win 2K and XP Pro.
I've never seen the problem in other apps as far as I know.
I tried to make an app with a text box in a different tool (Python and the Tkinter module (windows and widgets)), but I'm not sure if it's the same control.
- Oystein -
----
=== At 30 APR 2004 07:33AM The Sprezzatura Group wrote: ===
If you install a [i]bog standard[/i] video driver do you see the same?
The Sprezzatura Group
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 30 APR 2004 12:33PM Pat McNerthney wrote: ===
Oystein,
An Edit Box is using the Windows Edit Common Control to handle all display and cursor control, so this appears to be a problem with that and not OI. Do you get similar problems in any other software running on that machine? Ideally, try to find something that also uses the Edit Common Control.
Pat
----
=== At 05 MAY 2004 10:37AM Oystein Reigem wrote: ===
Pat,
[i]try to find something that also uses the Edit Common Control[/i]
Does OI4.x's System Editor count? The problem shows in Sys Ed all right.
Word would presumably do, but it doesn't let me select non-TT fonts.
I haven't come around to try Sprezz's suggestion yet (standard video driver).
- Oystein -
----
=== At 05 MAY 2004 09:21PM Pat McNerthney wrote: ===
The System Editor does use the Edit Common Control. I doubt that Word does, it most likely is doing all of the work itself.
I just checked the version of NotePad on my Win2000 box and it apppears that it also uses the Edit Common Control. So that should be a good test to see if this is an OI problem or a problem with your Windows setup.
Pat
----
=== At 06 MAY 2004 02:57AM Donald Wakefield wrote: ===
Same problem in Japanese when using MS PGothic font (which swings both ways ... Romanji and Kanji). We use one point bigger or smaller to overcome the problem. So if you would usually use 8 point, use 9 point ... try on your font.
----
=== At 06 MAY 2004 08:46AM Oystein Reigem wrote: ===
Pat,
The problem does appear in Notepad too. Thanks.
I've seen the problem on all four PCs I've tested - with two different makes of PC/monitor and two different Windows versions. Note also Donald Wakefield's observations. It might be more than a local flaw.
I think the solution is to change font in the app - either from my current bold setting to regular, or to a True Type font. Having my clients upgrade to a new version of the app might be less costly than fixing whatever it is that's behind the problem.
Donald,
Thank you for making me feel not so alone. :-)
But changing font size doesn't help.
- Oystein -
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=A6DDD097E1AC7D1785256E84003BF7E7|View this thread on the Works forum...]]