LB Booster
« Limitations of Syntax Coloring »

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



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 3142 times)
CryptoMan
New Member
Image


member is offline

Avatar




PM

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

Just to eliminate any doubts on Keyboard settings, I changed it to English (US) Keyboard and it is the same. It does not start with FixedSys.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Limitations of Syntax Coloring
« Reply #8 on: Sep 18th, 2016, 11:24am »

on Sep 18th, 2016, 11:20am, CryptoMan wrote:
Just to eliminate any doubts on Keyboard settings, I changed it to English (US) Keyboard and it is the same. It does not start with FixedSys.

You said this was wasting too much time. I agree, so please let us wait for reports from other users so we can determine whether this is something peculiar to your setup or a more general issue. I hope not to see any more posts from you until then, thanks.

Richard.
User IP Logged

CryptoMan
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Re: Limitations of Syntax Coloring
« Reply #9 on: Sep 18th, 2016, 11:31am »

I went to my old Lenovo and choose FixedSys and it does start with FixedSys.

On that machine FixedSys have only Turkish Script but the new machine has both Western and Turkish.

I will now erase one of them and see if this is the cause.
User IP Logged

CryptoMan
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Re: Limitations of Syntax Coloring
« Reply #10 on: Sep 18th, 2016, 11:36am »

Windows refuses to erase FixedSys so I couldn't try this.

But, I tried with a similar font Terminal which has only one script OEM/DOS and it does start rendering with terminal.
User IP Logged

CryptoMan
New Member
Image


member is offline

Avatar




PM

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

In fact, when it works in the old Lenovo, as soon as type " syntax colouring starts.

In the new machine syntax colouring happens when I close the quote.

Why is these different behaviours happening?
User IP Logged

CryptoMan
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Re: Limitations of Syntax Coloring
« Reply #12 on: Sep 18th, 2016, 11:48am »

Old Lenovo is Windows 10 Home Edition
New Acer is Windows 10 Home Single Language

Yes, this is really a time waster and let's see if anybody else have seen anything like this.

Thanks for your patience.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Limitations of Syntax Coloring
« Reply #13 on: Sep 19th, 2016, 06:37am »

Her's what I got on Win XP prof SP3
(LBB version still 3.02 but I think it doesn't changed here)
http://s21.postimg.io/3zvqvn7yf/Syntax_Coloring_Fixedsys.gif

User Image

If I switch to Lucida Console font stays consistent (looks Lucida Console )

But syntax coloring was turned off to me. I will put it on and see if I see anything wrong.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Limitations of Syntax Coloring
« Reply #14 on: Sep 19th, 2016, 07:03am »

Aha.
So I went on reading "pressing ESC aborts the program" thread

and pasted piece of code from reply #23, this one
Code:
    htb = hwnd(#w.tb)
    calldll #user32, "GetWindowLongA", htb as ulong, _
      _GWL_STYLE as long, style as long
    print dechex$(style)
 

Pasted from Internet Explorer 8 (it happens pasting from Google Chrome works normally with/without syntax coloring!)

Now that I've got:
with syntax coloring on I got single line, syntax colored, of different font size, obviously garbled (some "(" not visible)
first word is Russian for "Normal" - have no idea where it gets from
(Last vertical line is text cursor)

If I turn off syntax coloring, this line gets same font size, but still as a single line it won't compile even after removing extra first word.

Now if I paste same thing with syntax coloring off it appears normal, compiles too
User Image
Still somehow pasted text font looks smaller.

so I'll turn it off for a while.

EDIT: that was Internet Explorer 8
From Google Chrome it works as supposed too, everything is fine.
User IP Logged

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

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