BASIC

Author Topic: IDE text problems  (Read 4171 times)

Offline RayRayTea

  • Mc. Print
  • *
  • Posts: 6
    • View Profile
IDE text problems
« on: 2012-Apr-14 »
I just downloaded GLBasic and am testing it out - as expected one of the first things I did was to open some of the example files… but it seems there are problems with text in the IDE: some of the fonts are rendered incorrectly and are cut off (I'm attaching an example of what it can look like - most visible in line 395, but basically every line is rendered weirdly).

Also I can't make it work with Unicode characters no matter what I try (even something as simple as writing comments doesn't work), is there a solution to that? Actually it sort of works, but once the text is in, it becomes impossible to edit because the IDE positions the cursor in the middle of the character. To get an idea, just paste some Unicode text and try to edit it to see what happens.

So, after checking all the settings it seems the first problem can be solved only by using specific fonts (I didn't notice any patterns since all the fonts I tested work normally in other applications) - I just have to try and hope it works. For now I settled on Courier New for now which works normally. Is there anything i can do regarding the second problem?

(Edit: additional info)

[attachment deleted by admin]
« Last Edit: 2012-Apr-14 by RayRayTea »

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: IDE text problems
« Reply #1 on: 2012-Apr-14 »
This Problem is known, but wow i never saw it happen that extrem. Hope it will get solved soon.

Console Fonts are very popular with GLB (as far as i know), i use "Lusida Console" which is totally usable and has only very tiny problems. Generally i found fixed-width fonts way more usable for programming, its easier to structure code and place comments.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Ruidesco

  • Mr. Polyvector
  • ***
  • Posts: 236
    • View Profile
Re: IDE text problems
« Reply #2 on: 2012-Apr-14 »
You'd do well in using fixed width fonts for programming, they make reading code and good indentation practices much easier.

Offline RayRayTea

  • Mc. Print
  • *
  • Posts: 6
    • View Profile
Re: IDE text problems
« Reply #3 on: 2012-Apr-15 »
True, but I just wanted to report that: 1. some fonts render terribly (it turns out it's a known issue, but I haven't seen it mentioned in the forums before, maybe my search terms were wrong) and 2. I want to use Unicode characters in comments and such, but it doesn't work.

Oh I just noticed one other (I assume the manifestation of the same) problem, in one of the examples there's some text in German, here's how it renders on my computer regardless of the font (notice the end of the line 36).

[attachment deleted by admin]
« Last Edit: 2012-Apr-15 by RayRayTea »

Offline hardyx

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 491
    • View Profile
Re: IDE text problems
« Reply #4 on: 2012-Apr-15 »
1. some fonts render terribly (it turns out it's a known issue, but I haven't seen it mentioned in the forums before, maybe my search terms were wrong)
This is my post about the IDE fonts. This happens when you use Cleartype fonts. Using a fixed size font minimizes the problem.
http://www.glbasic.com/forum/index.php?topic=7529.0
« Last Edit: 2012-Apr-15 by hardyx »

Offline RayRayTea

  • Mc. Print
  • *
  • Posts: 6
    • View Profile
Re: IDE text problems
« Reply #5 on: 2012-Apr-15 »
But I don't use Cleartype on my computer - I have it turned off (click on the first image in the post to enlarge it!). This and the evil "Sticky Keys" are the first things I turn off when I get a new computer. Just for fun I turned ClearType on and tested it - funnily enough I don't get the errors you get. In any case this isn't what bothers me the most, since I was planning to use a fixed width font without ClearType anyway, I just wanted to report it for completeness (surely it shouldn't do that even if the user has weird ideas about using non-fixed width fonts). I discovered some other glitches when using "prohibited" fonts but not sure it's worth reporting.

My main disappointment is... that IDE doesn't support Unicode, what a big letdown :( If it's any consolation to IDE's (which I actually like!) author, all the other Basics/Basic-likes I'm testing right now are also failing on this test!

Offline Markus

  • Mr. Polyvector
  • ***
  • Posts: 125
  • Offline
    • View Profile
Re: IDE
« Reply #6 on: 2012-Apr-16 »
I think a IDE don't need unicode.
For Output you can make a Bitmap Font with any Pictures you like.
For Windows OS i know only MS VB.Net with great Unicode support for making Multilanguage Programs
with a GUI Designer where it is possible to change the form language with a combobox and you can input all texts.
For any IDE Editor in use also the Font Fixedsys 9 because i like them :-)
« Last Edit: 2012-Apr-16 by Markus »

Offline RayRayTea

  • Mc. Print
  • *
  • Posts: 6
    • View Profile
Re: IDE
« Reply #7 on: 2012-Apr-16 »
I think a IDE don't need unicode.

I think it does. It's nice to be able to write comments in any language people happen to use and name variables and stuff in whatever's their language (as long as everybody involved can understand it). Not to mention writing multilanguage applications / games is also more comfortable if it's supported by IDE. It's an unfair comparison (Adobe is huge etc) but software like Flash, Photoshop and InDesign allow naming of layers, brushes, styles etc however you see fit.

As for the rest… Generally I'd prefer not to have to resort to using pictures for output.

Anyway, I guess Unicode is not supported and that's it.

Offline Markus

  • Mr. Polyvector
  • ***
  • Posts: 125
  • Offline
    • View Profile
Re: IDE
« Reply #8 on: 2012-Apr-16 »
ah,ok.
my wife comes from thailand, i can't read this but my wife can read english and german.
she have a special keyboard for this english/thai.
english als world language is fine.
a source code must be shared and understand from all people on this world.
i agree , saving,loading,showing,copy & paste a text must look same.
i see unicode don't work in wikipedia at all and i see missing pictures for the charcodes.
some unicode charakter are to small to understand and you need a bigger font size.

most of the ide editors use third party controls because a editor with folding functions
is very special. (long time ago i wrote a ide for blitzbasic by myself. this was not easy.)
and i think the compiler behind must also understand unicode.

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: IDE text problems
« Reply #9 on: 2012-Apr-16 »
My personal opinion:

The biggest problem with UTF-8 support is all those characters that look like ' " [ ] { } and so on, but isn't. Try copying from a blogpost with UTF-8 support and spot all the errors in the code that type-setting functions have changed in the code. It's horrible. No, source-code needs to be standardized to english. No funny 32-bit variable names please. Some languages uses the character minus to make combinations of words like flower-pot. How would the compiler see this? Two variables with a minus character inbetween them. The programmer sees it as a single variable. Not good for debugging. What if other languages have different characters? How does the compiler understand them?

Strings on the other hand needs to be encoded in whatever the font system needs and printing fonts in GLBasic is done with 128 or 256 characters only so no need for UTF-8 at all in GLBasic.

You can't compare naming of layers and similar things in graphic-based programs. It's not really the same as it's just a string in a database, nothing else.

I'm from Sweden and love UTF-8 but not for variable names please :-)

(sorry for ranting a bit...) :-)

Offline Markus

  • Mr. Polyvector
  • ***
  • Posts: 125
  • Offline
    • View Profile
Re: IDE text problems
« Reply #10 on: 2012-Apr-16 »
@Moru
i remember UTF8 is a stupid mix between 1 or 2 Bytes^^

@Unicode
2 bytes is old , i think they use 4 bytes now.
and the whole string class must be rewritten + backward compatible.

Offline RayRayTea

  • Mc. Print
  • *
  • Posts: 6
    • View Profile
Re: IDE text problems
« Reply #11 on: 2012-Apr-16 »
Hm, this is slowly turning into a discussion whether there should be Unicode support at all :( Of course there should :)

Quote from: Moru
The biggest problem with UTF-8 support is all those characters that look like ' " [ ] { } and so on, but isn't. Try copying from a blogpost with UTF-8 support and spot all the errors in the code that type-setting functions have changed in the code. It's horrible.
Well, pasting stuff from blogs is not the same really. I got the impression you're assuming pasting would go from somewhere (maybe even badly formatted) into a non-Unicode environment (such as a BASIC's IDE), of course in this case you'd get some ???? strings etc, so it's a bit of a circular argument.

Just to make it clear: I'm not expecting everything should be allowed in naming etc (using spaces, special characters etc etc) - I was just hoping for the most basic support that I'm used to in the (admittedly much more expensive and different in nature) software I use daily. Of course there would have to be some rules - not the same as in, but somewhat similar to when naming files and folders one shouldn't use * / etc no matter the language of their OS.

And second, even if just about everybody here hates this idea I still think that writing comments in non-ASCII should absolutely be possible no matter how you look at it.

Anyway - I guess I'm not going to convince anybody here. The amount of applications supporting Unicode is slowly growing and there's no turning back. I guess everybody should use what works best for them :)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: IDE text problems
« Reply #12 on: 2012-Apr-16 »
I agree all editors should support UTF-8 but the programming language should be the same. What you put in the comments is your business and strings should be able to contain whatever you need them to.

UTF-8 is a nice combo of 1-4 bytes actually. It's a way of encoding Unicode so americans stop complaining :-)

About pasting from blogs. I have seen this exact problem in several discussions on this board where the problem turned out to be the copy/paste from a blog that didn't use the correct " character in strings.

Offline Markus

  • Mr. Polyvector
  • ***
  • Posts: 125
  • Offline
    • View Profile
Re: IDE text problems
« Reply #13 on: 2012-Apr-16 »
@RayRayTea
you can have everything that make no problems because problems take your live time.

@Moru
this 1-4 byte combo is stupid shit if you must handle this bytes behind.
i hate UTF8. You must learn that a char is a object , a string is a object list and self a object .
char=char it must have the same properties or struct because it is the same class.
any programming language are inconsistent for speed optimising^^ and use
bytes intead of a object.