Overlapping characters in version 3.97k

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
econoplas
Posts: 8
Joined: Sun Apr 08, 2012 2:22 pm

Overlapping characters in version 3.97k

Post by econoplas »

In the new version 3.97k, when I choose a font like Lucida Console 11pt or my favorite Droid Sans Mono 11pt, I see characters overlapping in syntax highlighted files, such as Lua scripts.

Programming has become somewhat difficult because I cannot see the '.' after a keyword because the '.' is overlapping the previous character. And in some cases such as 'function key_macro()' the space between the function keyword and the 'key_macro' identifier is almost undetectable. When I move the cursor over these '.' after a keyword, the cursor appears in the middle of the previous character rather than before or after the character. In the region where no space appears between 'function' and 'key_macro', when I use the left or right arrow, the cursor moves past the space entirely as if it is not there.

The problem does not occur if I choose Courier New, but this is not a very pleasant font to work with.

I wish I could upload a screenshot with problems circled to explain it better.

If I go to Options -> Document Types, select Lua Document Type, click Edit, select Coloring tab, select "Keywords" in the list and change from "Bold" to "Medium" then the problem goes away. I had to do this for various document types that I use regularly.

I noticed that characters rendered in italics have no problem, only those that are bold.

I don't know if it makes a difference, but I have line number mode enabled.

Thanks for your help!
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

In the new version 3.97k, when I choose a font like Lucida Console 11pt or my favorite Droid Sans Mono 11pt, I see characters overlapping in syntax highlighted files, such as Lua scripts.
I have managed to replicate this issue.

To me this looks like an issue with the font itself because the font changes it's size (i.e. it gets wider) just because the style is changed to bold.

You can see this if you use something like write.exe and compare the lengths of two identical strings, one with a bold and one with a normal style.

The reason the Courier New works correctly is because it does keep the same font width (i.e. same point size) even with the bold style.

The best I can suggest is to find a font that behaves correctly and maintains it's point size even if the style is changed.

Here are some fonts: http://www.zeusedit.com/zforum/viewtopic.php?t=301

For example I tried the Consolas font and it also works correctly.

Cheers Jussi
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I think I now understand why certain fonts work and others don't :)

I am running Windows 7 and if i go to the Control Pane,, Fonts section I can see the fonts that work have a bold and regular fonts installed.

The fonts that do not wrk only have a regular font installed.

So I am guessing that when a bold style is requested for a font that does not have a bold font installed Windows simulates the font by manipulating the regular font and hence the increase in width.

Cheers Jussi
econoplas
Posts: 8
Joined: Sun Apr 08, 2012 2:22 pm

Post by econoplas »

You are absolutely right. I am also running Windows 7 and as you said fonts that don't have a "Bold" equivalent installed don't work correctly in Zeus 3.97k.

I should point out that these other fonts (Droid Sans Mono and Lucida Console) did work properly with 3.97h, which I was running before I upgraded to 3.97k.

Since every programmer has their own favorite font... many users are likely to run into this issue. If 3.97k and later versions are going to have this different behavior with certain fonts you might want to consider adding this pick-a-better-font work around to the Zeus F.A.Q.

BTW, thanks for the pointer on Consolas. I like it, and Consolas 12pt will work fine as a replacement for my favorit Droid Sans Mono 11pt. It has the necessary differences in the 0 vs. O as well as 1 vs l vs I, which is a must for programming.

Liberation Mono & Liberation Mono Bold which are free downloads courtesy of the Linux community seem to work well also.

Thanks for clearing that up, and for the quick support turn-around as usual!

Keep up the good work!
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I should point out that these other fonts (Droid Sans Mono and Lucida Console) did work properly with 3.97h, which I was running before I upgraded to 3.97k.
Just FYI this is the history of this change.

Originally the only bold option was in the Fonts section found using the Options, Editor Options menu.

Then a change was made whereby the bold option was also added to the Keywords panel of the document type.

Now the only problem was this last change broke the earlier bold font option.

So prior to the 3.97k release the Options, Editor Options menu font handling was broken.

With the 3.97k release the Options, Editor Options menu font option was fixed but this change then broke the Keywords font option for some of the fonts :(
Since every programmer has their own favorite font... many users are likely to run into this issue.
I'll go back and take a look at the older font handling code and see if I can find what might have caused this break.
It has the necessary differences in the 0 vs. O as well as 1 vs l vs I, which is a must for programming.
Exactly. I also struggle with fonts that don't clearly distinguish the ; vs : characters.
Liberation Mono & Liberation Mono Bold which are free downloads courtesy of the Linux community seem to work well also.
Thanks for the heads up.

Cheers Jussi
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

This bug should be fixed in the beta version found here: http://www.zeusedit.com/z300/zeus-beta.zip

Cheers Jussi
econoplas
Posts: 8
Joined: Sun Apr 08, 2012 2:22 pm

Works great... thanks for fixing the font problem!

Post by econoplas »

Jussi,

Sorry for the delayed response. I had not been on e-mail or the forums for a few days and did not see that you had posted a beta for me to try.

But I downloaded 3.97l and everything is working perfectly with Droid Sans Mono 11pt again. Problem solved!

Once again, exemplary customer support on your part.

Thanks for listening to your users. Not everyone does :)
Post Reply