LB Booster
« Limitations of Syntax Coloring »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:31am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Limitations of Syntax Coloring  (Read 3137 times)
CryptoMan
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Re: Limitations of Syntax Coloring
« Reply #15 on: Sep 19th, 2016, 1:20pm »

@tsh73: I can see you images. The linked web site is unreachable.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Limitations of Syntax Coloring
« Reply #16 on: Sep 19th, 2016, 1:45pm »

Quote:
@tsh73: I can see you images. The linked web site is unreachable.

It was postimage.org
Now let's try with photobucket:
User Image

User Image

« Last Edit: Sep 19th, 2016, 1:47pm by tsh73 » User IP Logged

Rod
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 110
xx Re: Limitations of Syntax Coloring
« Reply #17 on: Sep 19th, 2016, 6:46pm »

I am on Win10 in Europe and cannot see the problem. Every font change is instant and the font is consistent no matter what font I pick. The syntax colour always kicks in on pressing the second ".
User IP Logged

Jack Kelly
Full Member
ImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 106
xx Re: Limitations of Syntax Coloring
« Reply #18 on: Sep 20th, 2016, 11:17am »

My observations agree with Rod's. There are no quirky problems with fonts on my PC. But I don't try to use any national character sets, or anything beyond plain vanilla. Courier_New bold 18 is just fine on my system.
User IP Logged

CryptoMan
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Re: Limitations of Syntax Coloring
« Reply #19 on: Sep 21st, 2016, 4:34pm »

tsh73 is replicating my problem exactly as I observe it.

The problem starts with FixedSys font. So, if others are trying with other fonts they may not see it.

When I start with FixedSys the problem starts immediately and eventually gets very bad and the source code becomes completely uneditable.

It is not really related to national fonts. Originally, I thought that was the reason but it is not. First of all, my FixedSys font has Script=Turkish and thus have all of the necessary additional fonts and thus RichEdit have no reason at all to substitute fonts on the assumption that additional fonts are not existing and thus it tries to find another font. It is already happening with just test$="ABCDE" very simple UK/US ASCII characters. In fact it starts with test$=" in Arial as TSH73 also observed and as soon as the quotes closed it turns into test$="ABCDE"
whatever inside quotes turns to FixedSys but test$= remains Arial. After this point RichEdit thinks the font is Proportional Arial but some of it is FixedSys with different characters and thus cursor position is now incorrectly calculated and the source editing becomes impossible.

I have also see 0x20 space characters becoming 1 or 0 pixel size and thus white spaces dissappear.

And, on a Windows 2012 Server have seen it got even worse. I have seen this on many different machines but as I understand some maybe most people are not seeing this problem.

I changed to work with Courier New or Consolas now and so far I have not seen this problem with these fonts. So, I can do without FixedSys and live with Courier.

At least from TSH73 message, some other people also have seen what I have been seeing.
User IP Logged

Rod
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 110
xx Re: Limitations of Syntax Coloring
« Reply #20 on: Sep 21st, 2016, 5:45pm »

To be clear FixedSys font worked perfectly ok for me. Also the entire text adopts the selected font.
« Last Edit: Sep 21st, 2016, 5:46pm by Rod » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Limitations of Syntax Coloring
« Reply #21 on: Sep 21st, 2016, 6:30pm »

on Sep 21st, 2016, 4:34pm, CryptoMan wrote:
my FixedSys font has Script=Turkish and thus have all of the necessary additional fonts and thus RichEdit have no reason at all to substitute fonts

I don't know how many times I must keep repeating this, but that is not correct. Your statement is based on a naïve assumption about the way font substitution works, which is not how it works in practice. I do not know exactly the rules that Rich Edit uses but they are quite obviously not what you describe.

I do not understand why you are so resistant to accepting that the most straightforward explanation is actually the right one. Both you and Anatoly have reported that when you select FixedSys the Rich Edit control is substituting a different font from the start. Yet somehow you want to believe that it is not a font-substitution issue!

Quote:
I changed to work with Courier New or Consolas now and so far I have not seen this problem with these fonts.

Courier New and Consolas are Unicode fonts which have all the characters that are needed for Russian, Turkish and most other languages, therefore the Rich Edit control has no need to perform any substitutions. In contrast the FixedSys font is not a Unicode font and substitutions may be required.

It is certainly interesting that the Rich Edit control is using a substitute font from the start, even when it is not strictly necessary. I don't know the precise reason for that, but it may be to prevent mixing different fonts in the same paragraph which could be ugly. Irrespective, it doesn't alter the basic issue.

I am glad you have found a solution that you are happy with, but I feel I should point out that I told you about that solution (using a Unicode font rather than FixedSys) a long time ago!

Richard.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Limitations of Syntax Coloring
« Reply #22 on: Sep 21st, 2016, 6:39pm »

I wonder if this depends on richtextbox control version, which might be depending on Windows version?
Here on XP home SP3 sysinternals process explorer shows that LBB loaded
windows\system32\riched20.dll
version 5.30.0023.1230
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Limitations of Syntax Coloring
« Reply #23 on: Sep 23rd, 2016, 08:41am »

on Sep 21st, 2016, 6:39pm, tsh73 wrote:
I wonder if this depends on richtextbox control version, which might be depending on Windows version?

Although there are certainly several different versions of the Rich Edit control, I don't think that's a likely cause of the anomaly. I still believe that the underlying issue is the PC's language selection.

There are several different ways in which a PC can be configured for different locales, among which are the keyboard layout, the default display language, the default Code Page and the input method. My guess is that based on some or all of these settings the Rich Edit control tries to determine whether the selected font contains all the characters that are likely to be required, and if not performs a font substitution.

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Limitations of Syntax Coloring
« Reply #24 on: Sep 23rd, 2016, 5:44pm »

I notice that there is an 'unofficial Unicode extension' of the FixedSys font called Fixedsys Excelsior. If this works well it might make it possible to use FixedSys, or something very much like it, without triggering the font-substitution issue that has caused so much aggravation.

Perhaps somebody who has been experiencing the Rich Edit anomaly could try this font and report back on whether it fixes the problem. Here is the download link for the TTF file. As usual, once downloaded you should right-click on the file and select Install.

Richard.

User Image
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Limitations of Syntax Coloring
« Reply #25 on: Sep 24th, 2016, 06:14am »

Quote:
Perhaps somebody who has been experiencing the Rich Edit anomaly could try this font and report back on whether it fixes the problem.

It looks like it fixes things for me.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Limitations of Syntax Coloring
« Reply #26 on: Sep 24th, 2016, 06:41am »

Err...
Richard, does LBB IDE uses Alt-Shift for anything?

It is one of two common hotkeys for switching input language, in my case English/Russian
So while testing I found that in LBB 3.05 I can paste russian text, can switch language by mouse (by applet in system tray), but somehow I cannot switch language by pressing Alt-Shift.

I have separate folder with LBB 2.51 - and Alt-Shift switches language there.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Limitations of Syntax Coloring
« Reply #27 on: Sep 24th, 2016, 08:47am »

on Sep 24th, 2016, 06:41am, tsh73 wrote:
does LBB IDE uses Alt-Shift for anything?

No, but something strange is happening here (Windows 10 laptop) because if I press and release Alt - rather than using Alt+letter as a menu shortcut - it seems to freeze the LBB IDE. If that's happening to you too it may well impact on your hotkey.

I'm away from home at the moment so I can't investigate further, but that should definitely not be happening.

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Limitations of Syntax Coloring
« Reply #28 on: Sep 24th, 2016, 12:07pm »

on Sep 24th, 2016, 06:41am, tsh73 wrote:
does LBB IDE uses Alt-Shift for anything?

Further to my earlier reply, although LBB doesn't use Alt+Shift itself, Rich Edit controls do, and of course the LBB editing pane is a Rich Edit control. There is a list of keyboard shortcuts here and you will notice that it includes Alt+Shift+X, Alt+Shift+Ctrl+F11 and Alt+Shift+Ctrl+F12.

So it is possible that the Rich Edit control is intercepting your Alt+Shift hotkey and preventing it doing what it normally does. Probably Alt+Shift is a poor choice of hotkey if it is already used for other purposes in standard Windows components like the Rich Edit control.

Richard.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Limitations of Syntax Coloring
« Reply #29 on: Sep 24th, 2016, 4:15pm »

Quote:
Probably Alt+Shift is a poor choice of hotkey

It's default Windows language switching hotkey.
That mean bigger part of Russia and what not uses it on daily basis, at least since Windows 3x.
User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls